aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/roles/systemd_depend_mount/handlers/main.yml
blob: 81bae322bd2e77c41a5710fb7ff9fffcfc966d29 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
- name: Reload systemd daemon
  become: true
  ansible.builtin.systemd_service:
    daemon_reload: true
  listen: systemd_depend_mount_restart

- name: Restart systemd services
  become: true
  ansible.builtin.systemd_service:
    name: '{{ item }}'
    state: restarted
  listen: systemd_depend_mount_restart
  loop: "{{ systemd_depend_mount_result.results | selectattr('changed', 'equalto', true) | map(attribute='service') | list }}"