33 lines
726 B
YAML
33 lines
726 B
YAML
---
|
|
# handlers file for dnsmasq
|
|
|
|
- name: Apply installation
|
|
ansible.builtin.command:
|
|
argv:
|
|
- /usr/bin/rpm-ostree
|
|
- apply-live
|
|
become: true
|
|
|
|
- name: Restart systemd-resolved.service
|
|
ansible.builtin.systemd_service:
|
|
name: systemd-resolved.service
|
|
state: restarted
|
|
become: true
|
|
|
|
- name: Restart dnsmasq.service
|
|
ansible.builtin.systemd_service:
|
|
name: dnsmasq.service
|
|
state: restarted
|
|
become: true
|
|
register: dnsmasq_restarted
|
|
|
|
- name: Restart dnsmasq.service on dns servers
|
|
ansible.builtin.systemd_service:
|
|
name: dnsmasq.service
|
|
state: restarted
|
|
when: dnsmasq_restarted is undefined
|
|
become: true
|
|
loop: "{{ dnsmasq_hosts }}"
|
|
delegate_to: "{{ item }}"
|
|
run_once: true
|