---
- hosts: all
gather_facts: no
tasks:
- name: Wait for cloud init to finish
pause:
seconds: 120
- name: Update repositories
apt:
autoremove: true
upgrade: yes
state: latest
update_cache: yes
cache_valid_time: 86400 # One day
- name: Disable systemd-resolved
systemd:
name: systemd-resolved
enabled: false
state: stopped
- name: Copy dnsmasq configuration
copy:
src: "dnsmasq.conf"
dest: "/etc/dnsmasq.conf"
- name: Enable dnsmasq
name: dnsmasq
enabled: true
state: started