Skip to content

Commit

Permalink
Add support for updating pihole installation.
Browse files Browse the repository at this point in the history
* Pihole installation may now be upgraded to latest version on
  configuration application if enabled.
  • Loading branch information
r-pufky committed Oct 2, 2022
1 parent 52ac955 commit 2cc8617
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 0 deletions.
4 changes: 4 additions & 0 deletions defaults/main/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,10 @@ pihole_local_backup: 'group_vars/pihole/data/pihole-teleporter.tar.gz'
# Default: False.
pihole_use_cli: false

# Apply any pihole updates during configuration? Otherwise updates must be done
# via the GUI or CLI. Default: False.
pihole_update_enable: false

###############################################################################
# Pi-Hole setupVars.conf
###############################################################################
Expand Down
1 change: 1 addition & 0 deletions tasks/main.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
---
- ansible.builtin.import_tasks: install.yml
- ansible.builtin.import_tasks: db.yml
- ansible.builtin.import_tasks: update.yml
9 changes: 9 additions & 0 deletions tasks/update.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
---
###############################################################################
# Pi-Hole Update
###############################################################################
# Update pihole using pihole update mechanism if enabled.

- name: 'update | updating pihole installation'
ansible.builtin.command: "pihole updatePihole"
when: pihole_update_enable

0 comments on commit 2cc8617

Please sign in to comment.