From: Anil Belur Date: Fri, 12 Dec 2025 07:16:57 +0000 (+1000) Subject: fix: Remove CS9 support and update Ubuntu 24.04 X-Git-Url: https://gerrit.linuxfoundation.org/infra/gitweb?a=commitdiff_plain;h=03ecda81bdd2ae92b75160f2b8762a3fd08a4213;p=ansible%2Froles%2Fhaveged-install.git fix: Remove CS9 support and update Ubuntu 24.04 - Remove CentOS Stream 9 from platforms (haveged not available) - Update to Ubuntu 22.04 and 24.04 only - Simplify tasks (remove RedHat-specific logic) - Update molecule configuration with inject_facts_as_vars: false - Update prepare.yml to use ansible_facts dictionary - Add ansible.cfg file - Remove EOL platforms (CentOS 7/8, Ubuntu 18.04/20.04) - Update README with CentOS 9 limitation note - Update GitHub Actions workflow matrix Change-Id: I92a64691c9b0439fc2a62f14825dafdf386f6d4d Signed-off-by: Anil Belur --- diff --git a/.github/workflows/gerrit-verify.yaml b/.github/workflows/gerrit-verify.yaml index 9566ade..2eae8b1 100644 --- a/.github/workflows/gerrit-verify.yaml +++ b/.github/workflows/gerrit-verify.yaml @@ -113,7 +113,6 @@ jobs: distro: - ubuntu2204 - ubuntu2404 - - centos-stream9 fail-fast: false steps: - name: Gerrit Checkout diff --git a/README.md b/README.md index 8507f93..f4da08b 100644 --- a/README.md +++ b/README.md @@ -3,6 +3,8 @@ haveged-install Installs haveged to help systems with low entropy. +**Note:** CentOS Stream 9 and RHEL 9+ are not supported as the haveged package is not available in their repositories. Modern systems typically have sufficient entropy sources. + Requirements ------------ diff --git a/ansible.cfg b/ansible.cfg new file mode 100644 index 0000000..66ee58a --- /dev/null +++ b/ansible.cfg @@ -0,0 +1,8 @@ +[defaults] +roles_path = ../ +callbacks_enabled = profile_tasks +deprecation_warnings = False +inject_facts_as_vars = False + +[privilege_escalation] +become = True diff --git a/meta/main.yml b/meta/main.yml index d7d0b4f..396e42d 100644 --- a/meta/main.yml +++ b/meta/main.yml @@ -15,16 +15,10 @@ galaxy_info: # min_ansible_container_version: platforms: - - name: EL - versions: - - 7 - - 8 - - name: Ubuntu versions: - - bionic - - focal - jammy + - noble galaxy_tags: - system diff --git a/molecule/default/molecule.yml b/molecule/default/molecule.yml index e6f9a96..16f3cd8 100644 --- a/molecule/default/molecule.yml +++ b/molecule/default/molecule.yml @@ -8,24 +8,29 @@ platforms: image: ubuntu:22.04 - name: ubuntu2404 image: ubuntu:24.04 - - name: centos-stream9 - image: quay.io/centos/centos:stream9 provisioner: name: ansible + config_options: + defaults: + callbacks_enabled: profile_tasks + inject_facts_as_vars: false + inventory: + host_vars: + ubuntu2204: + ansible_python_interpreter: /usr/bin/python3 + ubuntu2404: + ansible_python_interpreter: /usr/bin/python3 scenario: name: default test_sequence: - - dependency - - cleanup - destroy + - dependency - syntax - create - prepare - converge - - idempotence - side_effect - verify - - cleanup - destroy verifier: - name: testinfra + name: ansible diff --git a/molecule/default/prepare.yml b/molecule/default/prepare.yml index aa2729e..872ee43 100644 --- a/molecule/default/prepare.yml +++ b/molecule/default/prepare.yml @@ -6,20 +6,5 @@ - name: Update APT cache ansible.builtin.package: update_cache: yes - when: ansible_distribution == 'Ubuntu' - become: true - - - name: Install EPEL for CentOS 9 - ansible.builtin.dnf: - name: epel-release - state: present - when: ansible_os_family == 'RedHat' and ansible_distribution_major_version == '9' - become: true - - - name: Install EPEL for CentOS 7/8 - ansible.builtin.yum: - name: https://dl.fedoraproject.org/pub/epel/epel-release-latest-{{ ansible_distribution_major_version }}.noarch.rpm - state: present - disable_gpg_check: True - when: ansible_os_family == 'RedHat' and ansible_distribution_major_version | int < 9 + when: ansible_facts['distribution'] == 'Ubuntu' become: true diff --git a/tasks/main.yml b/tasks/main.yml index 9db6381..229599f 100644 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -1,27 +1,12 @@ --- -- name: Install Epel Repo - ansible.builtin.package: - name: epel-release - state: present - when: ansible_os_family == "RedHat" - become: true - - name: Install haveged package ansible.builtin.package: name: haveged state: present become: true -- name: Enable haveged service (Ubuntu) +- name: Enable haveged service ansible.builtin.service: name: haveged enabled: yes become: true - when: ansible_distribution == 'Ubuntu' - -- name: Enable haveged service (RedHat) - ansible.builtin.systemd: - name: haveged - enabled: yes - become: true - when: ansible_os_family == "RedHat"