Dynamic DNS using YDNS for a Oracle Cloud instance
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

31 lines
676 B

---
- name: dynamic dns using ydns
hosts: ydns
become: yes
tasks:
- name: update repositories
ansible.builtin.apt:
cache_valid_time: 86400
update_cache: yes
- name: install dependencies
ansible.builtin.apt:
name:
- curl
- jq
state: present
- name: create updater script
ansible.builtin.template:
src: updater.sh.j2
dest: /root/updater.sh
owner: root
group: root
mode: '0700'
- name: add crontab for updater script
ansible.builtin.cron:
name: ydns updater
special_time: hourly
job: /root/updater.sh