From df46625d265bdbd74ce576c5aa70367960231324 Mon Sep 17 00:00:00 2001 From: ace Date: Mon, 25 Oct 2021 15:48:40 +0300 Subject: [PATCH] fix --- tasks/RedHat/8.yaml | 46 ++++++++++++++++++++++++++++----------------- 1 file changed, 29 insertions(+), 17 deletions(-) diff --git a/tasks/RedHat/8.yaml b/tasks/RedHat/8.yaml index 7685a7f..a900a55 100644 --- a/tasks/RedHat/8.yaml +++ b/tasks/RedHat/8.yaml @@ -1,4 +1,9 @@ --- +- name: Install network scripts + package: + name: network-scripts + state: present + - name: Install BIRD package: name: bird @@ -11,24 +16,31 @@ notify: - Reload BIRD -- name: Add dummy interface and add IPs - community.general.nmcli: - type: dummy - conn_name: "{{ dummy_iface | default('dummy0') }}" - ip4: '{{ item.ip4 }}' - state: present +- name: Update ifcfg-lo config + template: + src: ifcfg-lo.j2 + dest: /etc/sysconfig/network-scripts/ifcfg-lo 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 %} - ] + - 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 %} +# ] - name: Start BIRD service systemd: