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
|
2019-11-12 20:06:04 +00:00
|
|
|
- name: "dyndns - Create cronjob for {{ ddns_domain }} dynDNS script"
|
2019-10-06 20:55:56 +00:00
|
|
|
become: yes
|
|
|
|
cron:
|
2019-11-12 20:06:04 +00:00
|
|
|
name: "{{ ddns_domain }} dynDNS"
|
2019-10-06 20:55:56 +00:00
|
|
|
minute: "*/5"
|
|
|
|
hour: "*"
|
|
|
|
job: "/usr/local/bin/ddns-hosts.sh > /dev/null"
|