@@ -9,12 +9,14 @@
when:
- not libvirt_session
- not only_verify_user|bool
+ tags: [ 'build-deps' ]
- name: Check if apparmor_status exists
stat:
path: /usr/sbin/apparmor_status
register: apparmor_file_stat_result
when: 'only_verify_user|bool'
+ tags: [ 'build-deps' ]
- name: Verify if AppArmor is disabled when applicable
become: yes
@@ -26,6 +28,7 @@
when:
- 'only_verify_user|bool'
- 'apparmor_file_stat_result.stat.exists'
+ tags: [ 'build-deps' ]
- name: Verifies user's effective group allows to run libvirt/kvm without being root
shell: groups | grep {{ item }}
@@ -41,9 +44,10 @@
when:
- not libvirt_session
- not only_verify_user|bool
+ tags: [ 'build-deps' ]
- name: Ensure our user is part of the libvirt/kvm groups
- tags: [ 'journal' ]
+ tags: [ 'journal', 'build-deps' ]
become: yes
become_flags: 'su - -c'
become_method: sudo
@@ -2,19 +2,23 @@
- name: Debian-specific set up
ansible.builtin.include_tasks: install-deps/debian/main.yml
when: ansible_os_family == 'Debian'
+ tags: [ 'build-deps' ]
- name: SuSE-specific set up
ansible.builtin.include_tasks: install-deps/suse/main.yml
when: ansible_os_family == 'Suse'
+ tags: [ 'build-deps' ]
- name: Red Hat-specific set up
ansible.builtin.include_tasks: install-deps/redhat/main.yml
when:
- ansible_os_family == 'RedHat'
- ansible_facts['distribution'] != "Fedora"
+ tags: [ 'build-deps' ]
- name: Fedora-specific set up
ansible.builtin.include_tasks: install-deps/fedora/main.yml
when:
- ansible_os_family == 'RedHat'
- ansible_facts['distribution'] == "Fedora"
+ tags: [ 'build-deps' ]
@@ -11,11 +11,18 @@
- name: Distribution specific setup
import_tasks: debian/main.yml
when: ansible_facts['os_family']|lower == 'debian'
+ tags: [ 'build-deps' ]
+
- import_tasks: suse/main.yml
when: ansible_facts['os_family']|lower == 'suse'
+ tags: [ 'build-deps' ]
+
- import_tasks: redhat/main.yml
when:
- ansible_facts['os_family']|lower == 'redhat'
- ansible_facts['distribution']|lower != "fedora"
+ tags: [ 'build-deps' ]
+
- import_tasks: fedora/main.yml
when: ansible_facts['distribution']|lower == "fedora"
+ tags: [ 'build-deps' ]
@@ -78,7 +78,7 @@ bringup_guestfs: $(GUESTFS_BRINGUP_DEPS)
playbooks/bringup_guestfs.yml \
-e 'ansible_python_interpreter=/usr/bin/python3' \
--extra-vars=@./extra_vars.yaml \
- --tags config-check,network
+ --tags config-check,network,build-deps
$(Q)$(TOPDIR)/scripts/bringup_guestfs.sh
$(Q)ansible-playbook $(ANSIBLE_VERBOSE) --connection=local \
--inventory localhost, \
Add build-deps tag to enable-user and install-deps tasks in libvirt_user role so they can be used from other roles. With no tags, these tasks are skipped. Signed-off-by: Joel Granados <joel.granados@kernel.org> --- playbooks/roles/libvirt_user/tasks/enable-user/debian/main.yml | 6 +++++- playbooks/roles/libvirt_user/tasks/enable-user/main.yml | 4 ++++ playbooks/roles/libvirt_user/tasks/install-deps/main.yml | 7 +++++++ scripts/guestfs.Makefile | 2 +- 4 files changed, 17 insertions(+), 2 deletions(-)