- name: Remove old configuration hosts: localhost connection: local gather_facts: False tasks: - file: path: files state: absent changed_when: False - name: Generate Bird configuration hosts: tnet_bird connection: local gather_facts: False tasks: - file: path: files/{{ inventory_hostname }} state: directory changed_when: False - template: src: "{{ item }}.j2" dest: "files/{{ inventory_hostname }}/{{ item }}" loop: - bird-tnet-pre.conf - bird-tnet.conf