ansible-role-server/tasks/dyndns.yml

25 lines
590 B
YAML
Raw Normal View History

---
# Server/Dyndns: Setup dynDNS Script
- name: dyndns - Install needed tools
become: yes
package:
name: curl
state: present
- name: dyndns - Copy dynDNS script
become: yes
template:
src: "{{ role_path }}/templates/ddns-hosts.sh"
dest: /usr/local/bin/ddns-hosts.sh
owner: "{{ ansible_user_id }}"
group: "{{ ansible_user_id }}"
mode: 0775
- name: "dyndns - Create cronjob for {{ ddns_domain }} dynDNS script"
become: yes
cron:
name: "{{ ddns_domain }} dynDNS"
minute: "*/5"
hour: "*"
job: "/usr/local/bin/ddns-hosts.sh > /dev/null"