From b062211887bda338f14cb663c2b3392a52d0df88 Mon Sep 17 00:00:00 2001 From: Jan Tuomi Date: Wed, 9 Jul 2025 14:49:01 +0300 Subject: Add digitalocean dyndns rc script --- tasks/general.yml | 2 ++ tasks/network.yml | 38 ++++++++++++++++++++++++++++++++++++++ 2 files changed, 40 insertions(+) (limited to 'tasks') 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) -- cgit v1.3