Updating pihole?
Shadester opened this issue · 1 comments
Shadester commented
How do I update the pihole version? Is there an easy way?
Shadester commented
I figured it out: (updated oci_wirehole.yml
)
---
- name: Ansible copy directory to the remote server
copy:
src: ./files/
dest: /wirehole
- name: Pull new docker images
command: docker-compose -f /wirehole/docker-compose.yml pull
register: output
- name: Take down docker images
command: docker-compose -f /wirehole/docker-compose.yml down
register: output
- name: Start Docker containers using Docker-Compose
command: docker-compose -f /wirehole/docker-compose.yml up -d
register: output
- name: Watch docker-compose output
debug:
var: output
- name: Remove old images
command: docker image prune
register: output
- name: Pause for 15 seconds to generate Wireguard client configs
pause:
seconds: 15
- name: Copy individual files
synchronize:
src: "{{ item }}"
dest: ../wg_client_configs/oci
mode: pull
with_items:
- "/wirehole/wireguard/config/peer1"
- "/wirehole/wireguard/config/peer2"
- "/wirehole/wireguard/config/peer3"
- "/wirehole/wireguard/config/peer4"
- "/wirehole/wireguard/config/peer5"
- "/wirehole/wireguard/config/peer6"
- "/wirehole/wireguard/config/peer7"
- "/wirehole/wireguard/config/peer8"
- "/wirehole/wireguard/config/peer9"
- "/wirehole/wireguard/config/peer10"