- name: setup unbound gather_facts: no hosts: "{{target}}" become: "{{become_var}}" tasks: - include_tasks: ../../includes/set-cores.yml - name: deploy configs into /usr/local/etc/unbound/ template: src: "{{item}}" dest: /usr/local/etc/unbound/{{ item | basename }} mode: "0644" # no credentials so far with_items: "{{ 'templates_etc_unbound/*' | fileglob }}" notify: reload unbound handlers: - name: reload unbound shell: executable: /bin/bash cmd: "systemctl reload unbound.service 2>/dev/null || /etc/rc.d/unbound reload"