Compare commits

..

No commits in common. "5cd853ccd9ec2f2b231c0003f780e51437189e90" and "bc9371690b80514b60503ad939abd1e6901b6d22" have entirely different histories.

2 changed files with 30 additions and 22 deletions

View File

@ -13,18 +13,4 @@
# range "end" parameter is exclusive, so add 1
loop: "{{ range(1, (openqa_worker_count | int + 1)) | list }}"
ignore_errors: "{{ ansible_check_mode }}"
- name: Restart openqa services
ansible.builtin.systemd:
name: "{{ item }}"
state: restarted
loop: "{{ openqa_services }}"
ignore_errors: "{{ ansible_check_mode }}"
- name: Restart os-autoinst-openvswitch
ansible.builtin.systemd:
name: os-autoinst-openvswitch
state: restarted
enabled: true
ignore_errors: "{{ ansible_check_mode }}"
...

View File

@ -12,25 +12,46 @@
pkg:
- os-autoinst-openvswitch
- tunctl
- network-scripts
- name: Create /etc/sysconfig/os-autoinst-openvswitch
ansible.builtin.copy:
src: etc/sysconfig/os-autoinst-openvswitch.j2
dest: /etc/sysconfig/os-autoinst-openvswitch
mode: '0644'
notify: Restart os-autoinst-openvswitch
content: |
OS_AUTOINST_BRIDGE_LOCAL_IP=172.16.2.2
OS_AUTOINST_BRIDGE_REWRITE_TARGET=172.17.0.0
OS_AUTOINST_USE_BRIDGE={{ openqa_multivm_bridge_interface }}
notify: restart_os-autoinst-openvswitch
- name: Create bridge interface configuration
ansible.builtin.copy:
src: etc/sysconfig/network-scripts/ifcfg-br.j2
dest: /etc/sysconfig/network-scripts/ifcfg-{{ openqa_multivm_bridge_interface }}
mode: '0644'
content: |
DEVICETYPE='ovs'
TYPE='OVSBridge'
BOOTPROTO='static'
IPADDR='172.16.2.2'
NETMASK='255.254.0.0'
DEVICE={{ openqa_multivm_bridge_interface }}
STP=off
ONBOOT='yes'
NAME='{{ openqa_multivm_bridge_interface }}'
HOTPLUG='no'
- name: Create worker tap interface configs
ansible.builtin.copy:
src: etc/sysconfig/network-scripts/ifcfg-tap.j2
dest: /etc/sysconfig/network-scripts/ifcfg-tap{{ item }}
mode: '0644'
content: |
DEVICETYPE='ovs'
TYPE='OVSPort'
OVS_BRIDGE='{{ openqa_multivm_bridge_interface }}'
DEVICE='tap{{ item }}'
ONBOOT='yes'
BOOTPROTO='none'
HOTPLUG='no'
loop: "{{ range(openqa_worker_count) | list }}"
- name: Update /sbin/ifup-pre-local
@ -45,7 +66,7 @@
interface: '{{ openqa_multivm_bridge_interface }}'
state: enabled
zone: internal
notify: Reload firewalld
notify: reload_firewalld
- name: Enable masquerade for public and internal zones
ansible.posix.firewalld:
@ -56,7 +77,7 @@
loop:
- public
- internal
notify: Reload firewalld
notify: reload_firewalld
- name: Enable ipv4 IP forwarding
ansible.posix.sysctl:
@ -72,7 +93,7 @@
state: present
zone: public
target: ACCEPT
notify: Reload firewalld
notify: reload_firewalld
# Only needed for multi-host setups
- name: Add port for GRE tunnel
@ -88,6 +109,7 @@
enabled: true
loop:
- openvswitch
- network
- os-autoinst-openvswitch
ignore_errors: "{{ ansible_check_mode }}"
@ -99,7 +121,7 @@
value: qemu_x86_64,tap
state: present
mode: '0644'
notify: Restart openqa services
notify: restart_openqa_services
- name: Enable bridge interface for openvswitch
ansible.builtin.command: ovs-vsctl add-br {{ openqa_multivm_bridge_interface }}