--- - name: Install radvd package apt: name: 'radvd' state: 'latest' install_recommends: False - name: Create /etc/radvd.conf.d directory file: path: '/etc/radvd.conf.d' state: 'directory' owner: 'root' group: 'root' mode: '0755' - name: Create configuration header template: src: 'etc/radvd.conf.d/00_ansible.j2' dest: '/etc/radvd.conf.d/00_ansible' owner: 'root' group: 'root' mode: '0644' - name: Configure radvd interfaces template: src: 'etc/radvd.conf.d/interface.j2' dest: '/etc/radvd.conf.d/interface_{{ item.interface }}' owner: 'root' group: 'root' mode: '0644' with_items: radvd_interfaces - name: Assemble /etc/radvd.conf assemble: src: '/etc/radvd.conf.d' dest: '/etc/radvd.conf' owner: 'root' group: 'root' mode: '0644' notify: [ 'Test radvd and restart' ]