@@ -59,7 +59,6 @@
- name: Check dnsmasq service status
become: yes
- become_flags: 'su - -c'
become_method: sudo
command: systemctl is-enabled dnsmasq
register: dnsmasq_enabled
@@ -72,7 +71,6 @@
- name: Check if dnsmasq service is active
become: yes
- become_flags: 'su - -c'
become_method: sudo
command: systemctl is-active dnsmasq
register: dnsmasq_active
@@ -94,7 +92,6 @@
- name: Check if libvirt default network is running
become: yes
- become_flags: 'su - -c'
become_method: sudo
shell: virsh net-list | grep -q default
register: libvirt_default_net
@@ -106,7 +103,6 @@
- name: Start the libvirt default network if not running
command: virsh net-start default
become: yes
- become_flags: 'su - -c'
become_method: sudo
when:
- 'libvirt_uri_system|bool'
@@ -123,7 +119,6 @@
- name: Look for console.log files in guestfs subdirectories to check for CI enablement
become: yes
- become_flags: 'su - -c'
become_method: sudo
find:
paths: "{{ topdir_path }}/guestfs"
@@ -137,7 +132,6 @@
- name: Ensure console.log files are owned by the main user for CI monitoring
become: yes
- become_flags: 'su - -c'
become_method: sudo
file:
path: "{{ item.path }}"
@@ -49,7 +49,6 @@
- name: Ensure our user is part of the libvirt/kvm groups
tags: [ 'journal', 'build-deps' ]
become: yes
- become_flags: 'su - -c'
become_method: sudo
ansible.builtin.user:
name: "{{ ansible_user_id }}"
@@ -73,7 +73,7 @@ $(KDEVOPS_PROVISIONED_SSH):
$(Q)touch $(KDEVOPS_PROVISIONED_SSH)
bringup_guestfs: $(GUESTFS_BRINGUP_DEPS)
- $(Q)ansible-playbook $(ANSIBLE_VERBOSE) --connection=local \
+ $(Q)ansible-playbook -K $(ANSIBLE_VERBOSE) --connection=local \
--inventory localhost, \
playbooks/bringup_guestfs.yml \
-e 'ansible_python_interpreter=/usr/bin/python3' \
This patch does two things: * Remove the become_flags from sudo tasks in bringup_guestfs and libvirt_user roles * Call the playbook with the -K argument so the user enters the sudo password just once after the playbook call Signed-off-by: Joel Granados <joel.granados@kernel.org> --- playbooks/roles/bringup_guestfs/tasks/main.yml | 6 ------ playbooks/roles/libvirt_user/tasks/enable-user/debian/main.yml | 1 - scripts/guestfs.Makefile | 2 +- 3 files changed, 1 insertion(+), 8 deletions(-)