Dmitriy Rabotyagov 970fab180c Remove become blocks from tasks
As become is applied to most of the tasks in the role, let's remove
them and suggest applying become on the playbook level instead.
We do not have become applied on task level in any other managed
role.

This also helps to workaround PAM/apparmor issue with CentOS
in Docker for molecule test.

We also deal with an intermittent failures in Docker, as interface
naming/ordering is random and non-deterministic with no way of
controlling it.

Thus, instead of detecting an IP address by interface, we hardcode the
IP address both for containers and in FRR configurations.

Change-Id: I73471dd895eea5c6abfbec24681c796d5e7d813d
2025-04-02 12:24:07 +02:00

77 lines
2.1 KiB
YAML

---
dependency:
name: galaxy
# options:
# requirements-file: requirements.yml
# role-file: requirements.yml
driver:
name: docker
platforms:
- name: primary
groups:
- frr
image: "${DOCKER_REGISTRY:-quay.io/gotmax23}/${DOCKER_IMAGE_TAG:-debian-systemd:bookworm}"
command: ${DOCKER_COMMAND:-""}
privileged: true
pre_build_image: true
networks:
- name: frr
ipv4_address: 172.18.0.2
- name: noop
docker_networks:
- name: frr
ipam_config:
- subnet: 172.18.0.0/16
- name: noop
ipam_config:
- subnet: 192.168.1.0/24
- name: secondary
groups:
- frr
image: "${DOCKER_REGISTRY:-quay.io/gotmax23}/${DOCKER_IMAGE_TAG:-debian-systemd:bookworm}"
command: ${DOCKER_COMMAND:-""}
privileged: true
pre_build_image: true
networks:
- name: frr
ipv4_address: 172.18.0.3
provisioner:
name: ansible
lint:
name: ansible-lint
inventory:
host_vars:
primary:
frr_staticd_routes:
- ip route 10.0.0.0/24 192.168.1.10
frr_bgpd_config:
- router bgp 1234
- "bgp router-id 172.18.0.2"
- "neighbor 172.18.0.3 remote-as 5678"
- network 192.168.1.0/24
- address-family ipv4 unicast
- " neighbor 172.18.0.3 prefix-list pl-allowed-adv out"
- "exit-address-family"
- ip prefix-list pl-allowed-adv seq 5 permit 192.168.1.0/24
- ip prefix-list pl-allowed-adv seq 10 deny any
secondary:
frr_bgpd_config:
- router bgp 5678
- "bgp router-id 172.18.0.3"
- "neighbor 172.18.0.2 remote-as 1234"
- address-family ipv4 unicast
- " neighbor 172.18.0.2 prefix-list pl-allowed-adv in"
- exit-address-family
- ip prefix-list pl-allowed-adv seq 5 permit 192.168.1.0/24
- ip prefix-list pl-allowed-adv seq 10 deny any
playbooks:
prepare: prepare.yml
converge: playbook.yml
verify: verify.yml
config_options:
defaults:
inject_facts_as_vars: false
scenario:
name: default