-
Notifications
You must be signed in to change notification settings - Fork 32
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Allow to manage systemd overrides (#13)
- Loading branch information
Showing
12 changed files
with
91 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -20,6 +20,7 @@ galaxy_info: | |
- vivid | ||
- wily | ||
- xenial | ||
- bionic | ||
galaxy_tags: | ||
- dnsdist | ||
- dns | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,3 +5,6 @@ | |
## | ||
|
||
dnsdist_install_debug_symbols_package: True | ||
|
||
dnsdist_service_overrides: | ||
LimitCORE: infinity |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
--- | ||
|
||
- block: | ||
|
||
- name: Ensure the override directory exists (systemd) | ||
file: | ||
name: "/etc/systemd/system/dnsdist.service.d" | ||
state: directory | ||
owner: root | ||
group: root | ||
|
||
- name: Override the dnsdist unit (systemd) | ||
template: | ||
src: "override-service.systemd.conf.j2" | ||
dest: "/etc/systemd/system/dnsdist.service.d/override.conf" | ||
owner: root | ||
group: root | ||
notify: reload systemd and restart dnsdist | ||
|
||
when: dnsdist_service_overrides != {} | ||
and ansible_service_mgr == "systemd" | ||
|
||
- name: Add the dnsdist configuration | ||
template: | ||
src: dnsdist.conf.j2 | ||
dest: /etc/dnsdist/dnsdist.conf | ||
owner: "root" | ||
group: "root" | ||
mode: 0640 | ||
validate: dnsdist -C %s --check-config 2>&1 | ||
notify: restart dnsdist |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
[Service] | ||
{% for k, v in dnsdist_service_overrides.items() %} | ||
{{ k }}={{ v }} | ||
{% endfor %} |