diff --git a/ansible/wireguard/wg.yml b/ansible/wireguard/wg.yml index e866271..38345df 100644 --- a/ansible/wireguard/wg.yml +++ b/ansible/wireguard/wg.yml @@ -35,6 +35,12 @@ dest: wg0-2.conf flat: yes + - name: Recuperation du fichier de conf 3 + ansible.builtin.fetch: + src: wg0-3.conf + dest: wg0-3.conf + flat: yes + - hosts: wg become: true @@ -53,6 +59,11 @@ dest: /etc/wireguard/wg0.conf when: ansible_hostname == "ap32-test" + - name: Copie du fichier de conf sur le client + copy: + src: wg0-3.conf + dest: /etc/wireguard/wg0.conf + when: ansible_hostname == "ap32-prod" - name: Activation du service wireguard au demarrage ansible.builtin.service: @@ -63,3 +74,5 @@ ansible.builtin.service: name: wg-quick@wg0.service state: restarted + +