This repository has been archived on 2024-05-11. You can view files and clone it, but cannot push or open issues or pull requests.
eae-am-deutschen-platz/playbook_provision_backbone...

54 lines
1.1 KiB
YAML

---
- 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