2023-07-19 12:06:35 +00:00
|
|
|
- include_tasks: mgmt.yml
|
2023-04-19 17:15:44 +00:00
|
|
|
|
|
|
|
- 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
|
2023-04-19 17:15:44 +00:00
|
|
|
|
|
|
|
- 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
|
2023-04-19 17:15:44 +00:00
|
|
|
|
2023-07-19 12:06:35 +00:00
|
|
|
- name: Set hostname
|
|
|
|
hostname:
|
|
|
|
name: '{{ inventory_hostname }}'
|
2023-04-19 17:15:44 +00:00
|
|
|
|
|
|
|
- name: Set up resolv.conf
|
|
|
|
template:
|
|
|
|
dest: /etc/resolv.conf
|
|
|
|
src: resolv.conf.j2
|
|
|
|
mode: 0644
|
|
|
|
|
2023-11-18 18:44:00 +00:00
|
|
|
- name: Set up debian repositories
|
|
|
|
template:
|
|
|
|
dest: /etc/apt/sources.list
|
|
|
|
src: sources.list.j2
|
|
|
|
mode: 0644
|
|
|
|
notify: update package cache
|
|
|
|
when: debian_release is defined
|
|
|
|
|
|
|
|
- meta: flush_handlers
|
|
|
|
|
2023-04-19 17:15:44 +00:00
|
|
|
- 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
|