bird/tasks/RedHat/8.yaml

52 lines
1022 B
YAML
Raw Normal View History

2021-10-25 11:24:40 +00:00
---
2021-10-25 12:48:40 +00:00
- name: Install network scripts
package:
name: network-scripts
state: present
2021-10-25 12:26:23 +00:00
- name: Install BIRD
package:
2021-10-25 11:24:40 +00:00
name: bird
state: present
2021-10-25 12:48:40 +00:00
- name: Update ifcfg-lo config
template:
src: ifcfg-lo.j2
dest: /etc/sysconfig/network-scripts/ifcfg-lo
2021-10-25 11:24:40 +00:00
notify:
2021-10-25 12:48:40 +00:00
- Restart loopback
#- name: Add dummy interface and add IPs
# community.general.nmcli:
# type: dummy
# conn_name: "{{ dummy_iface | default('dummy0') }}"
# ip4: '{{ item.ip4 }}'
# state: present
# notify:
# - Reload dummy interface
# loop: |
# [
# {% for protocol_static in bird.bgp.static %}
# {% for network in protocol_static['networks'][ansible_fqdn] %}
# {
# "ip4": "{{ network['ip'] + '/' + network['mask_dash'] }}"
# },
# {% endfor %}
# {% endfor %}
# ]
2021-10-25 11:24:40 +00:00
2021-10-25 12:54:01 +00:00
- name: Add BIRD config
template:
src: bird.conf.j2
dest: /etc/bird.conf
notify:
- Reload BIRD
2021-10-25 12:26:23 +00:00
- name: Start BIRD service
2021-10-25 11:24:40 +00:00
systemd:
name: bird
state: started
enabled: yes
daemon_reload: yes
2021-10-25 12:26:23 +00:00