From a8b7f7c8c9833183b311813093c4b74fa23e5b82 Mon Sep 17 00:00:00 2001 From: Markos Chandras Date: Wed, 14 Mar 2018 16:06:42 +0000 Subject: [PATCH] inventory: all: Switch package state to 'present' on openSUSE Similar to the CentOS case, we should use 'present' instead of 'latest' for the package state so we don't spend time resolving dependencies, querying repos etc. The 'present' state can be further improved either in the zypper itself or in the Ansible module. Link: https://github.com/ansible/ansible/pull/37191 Link: https://bugzilla.opensuse.org/show_bug.cgi?id=1084525 Change-Id: I8a6598013714e468d19f4984288d2c746515b5ca --- inventory/group_vars/all/all.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/inventory/group_vars/all/all.yml b/inventory/group_vars/all/all.yml index a1d56e0e34..e6cc53499a 100644 --- a/inventory/group_vars/all/all.yml +++ b/inventory/group_vars/all/all.yml @@ -24,9 +24,9 @@ ssh_delay: 5 # Set the package install state for distribution packages # Options are 'present' and 'latest'. -# NOTE(mhayden): Allowing CentOS 7 to use package_state=present should give +# NOTE(mhayden): Allowing CentOS 7 and openSUSE to use package_state=present should give # gate jobs a better chance to finish and expose more issues to fix. -package_state: "{{ (ansible_os_family == 'RedHat') | ternary('present', 'latest') }}" +package_state: "{{ (ansible_pkg_mgr in ['dnf', 'yum', 'zypper']) | ternary('present', 'latest') }}" # Set "/var/log" to be a bind mount to the physical host. default_bind_mount_logs: true