48 lines
		
	
	
	
		
			902 B
		
	
	
	
		
			YAML
		
	
	
	
	
	
			
		
		
	
	
			48 lines
		
	
	
	
		
			902 B
		
	
	
	
		
			YAML
		
	
	
	
	
	
- name: Enable sysctl service
 | 
						|
  service:
 | 
						|
    name: sysctl
 | 
						|
    enabled: yes
 | 
						|
    runlevel: boot
 | 
						|
    state: started
 | 
						|
 | 
						|
- name: Enable community package repo
 | 
						|
  lineinfile:
 | 
						|
    path: /etc/apk/repositories
 | 
						|
    regexp: '^# *(http.*/v[^/]*/community)'
 | 
						|
    line: '\1'
 | 
						|
    backrefs: yes
 | 
						|
 | 
						|
- name: Install FRR
 | 
						|
  package:
 | 
						|
    name: frr,frr-pythontools
 | 
						|
    state: latest
 | 
						|
 | 
						|
- name: Set datacenter defaults
 | 
						|
  lineinfile:
 | 
						|
    path: /etc/frr/daemons
 | 
						|
    regexp: '^frr_profile='
 | 
						|
    line: 'frr_profile="datacenter"'
 | 
						|
  notify: restart frr
 | 
						|
 | 
						|
- name: Enable BGP and BFD
 | 
						|
  lineinfile:
 | 
						|
    path: /etc/frr/daemons
 | 
						|
    regexp: "^{{ item }}="
 | 
						|
    line: "{{ item }}=yes"
 | 
						|
  loop:
 | 
						|
    - bfdd
 | 
						|
    - bgpd
 | 
						|
  notify: restart frr
 | 
						|
 | 
						|
- name: Enable FRR service
 | 
						|
  service:
 | 
						|
    name: frr
 | 
						|
    enabled: yes
 | 
						|
    state: started
 | 
						|
 | 
						|
- name: Copy FRR config
 | 
						|
  template:
 | 
						|
    dest: /etc/frr/frr.conf
 | 
						|
    src: frr.conf.j2
 | 
						|
    mode: 0644
 | 
						|
  notify: reload frr
 |