mirror of https://github.com/ceph/ceph-ansible.git
ceph-validate: move var checks from ceph-common into this role
Signed-off-by: Andrew Schoen <aschoen@redhat.com>pull/2619/head
parent
32bac6b491
commit
ba7f09c0a7
|
@ -1,84 +0,0 @@
|
||||||
---
|
|
||||||
- name: make sure an installation origin was chosen
|
|
||||||
fail:
|
|
||||||
msg: "choose an installation origin between repository, distro and local\nValid ceph_origin are: {{ valid_ceph_origins }}"
|
|
||||||
when:
|
|
||||||
- ceph_origin not in valid_ceph_origins
|
|
||||||
tags:
|
|
||||||
- package-install
|
|
||||||
|
|
||||||
- name: make sure a repository was chosen
|
|
||||||
fail:
|
|
||||||
msg: "choose a repository installation source: {{ valid_ceph_repository }} or read http://docs.ceph.com/ceph-ansible/master/"
|
|
||||||
when:
|
|
||||||
- ceph_origin == 'repository'
|
|
||||||
- ceph_repository not in valid_ceph_repository
|
|
||||||
tags:
|
|
||||||
- package-install
|
|
||||||
|
|
||||||
- name: fail if local scenario is enabled on debian
|
|
||||||
fail:
|
|
||||||
msg: "'local' installation scenario not supported on Debian systems"
|
|
||||||
when:
|
|
||||||
- ansible_os_family == 'Debian'
|
|
||||||
- ceph_origin == 'local'
|
|
||||||
|
|
||||||
- name: make sure ceph_stable_release is set
|
|
||||||
fail:
|
|
||||||
msg: "make sure ceph_stable_release ( {{ ceph_stable_release }} ) is set to a release name (e.g: luminous), http://docs.ceph.com/docs/master/release-notes/"
|
|
||||||
when:
|
|
||||||
- ceph_origin != 'distro'
|
|
||||||
- ceph_stable_release == 'dummy'
|
|
||||||
- ceph_repository not in ['rhcs', 'dev', 'obs']
|
|
||||||
tags:
|
|
||||||
- package-install
|
|
||||||
|
|
||||||
- name: make sure ceph_stable_release is correct
|
|
||||||
fail:
|
|
||||||
msg: "wrong release name, see http://docs.ceph.com/docs/master/release-notes/"
|
|
||||||
when:
|
|
||||||
- ceph_stable_release not in ceph_release_num
|
|
||||||
- ceph_origin == 'repository'
|
|
||||||
- ceph_repository not in ['rhcs', 'dev', 'obs']
|
|
||||||
tags:
|
|
||||||
- package-install
|
|
||||||
|
|
||||||
- name: verify that a repository type was chosen for ceph rhcs version
|
|
||||||
fail:
|
|
||||||
msg: "choose between 'cdn' or 'iso' installation, e.g: ceph_repository_type: cdn.\nValid ceph_repository_type are: {{ valid_ceph_repository_type }}"
|
|
||||||
when:
|
|
||||||
- ceph_origin == 'repository'
|
|
||||||
- ceph_repository == 'rhcs'
|
|
||||||
- ceph_repository_type not in valid_ceph_repository_type
|
|
||||||
tags:
|
|
||||||
- package-install
|
|
||||||
|
|
||||||
- name: verify that ceph_rhcs_cdn_debian_repo url is valid for red hat storage
|
|
||||||
fail:
|
|
||||||
msg: "ceph_rhcs_cdn_debian_repo url is invalid, please set your customername:customerpasswd"
|
|
||||||
when:
|
|
||||||
- ceph_origin == 'repository'
|
|
||||||
- ceph_repository == 'rhcs'
|
|
||||||
- ceph_repository_type == 'cdn'
|
|
||||||
- ansible_os_family == 'Debian'
|
|
||||||
- ceph_rhcs_cdn_debian_repo == 'https://customername:customerpasswd@rhcs.download.redhat.com'
|
|
||||||
tags:
|
|
||||||
- package-install
|
|
||||||
|
|
||||||
- name: make sure monitor_interface, monitor_address or monitor_address_block is defined
|
|
||||||
fail:
|
|
||||||
msg: "you must set monitor_interface, monitor_address or monitor_address_block"
|
|
||||||
when:
|
|
||||||
- mon_group_name in group_names
|
|
||||||
- monitor_interface == 'interface'
|
|
||||||
- monitor_address == "0.0.0.0"
|
|
||||||
- monitor_address_block == 'subnet'
|
|
||||||
|
|
||||||
- name: make sure radosgw_interface, radosgw_address or radosgw_address_block is defined
|
|
||||||
fail:
|
|
||||||
msg: "you must set radosgw_interface, radosgw_address or radosgw_address_block"
|
|
||||||
when:
|
|
||||||
- rgw_group_name in group_names
|
|
||||||
- radosgw_interface == 'interface'
|
|
||||||
- radosgw_address == 'address'
|
|
||||||
- radosgw_address_block == 'subnet'
|
|
|
@ -2,9 +2,6 @@
|
||||||
- name: include checks/check_system.yml
|
- name: include checks/check_system.yml
|
||||||
include: checks/check_system.yml
|
include: checks/check_system.yml
|
||||||
|
|
||||||
- name: include checks/check_mandatory_vars.yml
|
|
||||||
include: checks/check_mandatory_vars.yml
|
|
||||||
|
|
||||||
- name: include checks/check_firewall.yml
|
- name: include checks/check_firewall.yml
|
||||||
include: checks/check_firewall.yml
|
include: checks/check_firewall.yml
|
||||||
when:
|
when:
|
||||||
|
|
|
@ -4,6 +4,47 @@
|
||||||
validate:
|
validate:
|
||||||
mode: permissive
|
mode: permissive
|
||||||
|
|
||||||
|
- name: fail if local scenario is enabled on debian
|
||||||
|
fail:
|
||||||
|
msg: "'local' installation scenario not supported on Debian systems"
|
||||||
|
when:
|
||||||
|
- ansible_os_family == 'Debian'
|
||||||
|
- ceph_origin == 'local'
|
||||||
|
|
||||||
|
- name: make sure ceph_stable_release is set
|
||||||
|
fail:
|
||||||
|
msg: "make sure ceph_stable_release ( {{ ceph_stable_release }} ) is set to a release name (e.g: luminous), http://docs.ceph.com/docs/master/release-notes/"
|
||||||
|
when:
|
||||||
|
- ceph_origin != 'distro'
|
||||||
|
- ceph_stable_release == 'dummy'
|
||||||
|
- ceph_repository not in ['rhcs', 'dev', 'obs']
|
||||||
|
|
||||||
|
- name: make sure ceph_stable_release is correct
|
||||||
|
fail:
|
||||||
|
msg: "wrong release name, see http://docs.ceph.com/docs/master/release-notes/"
|
||||||
|
when:
|
||||||
|
- ceph_stable_release not in ceph_release_num
|
||||||
|
- ceph_origin == 'repository'
|
||||||
|
- ceph_repository not in ['rhcs', 'dev', 'obs']
|
||||||
|
|
||||||
|
- name: make sure ceph_stable_release is correct
|
||||||
|
fail:
|
||||||
|
msg: "wrong release name, see http://docs.ceph.com/docs/master/release-notes/"
|
||||||
|
when:
|
||||||
|
- ceph_stable_release not in ceph_release_num
|
||||||
|
- ceph_origin == 'repository'
|
||||||
|
|
||||||
|
- name: verify that ceph_rhcs_cdn_debian_repo url is valid for red hat storage
|
||||||
|
fail:
|
||||||
|
msg: "ceph_rhcs_cdn_debian_repo url is invalid, please set your customername:customerpasswd"
|
||||||
|
when:
|
||||||
|
- ceph_origin == 'repository'
|
||||||
|
- ceph_repository == 'rhcs'
|
||||||
|
- ceph_repository_type == 'cdn'
|
||||||
|
- ansible_os_family == 'Debian'
|
||||||
|
- ceph_rhcs_cdn_debian_repo == 'https://customername:customerpasswd@rhcs.download.redhat.com'
|
||||||
|
- ceph_repository not in ['rhcs', 'dev', 'obs']
|
||||||
|
|
||||||
- name: make sure pg num is set for cephfs pools
|
- name: make sure pg num is set for cephfs pools
|
||||||
fail:
|
fail:
|
||||||
msg: "You must set pg num for your cephfs pools, see the cephfs_pools variable."
|
msg: "You must set pg num for your cephfs pools, see the cephfs_pools variable."
|
||||||
|
@ -38,3 +79,12 @@
|
||||||
- osd_group_name in group_names
|
- osd_group_name in group_names
|
||||||
- osd_objectstore == 'bluestore'
|
- osd_objectstore == 'bluestore'
|
||||||
- ceph_release_num[ceph_release] < ceph_release_num.luminous
|
- ceph_release_num[ceph_release] < ceph_release_num.luminous
|
||||||
|
|
||||||
|
- name: make sure radosgw_interface, radosgw_address or radosgw_address_block is defined
|
||||||
|
fail:
|
||||||
|
msg: "you must set radosgw_interface, radosgw_address or radosgw_address_block"
|
||||||
|
when:
|
||||||
|
- rgw_group_name in group_names
|
||||||
|
- radosgw_interface == 'interface'
|
||||||
|
- radosgw_address == 'address'
|
||||||
|
- radosgw_address_block == 'subnet'
|
||||||
|
|
Loading…
Reference in New Issue