[#75] functionality to set libvirt sec driver

With this change libvirt securty driver will be set to none,
also small fix to ignore errors during connection reset, this will
allow to run roles with connection_local

Change-Id: I0cbe7a465ce2e21aa23bde2aa7c1adb9f5f09cda
This commit is contained in:
Kostiantyn Kalynovskyi 2020-03-02 18:17:39 -06:00
parent f66f94dc80
commit d254771350
5 changed files with 20 additions and 1 deletions
roles
airship-libvirt-gate/tasks
libvirt-install
zuul.d

@ -10,6 +10,10 @@
- name: install libvirt
include_role:
name: libvirt-install
tasks_from: "{{ item }}"
with_items:
- main
- configure
- name: create pool
include_role:

@ -0,0 +1 @@
libvirt_qemu_config_file: /etc/libvirt/qemu.conf

@ -0,0 +1,13 @@
- name: configure libvirt
become: true
block:
- name: Set libvirt security driver
lineinfile:
path: "{{ libvirt_qemu_config_file }}"
state: present
regexp: '^\s*security_driver\s*=.*$'
line: "security_driver = \"{{ libvirt_security_driver | default('none') }}\""
- name: libvirtd restarted
service:
name: libvirtd
state: restarted

@ -38,6 +38,7 @@
append: yes
- name: Reset ssh connection to allow user changes to affect "{{ ansible_user }}"
meta: reset_connection
ignore_errors: true
- name: Start libvirtd
service:
name: libvirtd

@ -61,7 +61,7 @@
- playbooks/airship-airshipctl-build-gate.yaml
post-run: playbooks/airship-collect-logs.yaml
run: playbooks/airship-airshipctl-test-runner.yaml
nodeset: airship-airshipctl-single-16GB-bionic-node
nodeset: airship-airshipctl-single-32GB-bionic-node
vars:
site_name: test-bootstrap
## var files are the files that are located at playbooks/vars directory