Skip to content

Commit

Permalink
Specify the state for package installation as "latest", but allow for…
Browse files Browse the repository at this point in the history
… overriding if needed

Fixes artefactual-labs#391
  • Loading branch information
misilot committed May 30, 2024
1 parent 0a39229 commit a9745a9
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 2 additions & 0 deletions defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions tasks/install-packages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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']

0 comments on commit a9745a9

Please sign in to comment.