ansible-role-cloudflare-ddns/tasks/main.yml

27 lines
634 B
YAML
Raw Permalink Normal View History

2022-08-23 10:45:57 +02:00
---
# tasks file for cloudflare_ddns
- name: Write cloudflare DDNS configuration
ansible.builtin.template:
src: "{{ item }}.j2"
dest: "{{ dns_volume_config }}/{{ item }}"
mode: '0644'
loop:
- "config.yaml"
tags:
- configuration
- name: Create the Dynamic DNS container
2022-08-26 01:20:32 +02:00
community.docker.docker_container:
2022-08-23 10:45:57 +02:00
name: "{{ dns_container_name }}"
image: "joshava/cloudflare-ddns:{{ dns_image_version }}"
recreate: yes
privileged: yes
volumes:
- "{{ dns_volume_config }}/config.yaml:/app/config.yaml:ro"
restart: yes
restart_policy: always
tags:
- exec
changed_when: false