Doug Aaser f3cbed1d96 [AIR-209] Remove privilege escalation
This PS removes privilege escalation from the roles so that these roles
can be used in a developer environment

Change-Id: I44ddc18532ee75b0d398896d470ecf949ad4496a
2020-01-21 12:11:16 -05:00

33 lines
772 B
YAML

- name: Include test variables.
include_vars:
file: vars.yml
- name: install libvirt
include_role:
name: libvirt-install
- name: create pool
include_role:
name: libvirt-pool
- name: Create defined volumes
include_role:
name: libvirt-volume
with_items: "{{ libvirt_volumes }}"
vars:
libvirt_volume: "{{ vol }}"
volume_action: "{{ vol.action }}"
loop_control:
loop_var: vol
- name: save volume list
environment:
LIBVIRT_DEFAULT_URI: qemu:///system
command: virsh vol-list --pool {{ libvirt_pool.name }}
register: libvirt_pool_list
changed_when: false
- name: verify volumes exist
assert:
that:
- "vol.name in libvirt_pool_list.stdout"
with_items: "{{ libvirt_volumes }}"
loop_control:
loop_var: vol