--- - name: configure tunnel on eae-adp-jump01 hosts: eae-adp-jump01 tasks: - name: create wg0 interface file template: src: templates/hostname.wg0 dest: /etc/hostname.wg0 mode: 0600 notify: - reload interfaces - name: create pf.wg0.conf file copy: src: files/pf.wg0.conf dest: /etc/pf.wg0.conf mode: 0600 notify: - reload firewall - name: include pf.wg0.conf in pf.include.conf lineinfile: path: /etc/pf.include.conf line: 'include "/etc/pf.wg0.conf"' notify: - reload firewall - name: create ospfd.conf copy: src: files/ospfd.conf dest: /etc/ospfd.conf mode: 0600 validate: "/usr/sbin/ospfd -n -f %s" notify: - restart ospfd - name: enable ospfd service: name: ospfd state: started enabled: yes handlers: - name: reload firewall command: pfctl -vf /etc/pf.conf - name: reload interfaces command: sh /etc/netstart - name: restart ospfd service: name: ospfd state: restart