Browse Source

With dnf repoquery and excluded packages, --disableexcludes=all is needed to list the package with --installed.

Jan Pazdziora 7 years ago
parent
commit
e3a0867b67

+ 1 - 1
playbooks/common/openshift-cluster/upgrades/docker/upgrade_check.yml

@@ -16,7 +16,7 @@
   changed_when: no
 
 - name: Get current version of Docker
-  command: "{{ repoquery_cmd }} --installed --qf '%{version}' docker"
+  command: "{{ repoquery_installed }} --qf '%{version}' docker"
   register: curr_docker_version
   retries: 4
   until: curr_docker_version | succeeded

+ 1 - 0
playbooks/init/facts.yml

@@ -154,6 +154,7 @@
   - name: initialize_facts set_fact repoquery command
     set_fact:
       repoquery_cmd: "{{ 'dnf repoquery --latest-limit 1 -d 0' if ansible_pkg_mgr == 'dnf' else 'repoquery --plugins' }}"
+      repoquery_installed: "{{ 'dnf repoquery --latest-limit 1 -d 0 --disableexcludes=all --installed' if ansible_pkg_mgr == 'dnf' else 'repoquery --plugins --installed' }}"
 
   - name: initialize_facts set_fact on openshift_docker_hosted_registry_network
     set_fact:

+ 1 - 1
roles/docker/tasks/package_docker.yml

@@ -1,6 +1,6 @@
 ---
 - name: Get current installed Docker version
-  command: "{{ repoquery_cmd }} --installed --qf '%{version}' docker"
+  command: "{{ repoquery_installed }} --qf '%{version}' docker"
   when: not openshift.common.is_atomic | bool
   register: curr_docker_version
   retries: 4