-
Notifications
You must be signed in to change notification settings - Fork 42
/
main.yml
42 lines (34 loc) · 1.16 KB
/
main.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
---
#
# Compute Tasks for gathering facts
#
- name: Get ovs version
shell: ovs-vswitchd --version | grep vSwitch | awk {'print$4'}
register: ovs_version
- name: Set ovs version fact
set_fact:
openstack_ovs_version: "{{ ovs_version.stdout }}"
- name: Get neutron ovs agent ovsdb setting
command: crudini --get /etc/neutron/plugins/ml2/openvswitch_agent.ini ovs ovsdb_interface
register: ovsdb_status
ignore_errors: true
- name: Set Neutron OVS ovsdb fact
set_fact:
openstack_neutron_ovsdb: "{{ ovsdb_status.stdout }}"
when: (ovsdb_status.stdout.find('native') != -1 or ovsdb_status.stdout.find('vsctl') != -1)
- name: Set Neutron OVS ovsdb fact
set_fact:
openstack_neutron_ovsdb: "vsctl"
when: (ovsdb_status.stdout.find('native') == -1 and ovsdb_status.stdout.find('vsctl') == -1)
- name: Check for Nested Virtualization
shell: cat /proc/cpuinfo | grep hypervisor
register: nested_virt
ignore_errors: true
- name: Set Nested Virtualization flag
set_fact:
openstack_nested_virt: true
when: nested_virt.stdout != ""
- name: Set Nested Virtualization flag
set_fact:
openstack_nested_virt: false
when: nested_virt.stdout == ""