mirror of
https://gitea.0xace.cc/ansible-galaxy/bird.git
synced 2024-11-24 23:56:38 +00:00
update role - fix loopback for el8
This commit is contained in:
parent
5de53a9171
commit
7a2bb34f17
@ -1,14 +1,19 @@
|
||||
---
|
||||
- name: restart bird
|
||||
- name: Restart BIRD
|
||||
systemd:
|
||||
name: bird
|
||||
state: restarted
|
||||
daemon_reload: yes
|
||||
|
||||
- name: restart loopback
|
||||
- name: Reload BIRD
|
||||
systemd:
|
||||
name: bird
|
||||
state: restarted
|
||||
daemon_reload: yes
|
||||
|
||||
- name: Restart loopback
|
||||
shell: |
|
||||
ifdown lo ; ifup lo
|
||||
|
||||
|
||||
- name: reload dummy interface
|
||||
- name: Reload dummy interface
|
||||
command: nmcli conn up lo0
|
||||
|
@ -1,24 +1,24 @@
|
||||
---
|
||||
- name: install bird
|
||||
- name: Install BIRD
|
||||
package:
|
||||
name: bird2
|
||||
state: present
|
||||
|
||||
- name: add bird config
|
||||
- name: Add BIRD config
|
||||
template:
|
||||
src: bird.conf.j2
|
||||
dest: /etc/bird.conf
|
||||
notify:
|
||||
- restart bird
|
||||
- reload bird
|
||||
|
||||
- name: update ifcfg-lo config
|
||||
- name: Update ifcfg-lo config
|
||||
template:
|
||||
src: ifcfg-lo.j2
|
||||
dest: /etc/sysconfig/network-scripts/ifcfg-lo
|
||||
notify:
|
||||
- restart loopback
|
||||
- Restart loopback
|
||||
|
||||
- name: start bird service
|
||||
- name: Start BIRD service
|
||||
systemd:
|
||||
name: bird
|
||||
state: started
|
||||
|
@ -1,30 +1,39 @@
|
||||
---
|
||||
- name: Install bird
|
||||
- name: Install BIRD
|
||||
package:
|
||||
name: bird
|
||||
state: present
|
||||
|
||||
- name: Add bird config
|
||||
- name: Add BIRD config
|
||||
template:
|
||||
src: bird.conf.j2
|
||||
dest: /etc/bird.conf
|
||||
notify:
|
||||
- restart bird
|
||||
- reload bird
|
||||
|
||||
- name: Add dummy interface and add IPs
|
||||
community.general.nmcli:
|
||||
type: lo0
|
||||
type: dummy
|
||||
conn_name: 'lo0'
|
||||
ip4: '{{ item.ip }}'
|
||||
gw4: '{{ item.gw }}'
|
||||
ip4: '{{ item.ip4 }}'
|
||||
state: present
|
||||
notify:
|
||||
- reload dummy interface
|
||||
loop: '{{ bird.bgp.static|subelements(networks[ansible_fqdn]) }}'
|
||||
loop: |
|
||||
[
|
||||
{% for protocol_static in bird.bgp.static %}
|
||||
{% for network in protocol_static['networks'][ansible_fqdn] %}
|
||||
{
|
||||
"ip4": "{{ network['ip'] + '/' + network['mask_dash'] }}"
|
||||
},
|
||||
{% endfor %}
|
||||
{% endfor %}
|
||||
]
|
||||
|
||||
- name: start bird service
|
||||
- name: Start BIRD service
|
||||
systemd:
|
||||
name: bird
|
||||
state: started
|
||||
enabled: yes
|
||||
daemon_reload: yes
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user