This repository has been archived on 2023-05-09. You can view files and clone it, but cannot push or open issues or pull requests.
carwash/ansible/carwash.yml
2023-05-08 23:49:04 +02:00

45 lines
1.1 KiB
YAML

---
- name: Wait for Cloud-init to finish
hosts: all
gather_facts: no
roles:
- cloudinit_wait
- hosts: all
pre_tasks:
- name: Delete externally managed environment file
shell:
cmd: "rm /usr/lib/python*/EXTERNALLY-MANAGED"
register: rm
changed_when: "rm.rc == 0"
failed_when: "false"
roles:
- {role: docker, tags: docker}
- {role: setup_apt, tags: setup_apt}
- {role: wireguard, tags: wireguard}
post_tasks:
- name: Disable systemd-resolved
systemd:
name: systemd-resolved
enabled: false
state: stopped
- name: Copy resolv.conf
copy:
src: resolv.conf
dest: /etc/resolv.conf
- name: Copy pi-hole docker compose
copy:
src: docker-compose.yml
dest: /root/docker-compose.yml
- name: Start pi-hole
docker_compose:
project_src: /root
pull: true
remove_orphans: true
- name: Enable routing
sysctl:
name: net.ipv4.ip_forward
value: '1'
sysctl_set: true
state: present
reload: true