We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent add88ab commit 958c6c3Copy full SHA for 958c6c3
tasks/config.yml
@@ -7,6 +7,14 @@
7
notify: restart pihole_lighttpd
8
when: pihole_web_server
9
10
+- name: Pi-hole | Check current password hash
11
+ command: grep -oP 'WEBPASSWORD=\K\w+' /etc/pihole/setupVars.conf
12
+ changed_when: false
13
+ ignore_errors: true
14
+ register: pihole_current_password_hash
15
+
16
- name: Pi-hole | Set password
17
command: "pihole -a -p {{ pihole_password }}"
- when: pihole_password | length > 0
18
+ changed_when: true
19
+ when: pihole_password | length > 0 and
20
+ pihole_password | hash('sha256') | hash('sha256') != pihole_current_password_hash.stdout
0 commit comments