2025-02-04 15:48:36 -08:00

53 lines
1.0 KiB
YAML

- name: Ensure docker is installed
apt:
name:
- docker.io
- docker-compose-v2
update_cache: yes
state: present
- name: Set up directory
become: true
file:
path: /etc/technitium
state: directory
mode: '0755'
- name: Copy compose file
become: true
template:
src: docker-compose.yml.j2
dest: /etc/technitium/docker-compose.yml
mode: '0644'
- name: Create password file
become: true
copy:
content: "{{ dns_server.admin_password }}"
dest: /etc/technitium/password.txt
mode: '0770'
- name: Pull Technitium image
become: true
community.docker.docker_image:
name: "{{ technitium_image }}"
source: pull
- name: Set resolv.conf
become: true
copy:
content: nameserver 127.0.0.1
dest: /etc/resolv.conf
- name: Disable systemd-resolved
become: true
service:
name: systemd-resolved
state: stopped
enabled: false
- name: Start Technitium
become: true
community.docker.docker_compose_v2:
project_src: /etc/technitium