myos/ansible/roles/disks/handlers/main.yml

22 lines
513 B
YAML
Raw Normal View History

2021-02-09 17:05:00 +01:00
---
# file: handlers/main.yml
- name: restart services
with_together:
2021-07-14 21:38:30 +02:00
- '{{ disks_to_mount }}'
- '{{ disks_to_mount_handler_notify.results }}'
2021-02-09 17:05:00 +01:00
service:
name: "{{item.0.service}}"
state: restarted
when: item.1.changed and item.0.service is defined
- name: restart services - nfs
with_together:
2021-07-14 21:38:30 +02:00
- '{{ disks_to_mount }}'
- '{{ disks_to_mount_nfs_handler_notify.results }}'
2021-02-09 17:05:00 +01:00
service:
name: "{{item.0.service}}"
state: restarted
when: item.1.changed and item.0.service is defined