Compare commits
No commits in common. "5cd853ccd9ec2f2b231c0003f780e51437189e90" and "bc9371690b80514b60503ad939abd1e6901b6d22" have entirely different histories.
5cd853ccd9
...
bc9371690b
@ -13,18 +13,4 @@
|
|||||||
# range "end" parameter is exclusive, so add 1
|
# range "end" parameter is exclusive, so add 1
|
||||||
loop: "{{ range(1, (openqa_worker_count | int + 1)) | list }}"
|
loop: "{{ range(1, (openqa_worker_count | int + 1)) | list }}"
|
||||||
ignore_errors: "{{ ansible_check_mode }}"
|
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 }}"
|
|
||||||
...
|
...
|
||||||
|
@ -12,25 +12,46 @@
|
|||||||
pkg:
|
pkg:
|
||||||
- os-autoinst-openvswitch
|
- os-autoinst-openvswitch
|
||||||
- tunctl
|
- tunctl
|
||||||
|
- network-scripts
|
||||||
|
|
||||||
- name: Create /etc/sysconfig/os-autoinst-openvswitch
|
- name: Create /etc/sysconfig/os-autoinst-openvswitch
|
||||||
ansible.builtin.copy:
|
ansible.builtin.copy:
|
||||||
src: etc/sysconfig/os-autoinst-openvswitch.j2
|
|
||||||
dest: /etc/sysconfig/os-autoinst-openvswitch
|
dest: /etc/sysconfig/os-autoinst-openvswitch
|
||||||
mode: '0644'
|
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
|
- name: Create bridge interface configuration
|
||||||
ansible.builtin.copy:
|
ansible.builtin.copy:
|
||||||
src: etc/sysconfig/network-scripts/ifcfg-br.j2
|
|
||||||
dest: /etc/sysconfig/network-scripts/ifcfg-{{ openqa_multivm_bridge_interface }}
|
dest: /etc/sysconfig/network-scripts/ifcfg-{{ openqa_multivm_bridge_interface }}
|
||||||
mode: '0644'
|
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
|
- name: Create worker tap interface configs
|
||||||
ansible.builtin.copy:
|
ansible.builtin.copy:
|
||||||
src: etc/sysconfig/network-scripts/ifcfg-tap.j2
|
|
||||||
dest: /etc/sysconfig/network-scripts/ifcfg-tap{{ item }}
|
dest: /etc/sysconfig/network-scripts/ifcfg-tap{{ item }}
|
||||||
mode: '0644'
|
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 }}"
|
loop: "{{ range(openqa_worker_count) | list }}"
|
||||||
|
|
||||||
- name: Update /sbin/ifup-pre-local
|
- name: Update /sbin/ifup-pre-local
|
||||||
@ -45,7 +66,7 @@
|
|||||||
interface: '{{ openqa_multivm_bridge_interface }}'
|
interface: '{{ openqa_multivm_bridge_interface }}'
|
||||||
state: enabled
|
state: enabled
|
||||||
zone: internal
|
zone: internal
|
||||||
notify: Reload firewalld
|
notify: reload_firewalld
|
||||||
|
|
||||||
- name: Enable masquerade for public and internal zones
|
- name: Enable masquerade for public and internal zones
|
||||||
ansible.posix.firewalld:
|
ansible.posix.firewalld:
|
||||||
@ -56,7 +77,7 @@
|
|||||||
loop:
|
loop:
|
||||||
- public
|
- public
|
||||||
- internal
|
- internal
|
||||||
notify: Reload firewalld
|
notify: reload_firewalld
|
||||||
|
|
||||||
- name: Enable ipv4 IP forwarding
|
- name: Enable ipv4 IP forwarding
|
||||||
ansible.posix.sysctl:
|
ansible.posix.sysctl:
|
||||||
@ -72,7 +93,7 @@
|
|||||||
state: present
|
state: present
|
||||||
zone: public
|
zone: public
|
||||||
target: ACCEPT
|
target: ACCEPT
|
||||||
notify: Reload firewalld
|
notify: reload_firewalld
|
||||||
|
|
||||||
# Only needed for multi-host setups
|
# Only needed for multi-host setups
|
||||||
- name: Add port for GRE tunnel
|
- name: Add port for GRE tunnel
|
||||||
@ -88,6 +109,7 @@
|
|||||||
enabled: true
|
enabled: true
|
||||||
loop:
|
loop:
|
||||||
- openvswitch
|
- openvswitch
|
||||||
|
- network
|
||||||
- os-autoinst-openvswitch
|
- os-autoinst-openvswitch
|
||||||
ignore_errors: "{{ ansible_check_mode }}"
|
ignore_errors: "{{ ansible_check_mode }}"
|
||||||
|
|
||||||
@ -99,7 +121,7 @@
|
|||||||
value: qemu_x86_64,tap
|
value: qemu_x86_64,tap
|
||||||
state: present
|
state: present
|
||||||
mode: '0644'
|
mode: '0644'
|
||||||
notify: Restart openqa services
|
notify: restart_openqa_services
|
||||||
|
|
||||||
- name: Enable bridge interface for openvswitch
|
- name: Enable bridge interface for openvswitch
|
||||||
ansible.builtin.command: ovs-vsctl add-br {{ openqa_multivm_bridge_interface }}
|
ansible.builtin.command: ovs-vsctl add-br {{ openqa_multivm_bridge_interface }}
|
||||||
|
Loading…
Reference in New Issue
Block a user