Refactor ceph-ansible upgrade

ceph-ansible and python-tripleoclient have different "minimum" required
version of ansible in specification. This patch upgrades ceph-ansible as
prerequisite so all dependencies will be met. In fast-forward script
checks if ceph-ansible is installed.If yes, it will upgrade it to latest
versions in repositories.

Change-Id: I3eadfad34aa563084fd4cc68990cb247e734d508
Related-Bug: 1885637
This commit is contained in:
Sergii Golovatiuk 2020-07-01 12:53:50 +02:00
parent f820078ecf
commit 3fb8fe1912
3 changed files with 12 additions and 9 deletions

View File

@ -9,3 +9,14 @@
name:
- "{{ 'python-tripleoclient' if use_oooq|bool else 'python3-tripleoclient' }}"
state: latest
- name: get installed package fact
package_facts:
manager: "auto"
- name: Update Ceph Ansible prior upgrade
package:
name:
- "ceph-ansible"
state: latest
when: "'ceph-ansible' in ansible_facts.packages"

View File

@ -1,12 +1,4 @@
---
- name: Make sure ceph-ansible is installed if ceph is deployed
package:
name: ceph-ansible
state: latest
become: true
become_user: root
when: ceph_osd_enabled|bool
- name: adjust role-data for upgrade
include_tasks: ../common/adjust-roles-data.yaml
when: custom_roles_used|bool

View File

@ -14,7 +14,7 @@ sudo tripleo-repos {{ cmd_args }} ceph
sudo systemctl stop openstack-* neutron-* httpd
sudo yum update -y instack-undercloud openstack-puppet-modules openstack-tripleo-common python-tripleoclient
{% else %}
sudo yum -y install ceph-ansible
rpm -q ceph-ansible && yum -y upgrade ceph-ansible || yum install -y ceph-ansible
sudo yum -y update {{ (current_release < 15) | ternary('python-tripleoclient', 'python3-tripleoclient') }}
{% endif %}