Skip to content
Permalink
master
Switch branches/tags
Go to file
 
 
Cannot retrieve contributors at this time
---
- name: Add upstream repo
block:
- name: Install FRR apt repo key
apt_key:
url: https://deb.frrouting.org/frr/keys.asc
state: present
become: true
register: add_repository_key
ignore_errors: true
- name: Ensure curl & gnupg is present (on older systems without SNI).
package:
name:
- curl
- gnupg
state: present
become: true
when: add_repository_key is failed
- name: Add FRR apt key (alternative for older systems without SNI).
shell: |
set -o pipefail
curl -sSL https://deb.frrouting.org/frr/keys.asc | sudo apt-key add -
args:
warn: false
executable: "/bin/bash"
become: true
when: add_repository_key is failed
- name: Ensure apt-transport-https is present to enable https repositories
package:
name: apt-transport-https
state: present
become: true
- name: Install FRR apt repo
apt_repository:
repo: "{{ frr_apt_repository }}"
state: present
mode: "0644"
when: frr_use_upstream_repo_debian
- name: Remove upstream repo
apt_repository:
repo: "{{ frr_apt_repository }}"
state: absent
update_cache: true
become: true
when: frr_use_upstream_repo_debian | bool == false
- name: Remove Quagga
package:
name: quagga
state: absent
become: true
- name: Install FRR
package:
name:
- frr
- python-ipaddr
- frr-pythontools
state: latest # noqa 403
become: true
notify:
- restart frr
- name: debian | Touch FRR reload log
file:
path: /var/log/frr/frr-reload.log
state: touch
owner: frr
group: frr
mode: 0644
modification_time: preserve
access_time: preserve
become: true
- name: stat defaut config
stat:
path: /etc/default/frr
register: conf_stat
when:
- frr_version > "6.0"
- name: Remove old /etc/default/frr
file:
path: "{{ item }}"
state: absent
notify:
- restart frr
- start frr
when:
- frr_version > "6.0"
with_items:
- /etc/default/frr