diff --git a/roles/vault/tasks/shared/issue_cert.yml b/roles/vault/tasks/shared/issue_cert.yml index a4e8c6fdf..54d2f270b 100644 --- a/roles/vault/tasks/shared/issue_cert.yml +++ b/roles/vault/tasks/shared/issue_cert.yml @@ -49,7 +49,9 @@ group: "{{ issue_cert_file_group | d('root' )}}" mode: "{{ issue_cert_file_mode | d('0644') }}" 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 the key to all hosts copy: