-
Notifications
You must be signed in to change notification settings - Fork 26
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #66 from systemli/patch-1
Bump Integration Workflow to v1.0.0
- Loading branch information
Showing
6 changed files
with
59 additions
and
58 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,3 @@ | ||
--- | ||
skip_list: | ||
- fqcn-builtins | ||
- no-handler # Tasks that run when changed should likely be handlers. | ||
- no-handler # Tasks that run when changed should likely be handlers. |
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 |
---|---|---|
@@ -1,20 +1,19 @@ | ||
--- | ||
|
||
- name: Restart bind9 | ||
service: | ||
ansible.builtin.service: | ||
name: bind9 | ||
state: restarted | ||
|
||
- name: Reload bind9 | ||
service: | ||
ansible.builtin.service: | ||
name: bind9 | ||
state: reloaded | ||
|
||
- name: Restart monit | ||
service: | ||
ansible.builtin.service: | ||
name: monit | ||
state: restarted | ||
|
||
- name: Zone file change | ||
debug: | ||
ansible.builtin.debug: | ||
msg: "dummy handler" |
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 |
---|---|---|
@@ -1,29 +1,33 @@ | ||
--- | ||
- name: Determine if DDNS key already exists | ||
become: false | ||
delegate_to: localhost | ||
stat: | ||
ansible.builtin.stat: | ||
path: "{{ bind9_local_keydir }}/{{ item.update_keyfile }}.private" | ||
register: update_keyfile_tmp | ||
when: item.update_keyfile is defined | ||
|
||
- name: Generate DDNS key | ||
shell: "tsig-keygen -a {{ item.update_key_algorithm | d('hmac-sha512') }} {{ item.name }}_{{ item.update_keyfile }}_update > /etc/bind/keys/{{ item.update_keyfile }}.private" | ||
ansible.builtin.shell: "tsig-keygen -a {{ item.update_key_algorithm | d('hmac-sha512') }} {{ item.name }}_{{ item.update_keyfile }}_update > /etc/bind/keys/{{ item.update_keyfile }}.private" | ||
args: | ||
chdir: "{{ bind9_zonedir }}" | ||
register: ddns_key | ||
changed_when: ddns_key.rc != 0 | ||
when: item.update_keyfile is defined and not update_keyfile_tmp.stat.exists | ||
|
||
- name: Copy DDNS key to control host | ||
fetch: | ||
ansible.builtin.fetch: | ||
src: "/etc/bind/keys/{{ item.update_keyfile }}.private" | ||
dest: "{{ bind9_local_keydir }}/{{ item.update_keyfile }}.private" | ||
mode: "0640" | ||
flat: true | ||
when: ddns_key.changed | ||
|
||
- name: Create dummy DDNS public key file on control host | ||
become: false | ||
delegate_to: localhost | ||
file: | ||
ansible.builtin.file: | ||
path: "{{ bind9_local_keydir }}/{{ item.update_keyfile }}.key" | ||
mode: "0640" | ||
state: touch | ||
when: ddns_key.changed |
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
Oops, something went wrong.