PCP's upstream doesn't version its dependencies in all cases. This leads
to situations where, when setting upstream_repo to True, a system ends
up with some old and some new packages. This results in a potentially
broken installation.
This commit causes all installed pcp packages to be upgraded when
upstream_repo is True.
Signed-off-by: Zack Cerza <zack@redhat.com>
--- /dev/null
+---
+- name: Update apt cache
+ apt:
+ update_cache: yes
+ when:
+ ansible_pkg_mgr == "apt"
tags:
- repo
-- name: Miscellaneous preparation
- include: prep.yml
+- include: apt_update.yml
+ when:
+ upstream_repo|bool == false
tags:
- always
+++ /dev/null
----
-- name: Update apt cache
- apt:
- update_cache: yes
- when:
- ansible_pkg_mgr == "apt"
validate_certs: true
when:
ansible_pkg_mgr == "yum"
+
+- include: apt_update.yml
+
+- name: Ensure packages are updated (apt)
+ shell: "DEBIAN_FRONTEND=noninteractive apt -y install --only-upgrade .*pcp.*"
+ when:
+ ansible_pkg_mgr == "apt"
+
+- name: Ensure packages are updated (yum)
+ shell: "yum update *pcp*"
+ when:
+ ansible_pkg_mgr == "yum"