From a9745a939f38d7b5a940f909b58f65665f39fdc3 Mon Sep 17 00:00:00 2001 From: Thomas Misilo Date: Thu, 30 May 2024 09:24:47 -0500 Subject: [PATCH] Specify the state for package installation as "latest", but allow for overriding if needed Fixes #391 --- defaults/main.yml | 2 ++ tasks/install-packages.yml | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/defaults/main.yml b/defaults/main.yml index bfc02d8..a46b072 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -51,6 +51,8 @@ archivematica_src_rpm_repositories: gpgkey: "https://packages.archivematica.org/1.10.x/key.asc" gpgcheck: 1 +archivematica_src_package_state: latest + # Database settings archivematica_src_am_db_host: "localhost" # Archivematica database host archivematica_src_am_db_name: "MCP" # Archivematica database name diff --git a/tasks/install-packages.yml b/tasks/install-packages.yml index 60d14f7..c15077e 100644 --- a/tasks/install-packages.yml +++ b/tasks/install-packages.yml @@ -8,13 +8,13 @@ - name: "Install/Upgrade Debian packages: {{ name }}" apt: name: "{{ packages }}" - state: "{{ state | default('latest') }}" + state: "{{ archivematica_src_package_state | default('latest') }}" when: - ansible_os_family == "Debian" - name: "Install/Upgrade RHEL/CentOS/Rocky packages: {{ name }}" yum: name: "{{ packages }}" - state: "{{ state | default('latest') }}" + state: "{{ archivematica_src_package_state | default('latest') }}" when: - ansible_os_family in ['RedHat','Rocky']