Browse Source

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

Change-Id: I21513d005bb6dd45da45b1b3459f851acd30ebe1
changes/65/704165/1
Francesco Pantano 3 weeks ago
parent
commit
716a308323
No account linked to committer's email address
1 changed files with 13 additions and 0 deletions
  1. +13
    -0
      validations/ceph-ansible-installed.yaml

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

@@ -8,6 +8,7 @@
groups:
- pre-deployment
fail_without_ceph_ansible: false
ceph_ansible_repo: "centos-ceph-nautilus"
tasks:
- include_tasks: tasks/deprecation.yaml
- name: Check if ceph-ansible is installed
@@ -31,3 +32,15 @@
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:
- (repo.stdout | length == 0 or repo.stdout != "{{ ceph_ansible_repo }}")
- fail_without_ceph_ansible|default(false)|bool

Loading…
Cancel
Save