This commit is contained in:
mperochon 2017-06-07 13:24:43 +02:00
parent cd2b9dcf99
commit b64a4c08fa

View file

@ -38,7 +38,9 @@
format: "{{ issue_cert_format | d('pem') }}" format: "{{ issue_cert_format | d('pem') }}"
ip_sans: "{{ issue_cert_ip_sans | default([]) | join(',') }}" ip_sans: "{{ issue_cert_ip_sans | default([]) | join(',') }}"
register: issue_cert_result register: issue_cert_result
when: inventory_hostname == issue_cert_hosts|first when:
- inventory_hostname in play_hosts
- inventory_hostname == issue_cert_hosts|first
- name: issue_cert | Copy the cert to all hosts - name: issue_cert | Copy the cert to all hosts
copy: copy:
@ -47,6 +49,9 @@
group: "{{ issue_cert_file_group | d('root' )}}" group: "{{ issue_cert_file_group | d('root' )}}"
mode: "{{ issue_cert_file_mode | d('0644') }}" mode: "{{ issue_cert_file_mode | d('0644') }}"
owner: "{{ issue_cert_file_owner | d('root') }}" owner: "{{ issue_cert_file_owner | d('root') }}"
when:
- inventory_hostname in play_hosts
- inventory_hostname == issue_cert_hosts|first
- name: issue_cert | Copy the key to all hosts - name: issue_cert | Copy the key to all hosts
copy: copy:
@ -55,6 +60,9 @@
group: "{{ issue_cert_file_group | d('root' )}}" group: "{{ issue_cert_file_group | d('root' )}}"
mode: "{{ issue_cert_file_mode | d('0640') }}" mode: "{{ issue_cert_file_mode | d('0640') }}"
owner: "{{ issue_cert_file_owner | d('root') }}" owner: "{{ issue_cert_file_owner | d('root') }}"
when:
- inventory_hostname in play_hosts
- inventory_hostname == issue_cert_hosts|first
- name: issue_cert | Copy issuing CA cert - name: issue_cert | Copy issuing CA cert
copy: copy:
@ -63,4 +71,7 @@
group: "{{ issue_cert_file_group | d('root' )}}" group: "{{ issue_cert_file_group | d('root' )}}"
mode: "{{ issue_cert_file_mode | d('0644') }}" mode: "{{ issue_cert_file_mode | d('0644') }}"
owner: "{{ issue_cert_file_owner | d('root') }}" owner: "{{ issue_cert_file_owner | d('root') }}"
when: issue_cert_copy_ca|default(false) when:
- inventory_hostname in play_hosts
- inventory_hostname == issue_cert_hosts|first
- issue_cert_copy_ca|default(false)