diff --git a/roles/vault/tasks/shared/issue_cert.yml b/roles/vault/tasks/shared/issue_cert.yml index 54d2f270b..3ef31a565 100644 --- a/roles/vault/tasks/shared/issue_cert.yml +++ b/roles/vault/tasks/shared/issue_cert.yml @@ -49,7 +49,7 @@ group: "{{ issue_cert_file_group | d('root' )}}" mode: "{{ issue_cert_file_mode | d('0644') }}" owner: "{{ issue_cert_file_owner | d('root') }}" - when: + when: - inventory_hostname in play_hosts - inventory_hostname == issue_cert_hosts|first @@ -60,8 +60,9 @@ group: "{{ issue_cert_file_group | d('root' )}}" mode: "{{ issue_cert_file_mode | d('0640') }}" owner: "{{ issue_cert_file_owner | d('root') }}" - when: inventory_hostname in play_hosts - + when: + - inventory_hostname in play_hosts + - inventory_hostname == issue_cert_hosts|first - name: issue_cert | Copy issuing CA cert copy: