You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
42 lines
1.4 KiB
YAML
42 lines
1.4 KiB
YAML
---
|
|
- name: "Pihole | Restore any missing volumes from S3"
|
|
ansible.builtin.include_role:
|
|
name: chatton.docker_backup.docker_s3_volume_restore
|
|
vars:
|
|
docker_backup_s3_volume: "{{ item }}"
|
|
with_items:
|
|
- name: "{{ pihole_portainer_stack_name }}_{{ inventory_hostname_short }}_app"
|
|
- name: "{{ pihole_portainer_stack_name }}_{{ inventory_hostname_short }}_dns"
|
|
|
|
- name: Setting host facts using complex arguments
|
|
ansible.builtin.set_fact:
|
|
vol_one: "{{ inventory_hostname_short }}_app"
|
|
|
|
- name: "Pihole | Update Portainer."
|
|
chatton.portainer.portainer_stack:
|
|
username: '{{ portainer_user }}'
|
|
password: '{{ portainer.password }}'
|
|
base_url: '{{ portainer_base_url }}'
|
|
stack_name: '{{ pihole_portainer_stack_name }}'
|
|
endpoint_id: '{{ portainer_endpoint }}'
|
|
state: "{{ pihole_state }}"
|
|
definition:
|
|
version: "3"
|
|
services:
|
|
pihole:
|
|
labels: "{{ backup_labels }}"
|
|
container_name: "{{ pihole_container_name }}"
|
|
image: "{{ pihole_image }}:{{ pihole_tag }}"
|
|
ports:
|
|
- "53:53/tcp"
|
|
- "53:53/udp"
|
|
- "85:80/tcp"
|
|
environment:
|
|
WEBPASSWORD: '{{ pihole_web_password }}'
|
|
DNSMASQ_LISTENING: "all"
|
|
volumes:
|
|
- '{{ inventory_hostname_short }}_app:/etc/pihole'
|
|
- '{{ inventory_hostname_short }}_dns:/etc/dnsmasq.d'
|
|
restart: unless-stopped
|
|
volumes: "{{ pihole_volumes }}"
|