--- - name: Ensure DNS stack directory exists file: path: "{{ dns_stack_path }}" state: directory mode: '0755' tags: - dns - name: Render CoreDNS configuration template: src: "{{ dns_corefile_template }}" dest: "{{ dns_stack_path }}/Corefile" owner: "{{ ansible_user }}" group: "{{ ansible_user }}" mode: '0644' tags: - dns - name: Deploy DNS stack community.docker.docker_compose_v2: project_src: "{{ dns_stack_path }}" state: present pull: always register: dns_compose_result tags: - dns - name: Record DNS deployment facts set_fact: dns_stack_changed: "{{ dns_compose_result.changed | default(false) }}" tags: - dns