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
This commit is contained in:
Markos Chandras 2018-03-14 16:06:42 +00:00
parent 37a8331d53
commit a8b7f7c8c9

View File

@ -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