Skip to content

Commit

Permalink
test-prepare-host: Switch package state to 'present' on openSUSE
Browse files Browse the repository at this point in the history
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.

Change-Id: I44fae44030af1c9ee88dcc26c6b55c91a2531926
Link: ansible/ansible#37191
Link: https://bugzilla.opensuse.org/show_bug.cgi?id=1084525
(cherry picked from commit 1f2ab67)
  • Loading branch information
Markos Chandras committed Mar 12, 2018
1 parent 3720c5c commit 38eefcc
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions test-prepare-host.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,12 +42,12 @@
with_items:
- "91.189.91.21 images.linuxcontainers.org us.images.linuxcontainers.org"
- "91.189.88.37 images.linuxcontainers.org uk.images.linuxcontainers.org"
# NOTE(mhayden): Using package_state=present on CentOS 7 should allow for
# NOTE(mhayden): Using package_state=present on CentOS or openSUSE should allow for
# more gate jobs to complete properly and expose more problems that can
# be fixed (instead of timeouts).
- name: Use present for package_state on CentOS 7
- name: Use present for package_state on CentOS and openSUSE
set_fact:
package_state: "{{ (ansible_os_family == 'RedHat') | ternary('present', 'latest') }}"
package_state: "{{ (ansible_pkg_mgr in ['dnf', 'yum', 'zypper']) | ternary('present', 'latest') }}"

- include: test-install-openstack-hosts.yml

Expand Down

0 comments on commit 38eefcc

Please sign in to comment.