Merge "Add an additional validation to check ceph-ansible repository" into stable/train
This commit is contained in:
commit
cb4899fd2f
|
@ -8,6 +8,7 @@
|
|||
groups:
|
||||
- pre-deployment
|
||||
fail_without_ceph_ansible: false
|
||||
ceph_ansible_repo: "centos-ceph-nautilus"
|
||||
tasks:
|
||||
- include_role:
|
||||
name: ceph
|
||||
|
|
|
@ -3,4 +3,5 @@ fail_without_ceph_ansible: false
|
|||
fail_without_deps: false
|
||||
fail_on_ceph_health_err: false
|
||||
osd_percentage_min: 0
|
||||
ceph_ansible_repo: "centos-ceph-nautilus"
|
||||
|
||||
|
|
|
@ -20,3 +20,16 @@
|
|||
when:
|
||||
- ceph_ansible_installed.stdout.find('is not installed') != -1
|
||||
- fail_without_ceph_ansible|default(false)|bool
|
||||
|
||||
- name: Get ceph-ansible repository
|
||||
shell: "yum info ceph-ansible | awk '/From repo/ {print $4}'"
|
||||
register: repo
|
||||
changed_when: False
|
||||
|
||||
- name: Fail if ceph-ansible doesn't belong to the specified repo
|
||||
fail:
|
||||
msg: "Make sure ceph-ansible package is installed from {{ ceph_ansible_repo }}"
|
||||
when:
|
||||
- fail_without_ceph_ansible|default(false)|bool
|
||||
- (repo.stdout | length > 0 or repo.stdout != "{{ ceph_ansible_repo }}")
|
||||
|
||||
|
|
Loading…
Reference in New Issue