[EVO] Permettre de ne pas redémarrer les services

This commit is contained in:
2023-05-03 16:12:42 +02:00
parent 1e5564ef62
commit 5c7420d284
4 changed files with 53 additions and 11 deletions

View File

@@ -16,14 +16,27 @@
interface: wg{{ index }}
become: true
register: deploy
notify:
- Activer les services
- Redémarrer les services
- name: Activer et redémarrer les services
ansible.builtin.systemd:
state: restarted
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: Activer les services
# ansible.builtin.systemd:
# state: restarted
# 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
# become: true
# loop: "{{ deploy.results | selectattr('changed', 'equalto', true) | map(attribute='index') }}"
# loop_control:
# index_var: index
# label: wg{{ index }}