This commit is contained in:
parent
3707fa97e6
commit
f6df20e4e1
2 changed files with 37 additions and 31 deletions
|
|
@ -2,11 +2,6 @@
|
|||
- name: Include vars for {{ ansible_os_family }}
|
||||
include_vars: "{{ ansible_os_family }}.yml"
|
||||
|
||||
- name: "Ensure system is x86_64"
|
||||
fail:
|
||||
msg: "qemu-kvm requires a 64bit system architecture for now"
|
||||
when: "ansible_architecture != 'x86_64'"
|
||||
|
||||
- name: "Ensure system is hardware virtualization capability"
|
||||
fail:
|
||||
msg: "qemu-kvm requires hypervisor capability"
|
||||
|
|
@ -14,6 +9,16 @@
|
|||
|
||||
- name: Include tasks for {{ ansible_os_family }}
|
||||
include_tasks: "{{ ansible_os_family }}.yml"
|
||||
when:
|
||||
- ansible_distribution == 'CentOS'
|
||||
- ansible_distribution_major_version == '7'
|
||||
|
||||
- name: Enable a AppStream RHSM repository
|
||||
community.general.rhsm_repository:
|
||||
name: "rhel-8-for-{{ ansible_architecture }}-appstream-rpms"
|
||||
when:
|
||||
- ansible_distribution == "RedHat"
|
||||
- ansible_distribution_major_version == '8'
|
||||
|
||||
- name: install packages
|
||||
package:
|
||||
|
|
@ -30,7 +35,7 @@
|
|||
group: root
|
||||
mode: 0644
|
||||
|
||||
- name: Install Openvswitch
|
||||
- name: Install OpenVSwitch
|
||||
include_role:
|
||||
name: openvswitch
|
||||
# vars:
|
||||
|
|
@ -44,7 +49,7 @@
|
|||
name: "{{ libvirt_service }}"
|
||||
state: restarted
|
||||
|
||||
#- name: Add Openvswitch bridge
|
||||
#- name: Add OpenVSwitch bridge
|
||||
# openvswitch_bridge:
|
||||
# bridge: '{{ qemu_default_network_interface }}'
|
||||
# parent: '{{ openvswitch_interface }}'
|
||||
|
|
@ -81,7 +86,7 @@
|
|||
- default
|
||||
- private
|
||||
|
||||
- name: Add OpenVswitch networks
|
||||
- name: Add OpenVSwitch networks
|
||||
virt_net:
|
||||
command: define
|
||||
name: '{{ item.name }}'
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue