diff --git a/.github/actions/install-dependencies/action.yml b/.github/actions/install-dependencies/action.yml index 2be63b2..d0b0d8a 100644 --- a/.github/actions/install-dependencies/action.yml +++ b/.github/actions/install-dependencies/action.yml @@ -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 @@ -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 diff --git a/src/ansible/roles/packages/tasks/Fedora.yml b/src/ansible/roles/packages/tasks/Fedora.yml index c3aed92..45f563b 100644 --- a/src/ansible/roles/packages/tasks/Fedora.yml +++ b/src/ansible/roles/packages/tasks/Fedora.yml @@ -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 @@ -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 @@ -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: diff --git a/src/build.sh b/src/build.sh index 9cc60dd..18b9bda 100755 --- a/src/build.sh +++ b/src/build.sh @@ -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 }