Browse Source

Sync 'validations/ceph-ansible-installed.yaml' with the new role

Closes-Bug: 1857460
Change-Id: Ib80b55cbd0d4b4dd83d8dbc9dc2afe1d6df2ede5
(cherry picked from commit 716a3083232ca137ed617ada73f49a6fe5a6869b)
changes/26/703926/3
Francesco Pantano 3 weeks ago
parent
commit
1bdafd5281
No account linked to committer's email address
1 changed files with 14 additions and 0 deletions
  1. +14
    -0
      validations/ceph-ansible-installed.yaml

+ 14
- 0
validations/ceph-ansible-installed.yaml View File

@@ -7,6 +7,8 @@
Prints a message if ceph-ansible isn't installed
groups:
- pre-deployment
fail_without_ceph_ansible: false
ceph_ansible_repo: "centos-ceph-luminous"
tasks:
- name: Check if ceph-ansible is installed
command: yum list installed ceph-ansible
@@ -20,3 +22,15 @@
msg: If planning to use Ceph, it is necessary to install the ceph-ansible on the undercloud
when:
- ceph_ansible_installed is failed
- 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:
- (repo.stdout | length == 0 or repo.stdout != "{{ ceph_ansible_repo }}")
- fail_without_ceph_ansible|default(false)|bool

Loading…
Cancel
Save