Files
kayobe/roles/kayobe-ci-prep/tasks/main.yml
Will Szumski 2829bf89f7 CI: Test kayobe_control_host_become
This change adds support for the kayobe_control_host_become variable to
CI jobs. This variable will cause any uses of become on localhost to
fail. This allows us to test that the kayobe_control_host_become
configuration variable has successfully removed all uses of become.

I've enabled this on a subset of jobs to get good test coverage.

Depends-On: https://review.opendev.org/c/openstack/kolla-ansible/+/949758
Change-Id: I6da98e055714f75112cf08ff8aa53dd84de2e425
2025-05-19 17:20:21 +01:00

41 lines
1.1 KiB
YAML

---
- block:
- name: Install dbus for debian system
apt:
name: dbus
- name: Install packages needed for unprivileged mode
apt:
name: "{{ item }}"
loop:
- libssl-dev
- python3-pip
- vim
when: not kayobe_control_host_become | bool
when:
- ansible_facts.os_family == 'Debian'
become: true
- block:
# NOTE(mgoddard): The CentOS image used in CI has epel-release installed,
# but the configure-mirrors role used by Zuul disables epel. We no longer
# install EPEL by default, but let's just be sure it's disabled.
- name: Ensure dnf-plugins-core is installed
package:
name: dnf-plugins-core
state: present
- name: Enable the EPEL repository
command: dnf config-manager --disable epel
- name: Install packages needed for unprivileged mode
package:
name: "{{ item }}"
state: present
loop:
- openssl-devel
when: not kayobe_control_host_become | bool
when: ansible_facts.os_family == 'RedHat'
become: true