mirror of https://github.com/ceph/ceph-ansible.git
ceph-validate: export validate repository vars as a task
Signed-off-by: Seena Fallah <seenafallah@gmail.com>
(cherry picked from commit 4f6da9d92f
)
pull/6948/head
parent
7fd5bd42b7
commit
f6c410109b
|
@ -0,0 +1,20 @@
|
|||
---
|
||||
- name: validate ceph_origin
|
||||
fail:
|
||||
msg: "ceph_origin must be either 'repository', 'distro' or 'local'"
|
||||
when: ceph_origin not in ['repository', 'distro', 'local']
|
||||
|
||||
- name: validate ceph_repository
|
||||
fail:
|
||||
msg: "ceph_repository must be either 'community', 'rhcs', 'dev', 'custom' or 'uca'"
|
||||
when:
|
||||
- ceph_origin == 'repository'
|
||||
- ceph_repository not in ['community', 'rhcs', 'dev', 'custom', 'uca']
|
||||
|
||||
- name: validate ceph_repository_community
|
||||
fail:
|
||||
msg: "ceph_stable_release must be 'pacific'"
|
||||
when:
|
||||
- ceph_origin == 'repository'
|
||||
- ceph_repository == 'community'
|
||||
- ceph_stable_release not in ['pacific']
|
|
@ -3,27 +3,8 @@
|
|||
include_tasks: check_system.yml
|
||||
|
||||
- name: validate repository variables in non-containerized scenario
|
||||
include_tasks: check_repository.yml
|
||||
when: not containerized_deployment | bool
|
||||
block:
|
||||
- name: validate ceph_origin
|
||||
fail:
|
||||
msg: "ceph_origin must be either 'repository', 'distro' or 'local'"
|
||||
when: ceph_origin not in ['repository', 'distro', 'local']
|
||||
|
||||
- name: validate ceph_repository
|
||||
fail:
|
||||
msg: "ceph_repository must be either 'community', 'rhcs', 'dev', 'custom' or 'uca'"
|
||||
when:
|
||||
- ceph_origin == 'repository'
|
||||
- ceph_repository not in ['community', 'rhcs', 'dev', 'custom', 'uca']
|
||||
|
||||
- name: validate ceph_repository_community
|
||||
fail:
|
||||
msg: "ceph_stable_release must be 'pacific'"
|
||||
when:
|
||||
- ceph_origin == 'repository'
|
||||
- ceph_repository == 'community'
|
||||
- ceph_stable_release != 'pacific'
|
||||
|
||||
- name: validate osd_objectstore
|
||||
fail:
|
||||
|
|
Loading…
Reference in New Issue