diff --git a/tripleo_ansible/roles/tripleo_network_config/molecule/default/converge.yml b/tripleo_ansible/roles/tripleo_network_config/molecule/default/converge.yml index d289d3028..1452c20cc 100644 --- a/tripleo_ansible/roles/tripleo_network_config/molecule/default/converge.yml +++ b/tripleo_ansible/roles/tripleo_network_config/molecule/default/converge.yml @@ -23,36 +23,36 @@ tripleo_network_config_manage_service: false tripleo_network_config_hide_sensitive_logs: false local_mtu: 1500 - ctlplane_ip: 192.168.24.1 + ctlplane_ip: 203.0.113.1 ctlplane_subnet_cidr: 24 ctlplane_host_routes: [] ctlplane_dns_nameservers: [] dns_search_domains: [] - neutron_public_interface_name: tap0 + neutron_public_interface_name: dummy0 deployed_server_port_map: control_virtual_ip: fixed_ips: - - ip_address: 192.168.24.3 + - ip_address: 203.0.113.3 network: tags: - - 192.168.24.0/24 + - 203.0.113.0/24 subnets: - - cidr: 192.168.24.0/24 + - cidr: 203.0.113.0/24 public_virtual_ip: fixed_ips: - - ip_address: 192.168.24.1 + - ip_address: 203.0.113.1 network: tags: - - 192.168.24.0/24 + - 203.0.113.0/24 subnets: - - cidr: 192.168.24.0/24 + - cidr: 203.0.113.0/24 standalone-ctlplane: fixed_ips: - - ip_address: 192.168.24.1 + - ip_address: 203.0.113.1 network: tags: - - 192.168.24.0/24 + - 203.0.113.0/24 subnets: - - cidr: 192.168.24.0/24 + - cidr: 203.0.113.0/24 roles: - role: "tripleo_network_config" diff --git a/tripleo_ansible/roles/tripleo_network_config/molecule/default/molecule.yml b/tripleo_ansible/roles/tripleo_network_config/molecule/default/molecule.yml index 6c5114e83..402a92566 100644 --- a/tripleo_ansible/roles/tripleo_network_config/molecule/default/molecule.yml +++ b/tripleo_ansible/roles/tripleo_network_config/molecule/default/molecule.yml @@ -1,48 +1,44 @@ --- driver: - name: podman + name: delegated + options: + managed: false + login_cmd_template: >- + ssh + -o UserKnownHostsFile=/dev/null + -o StrictHostKeyChecking=no + -o Compression=no + -o TCPKeepAlive=yes + -o VerifyHostKeyDNS=no + -o ForwardX11=no + -o ForwardAgent=no + {instance} + ansible_connection_options: + ansible_connection: ssh log: true platforms: - - name: ubi8 - hostname: ubi8 - image: ubi8/ubi:8.2 - registry: - url: registry.access.redhat.com - dockerfile: Dockerfile - pkg_extras: python*setuptools - volumes: - - /etc/ci/mirror_info.sh:/etc/ci/mirror_info.sh:ro - - /etc/pki/rpm-gpg:/etc/pki/rpm-gpg - - /opt/yum.repos.d:/etc/yum.repos.d:rw - privileged: true - environment: &env - http_proxy: "{{ lookup('env', 'http_proxy') }}" - https_proxy: "{{ lookup('env', 'https_proxy') }}" - ulimits: &ulimit - - host + - name: instance provisioner: inventory: hosts: all: hosts: - ubi8: - ansible_python_interpreter: /usr/bin/python3 + instance: + ansible_host: localhost name: ansible log: true env: ANSIBLE_STDOUT_CALLBACK: yaml + ANSIBLE_ROLES_PATH: "${ANSIBLE_ROLES_PATH}:${HOME}/zuul-jobs/roles" scenario: test_sequence: - - destroy - - create - prepare - converge - check - - destroy verifier: name: testinfra diff --git a/tripleo_ansible/roles/tripleo_network_config/molecule/default/prepare.yml b/tripleo_ansible/roles/tripleo_network_config/molecule/default/prepare.yml index dd0156fc4..5942d7b22 100644 --- a/tripleo_ansible/roles/tripleo_network_config/molecule/default/prepare.yml +++ b/tripleo_ansible/roles/tripleo_network_config/molecule/default/prepare.yml @@ -23,8 +23,12 @@ vars: test_deps_setup_tripleo: true - name: Ensure legacy scripts installed + become: true package: name: network-scripts state: present when: - ansible_facts['distribution_major_version'] is version('8', '==') + - name: Create a dummy network interface + become: true + command: "ip link add dummy0 type dummy" diff --git a/tripleo_ansible/roles/tripleo_network_config/tasks/main.yml b/tripleo_ansible/roles/tripleo_network_config/tasks/main.yml index addc844c2..dade91349 100644 --- a/tripleo_ansible/roles/tripleo_network_config/tasks/main.yml +++ b/tripleo_ansible/roles/tripleo_network_config/tasks/main.yml @@ -101,5 +101,5 @@ - (tripleo_network_config_action == "CREATE") or ("UPDATE" in tripleo_network_config_network_deployment_actions) or (os_net_config_returncode_stat.stat.exists and - ((os_net_config_returncode_slurp.content | b64decode) != 0)) or + ((os_net_config_returncode_slurp.content | b64decode | int) != 0)) or (not os_net_config_returncode_stat.stat.exists)