--- - hosts: fqdn-certfile become: false tasks: - copy: src: newcertsmolgenis/{{ ansible_hostname }}_gcc_rug_nl.crt dest: /etc/pki/tls/certs/{{ ansible_hostname }}_gcc_rug_nl/{{ ansible_hostname }}_gcc_rug_nl.crt backup: yes - copy: src: newcertsmolgenis/rsa.{{ ansible_hostname }}.gcc.rug.nl.key dest: /etc/pki/tls/private/{{ ansible_hostname }}_gcc_rug_nl/{{ ansible_hostname }}_gcc_rug_nl.key backup: yes - hosts: localhost-certfile become: true tasks: - copy: src: newcertsmolgenis/{{ ansible_hostname }}_gcc_rug_nl.crt dest: /etc/pki/tls/certs/localhost.crt backup: yes - copy: src: newcertsmolgenis/rsa.{{ ansible_hostname }}.gcc.rug.nl.key dest: /etc/pki/tls/private/localhost.key backup: yes