Skip to content

Commit

Permalink
Allow to optionally disable handlers execution (#14)
Browse files Browse the repository at this point in the history
  • Loading branch information
atosatto authored Dec 2, 2018
1 parent 02315fe commit e758360
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

NEW FEATURES:
- Allow to manage systemd overrides ([\#13](https://github.com/PowerDNS/pdns-ansible/pull/13))
- Add an option (`dnsdist_disable_handlers`) to disable the automated restart of the service on configuration changes ([\#14](https://github.com/PowerDNS/dnsdist-ansible/pull/14))

## v1.1.0 (2018-06-25)

Expand Down
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,12 @@ dnsdist_service_overrides: {}
Dict with overrides for the service (systemd only).
This can be used to change any systemd settings in the `[Service]` category.

```yaml
dnsdist_disable_handlers: False
```

Disable automated service restart on configuration changes.

## Example Playbook

Deploy dnsdist in front of Quad9 and enable the web monitoring interface
Expand Down
3 changes: 3 additions & 0 deletions defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -92,3 +92,6 @@ dnsdist_config: ""
dnsdist_service_overrides: {}
# dnsdist_service_overrides:
# LimitNOFILE: 10000

# When True, disable the automated restart of the dnsdist service
dnsdist_disable_handlers: False
3 changes: 3 additions & 0 deletions handlers/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,10 @@
service:
name: dnsdist
state: restarted
sleep: 1 # the sleep is needed to make sure the service has been
when: not dnsdist_disable_handlers # correctly started after being stopped during restarts

- name: reload systemd and restart dnsdist
command: systemctl daemon-reload
notify: restart dnsdist
when: not dnsdist_disable_handlers

0 comments on commit e758360

Please sign in to comment.