servers/roles/debian/tasks/main.yml

55 lines
1 KiB
YAML
Raw Normal View History

- include_tasks: mgmt.yml
- name: Set up loopback interface
template:
dest: /etc/network/interfaces.d/loopback.intf
src: loopback.intf.j2
mode: 0644
2023-06-05 15:51:50 +00:00
notify: reload interfaces
- name: Set up fabric interfaces
template:
dest: /etc/network/interfaces.d/fabric.intf
src: fabric.intf.j2
mode: 0644
2023-06-05 15:51:50 +00:00
notify: reload interfaces
- name: Set hostname
hostname:
name: '{{ inventory_hostname }}'
- name: Set up resolv.conf
template:
dest: /etc/resolv.conf
src: resolv.conf.j2
mode: 0644
- name: Install essential packages
package: name=git,rsync,vim,tmux
- name: Install FRR
package: name=frr,frr-pythontools
- name: Enable BGP and BFD
lineinfile:
path: /etc/frr/daemons
regexp: "^{{ item }}="
line: "{{ item }}=yes"
loop:
- bfdd
- bgpd
notify: restart frr
- name: Copy FRR config
template:
dest: /etc/frr/frr.conf
src: frr.conf.j2
mode: 0644
notify: reload frr
- name: Enable FRR service
service:
name: frr
enabled: yes
notify: restart frr