ansible-nas/roles/route53_ddns/tasks/main.yml
Webster Mudge ea91f72744
Add CRON schedule to route53-ddns service
Signed-off-by: Webster Mudge <wmudge@gmail.com>
2022-08-03 18:35:19 -04:00

25 lines
721 B
YAML

---
- name: Create AWS Route53 Dynamic DNS Directories
file:
path: "{{ route53_data_directory }}"
state: directory
- name: Generate AWS Route53 Dynamic DNS config file
template:
src: config.yml
dest: "{{ route53_data_directory }}/ddns-route53.yml"
register: template_config
- name: AWS Route53 Dynamic DNS Container
docker_container:
name: route53-ddns
image: crazymax/ddns-route53:latest
pull: true
env:
SCHEDULE: "{{ route53_schedule | string }}"
volumes:
- "{{ route53_data_directory }}/ddns-route53.yml:/etc/ddns-route53/ddns-route53.yml"
restart_policy: unless-stopped
memory: "{{ route53_memory }}"
recreate: "{{ template_config is changed }}"