diff options
| author | Jan Tuomi <jan@jantuomi.fi> | 2025-07-09 14:49:01 +0300 |
|---|---|---|
| committer | Jan Tuomi <jan@jantuomi.fi> | 2025-07-09 14:49:01 +0300 |
| commit | b062211887bda338f14cb663c2b3392a52d0df88 (patch) | |
| tree | 3dd9c3ae32b312c10854c05598a17313e3d6efd6 /tasks | |
| parent | 64f0adc8bb8d758c07fdd89b937466b1ab5ab43e (diff) | |
Add digitalocean dyndns rc script
Diffstat (limited to 'tasks')
| -rw-r--r-- | tasks/general.yml | 2 | ||||
| -rw-r--r-- | tasks/network.yml | 38 |
2 files changed, 40 insertions, 0 deletions
diff --git a/tasks/general.yml b/tasks/general.yml index 2131059..e9c1ef3 100644 --- a/tasks/general.yml +++ b/tasks/general.yml @@ -6,6 +6,8 @@ - rsync - nginx - dma + - jq + - curl - name: Set up periodic.conf template: diff --git a/tasks/network.yml b/tasks/network.yml index d68344d..45f44e6 100644 --- a/tasks/network.yml +++ b/tasks/network.yml @@ -104,3 +104,41 @@ owner: root group: wheel mode: "0644" + +- name: Set up /usr/local/etc/do_dyndns_auth + template: + src: usr_local_etc_do_dyndns_auth.j2 + dest: /usr/local/etc/do_dyndns_auth + owner: root + group: wheel + mode: "0600" + +- name: Set up /usr/local/bin/do_dyndns.sh + template: + src: usr_local_bin_do_dyndns.sh.j2 + dest: /usr/local/bin/do_dyndns.sh + owner: root + group: wheel + mode: "0755" + register: do_dyndns_sh + +- name: Set up /usr/local/etc/rc.d/do_dyndns + template: + src: usr_local_etc_rc.d_do_dyndns.j2 + dest: /usr/local/etc/rc.d/do_dyndns + owner: root + group: wheel + mode: "0755" + register: do_dyndns_rc + +- name: Start do_dyndns + service: + name: do_dyndns + state: started + register: do_dyndns_start + +- name: Restart do_dyndns + service: + name: do_dyndns + state: restarted + when: not do_dyndns_start.changed and (do_dyndns_sh.changed or do_dyndns_rc.changed) |
