You've already forked role_wireguard
[EVO] Permettre de ne pas redémarrer les services
This commit is contained in:
23
handlers/main.yml
Normal file
23
handlers/main.yml
Normal file
@@ -0,0 +1,23 @@
|
||||
---
|
||||
# handlers file for wireguard
|
||||
|
||||
- name: Activer les services
|
||||
ansible.builtin.systemd:
|
||||
enabled: true
|
||||
name: wg-quick@wg{{ item }}.service
|
||||
become: true
|
||||
loop: "{{ deploy.results | selectattr('changed', 'equalto', true) | map(attribute='index') }}"
|
||||
loop_control:
|
||||
index_var: index
|
||||
label: wg{{ index }}
|
||||
|
||||
- name: Redémarrer les services
|
||||
ansible.builtin.systemd:
|
||||
state: restarted
|
||||
name: wg-quick@wg{{ item }}.service
|
||||
when: wireguard_restart_services
|
||||
become: true
|
||||
loop: "{{ deploy.results | selectattr('changed', 'equalto', true) | map(attribute='index') }}"
|
||||
loop_control:
|
||||
index_var: index
|
||||
label: wg{{ index }}
|
Reference in New Issue
Block a user