Follow ups to venv

Follow ups to Icd60aca084323cede944ee261d2cf5941b320e4b.

Change-Id: Id25a8b35ad42ee7f095098c210bc14926aec18ed
This commit is contained in:
Mark Goddard 2022-09-12 09:43:26 +01:00 committed by Radosław Piliszek
parent 3ced4bdb34
commit d0ded32016
2 changed files with 5 additions and 3 deletions

View File

@ -1,6 +1,6 @@
---
- name: Create Tenks venv
hosts: all
hosts: localhost:hypervisors
tags:
- host-setup
tasks:
@ -78,7 +78,6 @@
include_role:
name: virtualbmc-daemon
vars:
selinux_enabled: "{{ ansible_facts.selinux.status | default('disabled') == 'enabled' }}"
vbmcd_virtualenv_path: "{{ virtualenv_path }}"
vbmcd_python_upper_constraints_url: >-
{{ python_upper_constraints_url }}

View File

@ -76,8 +76,11 @@
become: true
command: "restorecon -r {{ vbmcd_virtualenv_path }}/bin"
when: sefcontext.changed
changed_when: true
when: selinux_enabled and vbmcd_virtualenv_path
when:
- ansible_facts.selinux.status | default('disabled') == 'enabled'
- vbmcd_virtualenv_path
- name: Ensure Virtual BMC systemd service is configured
template: