-
Notifications
You must be signed in to change notification settings - Fork 52
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
rec: add copy files for *-from-file configuration directives #94
Changes from 3 commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -48,8 +48,33 @@ | |
state: directory | ||
owner: "{{ pdns_rec_file_owner }}" | ||
group: "{{ pdns_rec_file_group }}" | ||
mode: 0750 | ||
mode: "{{ pdns_rec_config_include_dir_mode }}" | ||
when: "pdns_rec_config['include-dir'] is defined" | ||
register: _pdns_recursor_configuration_include_dir | ||
npmdnl marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
- block: | ||
|
||
- name: Ensure that the PowerDNS Recursor configuration from-files directory exists | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. wrong indentation There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The block indentation require some extra indentation of tasks inside it. |
||
ansible.builtin.file: | ||
name: "{{ item.dest | dirname }}" | ||
state: directory | ||
owner: "{{ pdns_rec_file_owner }}" | ||
group: "{{ pdns_rec_file_group }}" | ||
mode: "{{ pdns_rec_config_from_files_dir_mode }}" | ||
loop: "{{ pdns_rec_config_from_files }}" | ||
|
||
- name: Copy the PowerDNS Recursor configuration from-files files | ||
ansible.builtin.copy: | ||
content: "{{ item.content | default(omit) }}" | ||
src: "{{ item.src | default(omit) }}" | ||
dest: "{{ item.dest }}" | ||
owner: "{{ pdns_rec_file_owner }}" | ||
group: "{{ pdns_rec_file_group }}" | ||
mode: "{{ pdns_rec_config_from_files_dir_mode }}" | ||
loop: "{{ pdns_rec_config_from_files }}" | ||
register: _pdns_recursor_configuration_from_files | ||
|
||
when: "pdns_rec_config_from_files | length > 0" | ||
|
||
- name: Generate the PowerDNS Recursor Lua config-file | ||
copy: | ||
|
@@ -79,6 +104,8 @@ | |
when: not pdns_rec_disable_handlers | ||
and pdns_rec_service_state != 'stopped' | ||
and (_pdns_recursor_override_unit.changed | ||
or _pdns_recursor_configuration_include_dir.changed | ||
or _pdns_recursor_configuration.changed | ||
or _pdns_recursor_configuration_from_files.changed | ||
or _pdns_recursor_lua_file_configuraton.changed | ||
or _pdns_recursor_dns_script_configuration.changed) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
allows changing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed.