2019-10-06 20:55:56 +00:00
|
|
|
---
|
|
|
|
# Server/Dyndns: Setup dynDNS Script
|
|
|
|
|
|
|
|
- name: dyndns - Install needed tools
|
|
|
|
become: yes
|
|
|
|
package:
|
|
|
|
name: curl
|
|
|
|
state: present
|
|
|
|
|
2019-11-12 20:06:04 +00:00
|
|
|
- name: dyndns - Copy dynDNS script
|
2019-10-06 20:55:56 +00:00
|
|
|
become: yes
|
2019-11-12 20:06:04 +00:00
|
|
|
template:
|
|
|
|
src: "{{ role_path }}/templates/ddns-hosts.sh"
|
2019-10-06 20:55:56 +00:00
|
|
|
dest: /usr/local/bin/ddns-hosts.sh
|
|
|
|
owner: "{{ ansible_user_id }}"
|
|
|
|
group: "{{ ansible_user_id }}"
|
|
|
|
mode: 0775
|
2021-05-08 16:22:48 +00:00
|
|
|
- name: "dyndns - Create cronjob for {{ ddns_zone }} dynDNS script"
|
2019-10-06 20:55:56 +00:00
|
|
|
become: yes
|
|
|
|
cron:
|
2021-05-08 16:22:48 +00:00
|
|
|
name: "{{ ddns_zone }} dynDNS"
|
2019-10-06 20:55:56 +00:00
|
|
|
minute: "*/5"
|
|
|
|
hour: "*"
|
2019-12-31 20:32:44 +00:00
|
|
|
job: "/usr/local/bin/ddns-hosts.sh > /dev/null{% if ddns_silence is defined and ddns_silence is sameas true %} 2>&1{% endif %}"
|