65 lines
1.2 KiB
YAML
65 lines
1.2 KiB
YAML
- include_tasks: mgmt.yml
|
|
|
|
- name: Set up loopback interface
|
|
template:
|
|
dest: /etc/network/interfaces.d/loopback.intf
|
|
src: loopback.intf.j2
|
|
mode: 0644
|
|
notify: reload interfaces
|
|
|
|
- name: Set up fabric interfaces
|
|
template:
|
|
dest: /etc/network/interfaces.d/fabric.intf
|
|
src: fabric.intf.j2
|
|
mode: 0644
|
|
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: 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
|
|
|
|
- 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
|