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/hermes.yml

47 lines
1.1 KiB
YAML
Raw Normal View History

2023-03-11 17:04:58 +00:00
---
2023-03-11 16:18:23 +00:00
- hosts: all
2023-03-11 17:04:58 +00:00
gather_facts: no
2023-03-11 16:18:23 +00:00
tasks:
2023-03-16 22:13:37 +00:00
- name: Wait for host to come up
wait_for:
state: started
port: 22
host: "{{ internal_ip }}"
delay: 10
timeout: 300
connect_timeout: 300
search_regex: OpenSSH
delegate_to: localhost
- name: Wait for cloud-init to finish
command:
cmd: cloud-init status --wait
- name: Gather facts
setup:
2023-03-11 23:49:55 +00:00
- name: Update repositories
apt:
autoremove: true
upgrade: yes
state: latest
update_cache: yes
cache_valid_time: 86400 # One day
2023-03-16 22:13:37 +00:00
- name: Install packages
apt:
pkg:
- qemu-guest-agent
- dnsmasq
- dnsutils
2023-03-11 23:49:55 +00:00
- name: Disable systemd-resolved
systemd:
name: systemd-resolved
enabled: false
state: stopped
- name: Copy dnsmasq configuration
2023-03-11 16:18:23 +00:00
copy:
2023-03-11 23:49:55 +00:00
src: "dnsmasq.conf"
dest: "/etc/dnsmasq.conf"
- name: Enable dnsmasq
systemd:
name: dnsmasq
enabled: true
state: started