Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci: Fix dnf5 issues and add passlib #99

Merged
merged 3 commits into from
Jun 7, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion .github/actions/install-dependencies/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ runs:
- name: Install packages
shell: bash
run: |
sudo pip3 install ansible
sudo pip3 install ansible passlib
sudo apt-get update
sudo apt-get install -y podman docker-compose

Expand All @@ -15,6 +15,8 @@ runs:
run: |
podman --version
crun --version
ansible --version
ansible-config dump --only-changed -t all

- name: Workaround https://github.com/actions/runner-images/issues/7753
shell: bash
Expand Down
38 changes: 30 additions & 8 deletions src/ansible/roles/packages/tasks/Fedora.yml
Original file line number Diff line number Diff line change
Expand Up @@ -67,11 +67,12 @@

- name: Install extended set of packages
block:
- name: Install additional repositories
shell: |
dnf config-manager --add-repo {{ item }}
with_items:
- https://cli.github.com/packages/rpm/gh-cli.repo
- name: Add gh-cli.repo repo
ansible.builtin.get_url:
url: https://cli.github.com/packages/rpm/gh-cli.repo
dest: /etc/yum.repos.d/gh-cli.repo
mode: '0644'

- name: Install additional packages
dnf:
state: present
Expand Down Expand Up @@ -123,11 +124,32 @@
name:
- nfs-utils
- realmd
- oddjob
- oddjob-mkhomedir
- adcli
- sssd
- sssd-*
- 'sssd-*'
register: pkg_install

- name: Check installed packages
ansible.builtin.package_facts:

# ansible dnf5 seems to have a regression with wildcard *
# https://github.com/ansible/ansible/issues/83373
- name: Install sssd subpackages
command: yum install -y 'sssd-*'
register: sssd_install
when: "'sssd-ad' not in ansible_facts.packages"

- name: Show installed sssd packages
ansible.builtin.debug:
var: pkg_install

- name: Install debug information for selected packages
command: dnf debuginfo-install -y {{ item }}
dnf:
enablerepo: '*-debug*'
name: '{{ item }}-debuginfo'
state: present
with_items:
- dbus
- glibc
Expand Down Expand Up @@ -260,7 +282,7 @@
- name: Install additional packages for client development image
block:
- name: Install SSSD build dependencies
command: dnf build-dep -y sssd
command: dnf builddep -y sssd

- name: Install packages required for integration tests
dnf:
Expand Down
4 changes: 2 additions & 2 deletions src/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -68,9 +68,9 @@ function base_install_python {
fi
fi

# Remove dnf-5 to workaround many issues that yet needs to be fixed
# Add python3-dnf5 to enable ansible to use it
if base_exec '[ -f /usr/bin/dnf5 ]'; then
base_exec 'dnf install -y python3-dnf && dnf remove -y dnf5 && ln -s /usr/bin/dnf-3 /usr/bin/dnf && ln -s /usr/bin/dnf-3 /usr/bin/yum && dnf clean all'
base_exec 'dnf install -y python3-libdnf5 dnf5-plugins'
fi
}

Expand Down
Loading