Skip to content

Commit 0dd4c78

Browse files
authored
Merge pull request #6 from blalop/bugs/5
#5 fix password parameter for exporter
2 parents 6617833 + fd77513 commit 0dd4c78

File tree

3 files changed

+8
-3
lines changed

3 files changed

+8
-3
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@
22
All notable changes to this project will be documented in this file.
33
This project adheres to [Semantic Versioning](http://semver.org/) and [Keep a changelog](https://github.com/olivierlacan/keep-a-changelog).
44

5+
## [1.0.1](https://github.com/blalop/pihole_role/tree/1.0.1) - 2021-07-03
6+
### Fixed
7+
* [#5](https://github.com/blalop/pihole_role/issues/5) When no password is provided, skip exporter parameter @blalop
8+
59
## [1.0.0](https://github.com/blalop/pihole_role/tree/1.0.0) - 2021-06-30
610
### Added
711
* [#3](https://github.com/blalop/pihole_role/issues/3) Allow no password @blalop

defaults/main.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,8 +53,9 @@ pihole_exporter_private_tmp: yes
5353
pihole_exporter_documentation_link: https://github.com/eko/pihole-exporter
5454
pihole_exporter_max_files: 32768
5555
pihole_exporter_log_output: "{% if pihole_exporter_log_file is defined %} file:{{ pihole_exporter_log_file }} {% else %} journal{% endif %}"
56+
5657
pihole_exporter_options:
5758
- "port {{ pihole_exporter_port }}"
5859
- "pihole_hostname {{ pihole_exporter_hostname }}"
59-
- "pihole_password {{ pihole_password }}"
6060
- "pihole_port {{ pihole_lighttpd_port }}"
61+
- "{% if pihole_password != '' %}pihole_password {{ pihole_password }}{% endif %}"

templates/pihole_exporter.service.j2

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ RuntimeDirectory=pihole_exporter
1313
LimitNOFILE={{ pihole_exporter_max_files }}
1414

1515

16-
ExecStart={{ pihole_exporter_exec_name }} {% for option in pihole_exporter_options %}-{{ option }} {% endfor %}
16+
ExecStart={{ pihole_exporter_exec_name }} {% for option in pihole_exporter_options %}{% if option != '' %}-{{ option }} {% endif %}{% endfor %}
1717

1818
StandardOutput={{ pihole_exporter_log_output }}
1919
StandardError={{ pihole_exporter_log_output }}
@@ -22,4 +22,4 @@ KillSignal=SIGTERM
2222
Restart=always
2323

2424
[Install]
25-
WantedBy=multi-user.target
25+
WantedBy=multi-user.target

0 commit comments

Comments
 (0)