ceph-ansible/roles/ceph-common/tasks/checks/check_mandatory_vars.yml

84 lines
2.9 KiB
YAML

---
- 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_stable_release == 'dummy'
- ceph_repository not in ['rhcs', 'dev']
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']
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'