Skip to content

Commit 6617833

Browse files
authored
Merge pull request #4 from blalop/features/3
Features/3
2 parents ef471b3 + b2de1f7 commit 6617833

File tree

9 files changed

+258
-215
lines changed

9 files changed

+258
-215
lines changed

.ansible-lint

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,6 @@ exclude_paths:
44
parseable: true
55
skip_list:
66
- '204'
7+
- '208'
78
use_default_rules: true
89
verbosity: 1

CHANGELOG.md

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
# Change Log
2+
All notable changes to this project will be documented in this file.
3+
This project adheres to [Semantic Versioning](http://semver.org/) and [Keep a changelog](https://github.com/olivierlacan/keep-a-changelog).
4+
5+
## [1.0.0](https://github.com/blalop/pihole_role/tree/1.0.0) - 2021-06-30
6+
### Added
7+
* [#3](https://github.com/blalop/pihole_role/issues/3) Allow no password @blalop
8+
### Breaking :warning:
9+
* For password changing, pihole_force_reinstall has to be set to true @blalop
10+
* No password configured by default @blalop
11+
12+
## [0.4.0](https://github.com/blalop/pihole_role/tree/0.4.0) - 2021-02-27
13+
### Added
14+
* [#1](https://github.com/blalop/pihole_role/issues/1) Support for pihole exporter @blalop
15+
16+
## [0.3.2](https://github.com/blalop/pihole_role/tree/0.3.2) - 2021-01-23
17+
### Added
18+
* Also tag installation checks @blalop
19+
20+
## [0.3.1](https://github.com/blalop/pihole_role/tree/0.3.1) - 2021-01-22
21+
### Fixed
22+
* Fixed password setting idempotence @blalop
23+
24+
## [0.3.0](https://github.com/blalop/pihole_role/tree/0.3.0) - 2021-01-21
25+
### Added
26+
* Added password setting support @blalop
27+
28+
## [0.2.0](https://github.com/blalop/pihole_role/tree/0.2.0) - 2021-01-16
29+
### Added
30+
* Use /tmp when downloading install script @blalop
31+
* Don't copy the lighttpd conf when it's not being installed @blalop
32+
33+
## [0.1.0](https://github.com/blalop/pihole_role/tree/0.1.0) - 2021-01-16
34+
### Added
35+
* Initial release @blalop

Pipfile

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,12 @@ verify_ssl = true
44
name = "pypi"
55

66
[packages]
7-
ansible = "==2.9.16"
8-
molecule = "==3.2.2"
7+
ansible = "==4.0.0"
8+
molecule = "==3.3.2"
9+
docker = "==5.0.0"
10+
ansible-lint = "==5.0.9"
911
molecule-docker = "==0.2.4"
10-
ansible-lint = "==4.3.7"
12+
yamllint = "==1.26.1"
1113

1214
[dev-packages]
1315

Pipfile.lock

Lines changed: 213 additions & 199 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

defaults/main.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ pihole_required_packages:
66

77
pihole_force_reinstall: false
88

9-
pihole_password: pihole
9+
pihole_password: ""
1010

1111
## Lighttpd config
1212
pihole_lighttpd_port: 80

molecule/default/molecule.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ driver:
55
name: docker
66
lint: |
77
yamllint .
8+
ansible-lint .
89
platforms:
910
- name: pihole
1011
groups:

tasks/config.yml

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,3 @@
66
dest: /etc/lighttpd/lighttpd.conf
77
notify: restart pihole_lighttpd
88
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 }}"
18-
changed_when: true
19-
when: pihole_password | length > 0 and
20-
pihole_password | hash('sha256') | hash('sha256') != pihole_current_password_hash.stdout

tasks/install.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,3 +24,4 @@
2424

2525
- name: Pi-hole | Run install script
2626
command: /tmp/pihole-install.sh --unattended
27+
changed_when: true

templates/setupVars.conf.j2

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,3 +7,4 @@ QUERY_LOGGING={{ pihole_query_logging | lower }}
77
INSTALL_WEB_SERVER={{ pihole_web_server | lower }}
88
INSTALL_WEB_INTERFACE={{ pihole_web_interface | lower }}
99
LIGHTTPD_ENABLED={{ pihole_lighttpd_enabled | lower }}
10+
WEBPASSWORD={{ '' if pihole_password == '' else pihole_password | hash('sha256') | hash('sha256') }}

0 commit comments

Comments
 (0)