diff --git a/ansible/hypervisors.yml b/ansible/hypervisors.yml index aea1f67..566fd58 100644 --- a/ansible/hypervisors.yml +++ b/ansible/hypervisors.yml @@ -26,24 +26,23 @@ roles: - {role: postgresql, tags: postgresql} - {role: ssh_ca, tags: ssh_ca} + - {role: wireguard, tags: wireguard} - hosts: hypervisors - no_log: False - - handlers: - - name: enable interfaces - command: - cmd: ifup -a pre_tasks: - name: Copy interfaces configuration copy: src: dmz.conf dest: /etc/network/interfaces.d/dmz.conf - notify: enable interfaces + register: interfaces + + - name: Enable interfaces + command: + cmd: ifup -a + when: interfaces.changed roles: - - {role: wireguard, tags: wireguard} - {role: ssh_ca_known_hosts, tags: ssh_ca_known_hosts} - {role: deploy_ssh_certificates, tags: deploy_ssh_certificates} - {role: borg, tags: borg}