Skip to content

Commit

Permalink
Allow to optionally disable handlers execution (#43)
Browse files Browse the repository at this point in the history
  • Loading branch information
atosatto authored Dec 2, 2018
1 parent a2ca13b commit 7044c34
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 13 deletions.
27 changes: 16 additions & 11 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,29 +1,34 @@
## v1.1.0 (Unreleased)

NEW FEATURES:
- Add an option (`pdns_rec_disable_handlers`) to disable the automated restart of the service on configuration changes ([\#43](https://github.com/PowerDNS/pdns_recursor-ansible/pull/43))

## v1.0.0 (2018-07-13)

__BREAKING CHANGES__:
- Rename the `pdns_rec_lua_config_file_content` to `pdns_rec_config_lua_file_content`
- Rename the `pdns_rec_lua_dns_script_content` to `pdns_rec_config_lua_dns_script_file_content`

NEW FEATURES:
- Continuos testing with molecule 2.14.0 ([\#39](https://github.com/PowerDNS/pdns-ansible/pull/39))
- Install debuginfo packages ([\#38](https://github.com/PowerDNS/pdns-ansible/pull/38))
- Allow to manage systemd overrides ([\#37](https://github.com/PowerDNS/pdns-ansible/pull/37))
- Continuos testing with molecule 2.14.0 ([\#39](https://github.com/PowerDNS/pdns_recursor-ansible/pull/39))
- Install debuginfo packages ([\#38](https://github.com/PowerDNS/pdns_recursor-ansible/pull/38))
- Allow to manage systemd overrides ([\#37](https://github.com/PowerDNS/pdns_recursor-ansible/pull/37))

IMPROVEMENTS:
- Improved documentation ([\#39](https://github.com/PowerDNS/pdns-ansible/pull/39))
- Improved documentation ([\#39](https://github.com/PowerDNS/pdns_recursor-ansible/pull/39))

BUG FIXES:
- Fix the examples in the README file ([\#31](https://github.com/PowerDNS/pdns-ansible/pull/31))
- Handle different version string for Debian and CentOS ([\#30](https://github.com/PowerDNS/pdns-ansible/pull/30))
- Fix the examples in the README file ([\#31](https://github.com/PowerDNS/pdns_recursor-ansible/pull/31))
- Handle different version string for Debian and CentOS ([\#30](https://github.com/PowerDNS/pdns_recursor-ansible/pull/30))

## v0.1.1 (2017-09-29)

NEW FEATURES:
- Install specific PowerDNS Recursor versions ([\#29](https://github.com/PowerDNS/pdns-ansible/pull/29))
- Install specific PowerDNS Recursor versions ([\#29](https://github.com/PowerDNS/pdns_recursor-ansible/pull/29))

IMPROVEMENTS:
- Add support to the PowerDNS Recursor 4.1.x releases ([\#28](https://github.com/PowerDNS/pdns-ansible/pull/28))
- Fixing minor linter issues with whitespace ([\#30](https://github.com/PowerDNS/pdns-ansible/pull/30))
- Add support to the PowerDNS Recursor 4.1.x releases ([\#28](https://github.com/PowerDNS/pdns_recursor-ansible/pull/28))
- Fixing minor linter issues with whitespace ([\#30](https://github.com/PowerDNS/pdns_recursor-ansible/pull/30))

BUG FIXES:
- Handle correctly the `include-dir` configuration setting when defined
Expand All @@ -36,5 +41,5 @@ NEW FEATURES:
- PowerDNS Recursor installation and configuration with Red-Hat and Debian support

IMPROVEMENTS:
- Switch to the MIT License ([\#27](https://github.com/PowerDNS/pdns-ansible/pull/27))
- Overall role refactoring ([\#19](https://github.com/PowerDNS/pdns-ansible/pull/19))
- Switch to the MIT License ([\#27](https://github.com/PowerDNS/pdns_recursor-ansible/pull/27))
- Overall role refactoring ([\#19](https://github.com/PowerDNS/pdns_recursor-ansible/pull/19))
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,12 @@ pdns_rec_flush_handlers: False
Force the execution of the flushing of the handlers at the end of the role. <br />
**NOTE:** This is required if using this role to configure multiple recursor instances in a single play

```yaml
pdns_rec_disable_handlers: False
```

Disable automated service restart on configuration changes.

```yaml
pdns_rec_config_dir: "/etc/powerdns"
pdns_rec_config_file: "recursor.conf"
Expand Down
3 changes: 3 additions & 0 deletions defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,9 @@ pdns_rec_service_name: "pdns-recursor"
# instance is restarted.
pdns_rec_flush_handlers: False

# When True, disable the automated restart of the PowerDNS Recursor service
pdns_rec_disable_handlers: False

# Configuration directory and files
pdns_rec_config_dir: "{{ default_pdns_rec_config_dir }}"
pdns_rec_config_file: "recursor.conf"
Expand Down
5 changes: 3 additions & 2 deletions handlers/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,10 @@
service:
name: "{{ pdns_rec_service_name }}"
state: restarted
sleep: 1 # the sleep is needed to make sure the service has been
# correctly started after being stopped during restarts
sleep: 1 # the sleep is needed to make sure the service has been
when: not pdns_rec_disable_handlers # correctly started after being stopped during restarts

- name: reload systemd and restart PowerDNS Recursor
command: systemctl daemon-reload
notify: restart PowerDNS Recursor
when: not pdns_rec_disable_handlers

0 comments on commit 7044c34

Please sign in to comment.