Skip to content
This repository was archived by the owner on Jan 1, 2024. It is now read-only.

Commit 1daac26

Browse files
authored
Allow to downgrade RPM and DEB install by update_package step (#411)
Before this patch, it was not possible to downgrade the package. Now the `update_package` step will also install the package with the old version.
1 parent 312da04 commit 1daac26

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ README.md to use the newest tag with new release
1818
### Fixed
1919

2020
- Remove old app configurations before uploading a new one
21+
- Allow to downgrade RPMs and DEBs
2122

2223
## [1.12.0] - 2022-03-03
2324

tasks/steps/blocks/install_rpm_or_deb.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
yum:
66
name: '{{ delivered_package_path }}'
77
state: present
8+
allow_downgrade: true
89
update_cache: true
910
register: install_rpm
1011
failed_when:
@@ -16,6 +17,8 @@
1617
any_errors_fatal: true
1718
apt:
1819
deb: '{{ delivered_package_path }}'
20+
state: present
21+
force: true # `allow_downgrade` is supported in Ansible 2.12+ only
1922
update_cache: true
2023
when: package_info.type == 'deb'
2124

0 commit comments

Comments
 (0)