This repository has been archived on 2023-12-26. You can view files and clone it, but cannot push or open issues or pull requests.
hermes/ansible/roles/dnsmasq/tasks/main.yml

19 lines
430 B
YAML
Raw Normal View History

2023-03-17 16:26:03 +00:00
- name: Install dnsmasq
apt:
name: dnsmasq
- name: Disable systemd-resolved
systemd:
name: systemd-resolved
enabled: false
state: stopped
- name: Copy dnsmasq configuration
copy:
src: "{{ role_path }}/files/dnsmasq.conf"
dest: "/etc/dnsmasq.conf"
register: config
2023-03-17 16:26:03 +00:00
- name: Enable dnsmasq
systemd:
name: dnsmasq
enabled: true
state: "{{ 'restarted' if config.changed else 'started' }}"