Add final dnf support bits

The dnf package manager was missing from the list of package
managers in the upgrade check tasks. This patch ensures that
the upgrade check runs on servers with dnf.

The dnf module has no 'update_cache' argument, so this patch removes
that if dnf is being used. Updating the metadata cache is not needed.

Implements: blueprint centos-and-dnf
Change-Id: I10565b2e9379d5ac60ae65bfcdda221a0218988e
This commit is contained in:
Major Hayden 2017-08-11 12:57:37 -05:00
parent 9edd9e72d6
commit 9f95b25476
No known key found for this signature in database
GPG Key ID: 737051E0C1011FB1
2 changed files with 2 additions and 2 deletions

View File

@ -103,7 +103,7 @@
package:
pkg: "{{ rabbitmq_dependencies }}"
state: "{{ rabbitmq_package_state }}"
update_cache: yes
update_cache: "{{ ansible_pkg_mgr == 'yum' | ternary('yes', omit) }}"
register: install_packages
until: install_packages|success
retries: 5

View File

@ -39,7 +39,7 @@
register: installed_rabbitmq_rpm
when:
- not rabbitmq_upgrade | bool
- ansible_pkg_mgr in [ 'yum', 'zypper']
- ansible_pkg_mgr in ['yum', 'dnf', 'zypper']
tags:
- rabbitmq-package-rpm
- rabbitmq-yum-packages