diff --git a/tasks/configure_certificates.yml b/tasks/configure_certificates.yml index 36d2986..f10276f 100644 --- a/tasks/configure_certificates.yml +++ b/tasks/configure_certificates.yml @@ -77,5 +77,5 @@ loop: "{{ lookup('file', '/tmp/pubkeys') | split('\n') }}" - name: Synchronize certificates - shell: "rsync -ar -e 'ssh -p 7227 -o StrictHostKeyChecking=no' {{ ansible_play_hosts[0] }}:/etc/letsencrypt /etc/letsencrypt" - when: inventory_hostname != ansible_play_hosts[0] \ No newline at end of file + shell: "rsync -ar -e 'ssh -p 7227 -o StrictHostKeyChecking=no' {{ mail_server_fqdn_ip }}:/etc/letsencrypt /etc/" + when: mail_server_fqdn_ip != node_external_ip \ No newline at end of file