Skip to content

Commit 8327654

Browse files
committed
Role idempotent && fix lighttpd config typo
1 parent aac6dec commit 8327654

File tree

4 files changed

+12
-9
lines changed

4 files changed

+12
-9
lines changed

molecule/default/molecule.yml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ driver:
55
name: docker
66
lint: |
77
yamllint .
8-
ansible-lint .
98
platforms:
109
- name: pihole
1110
groups:
@@ -23,8 +22,6 @@ platforms:
2322
capabilities:
2423
- SYS_ADMIN
2524
- NET_ADMIN
26-
- NET_BIND_SERVICE
27-
- NET_RAW
2825
- SYS_NICE
2926
tmpfs:
3027
- /tmp

molecule/default/tests/test_app.yml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,9 @@ service:
1010

1111
http:
1212
"http://localhost:{{ pihole_lighttpd_port }}":
13-
status: 200
13+
status: 200
14+
15+
command:
16+
healthcheck:
17+
exec: "dig +norecurse +retry=0 @127.0.0.1 pi.hole || exit 1"
18+
exit-status: 0

tasks/config.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,5 @@
33
- name: Pi-hole | Copy lighttpd config
44
template:
55
src: lighttpd.conf.j2
6-
dest: /etc/lighttpd/setupVars.conf
7-
notify: restart pihole_lighttpd
6+
dest: /etc/lighttpd/lighttpd.conf
7+
notify: restart pihole_lighttpd

tasks/main.yml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,14 @@
11
---
22

33
- name: Pi-hole | Check installation
4-
command: pihole status
5-
register: pihole_status_check
4+
command: pihole version
5+
register: pihole_version_check
66
ignore_errors: true
7+
changed_when: false
78

89
- name: Pi-hole | Install
910
include: install.yml
10-
when: pihole_status_check is failed or pihole_force_reinstall
11+
when: pihole_version_check is failed or pihole_force_reinstall
1112
tags:
1213
- pihole_install
1314

0 commit comments

Comments
 (0)