Newer
Older
---
-
delegate_to: "{{ server }}"
name: "Creating Client certificate"
shell: " cd /etc/easy-rsa/2.0; source ./vars; export EASY_RSA=\"${EASY_RSA:-.}\"; \"$EASY_RSA\"/pkitool --csr {{ inventory_hostname }} ;\"$EASY_RSA\"/pkitool --sign {{ inventory_hostname }}"
args:
creates: /etc/easy-rsa/2.0/keys/{{ inventory_hostname }}.crt
-
delegate_to: "{{ server }}"
fetch: "src=/etc/easy-rsa/2.0/keys/{{ inventory_hostname }}.crt dest=certDir/ fail_on_missing=yes validate_md5=yes flat=yes"
name: "Copy the Client Certificate to the master node"
-
delegate_to: "{{ server }}"
fetch: "src=/etc/easy-rsa/2.0/keys/{{ inventory_hostname }}.key dest=certDir/ fail_on_missing=yes validate_md5=yes flat=yes"
name: "Copy the Client Certificate to the master node"
-
delegate_to: "{{ server }}"
fetch: "src=/etc/easy-rsa/2.0/keys/ca.crt dest=certDir/ fail_on_missing=yes validate_md5=yes flat=yes"
name: "Copy the Client Certificate to the master node"
-
local_action: "command mv certDir {{ ansible_env['PWD'] }}/{{ inventory_hostname }}.cert"
name: "Moving certDir"