From 9a1f1626c3e57e64bdcd8d37ae600c21f3ea2a24 Mon Sep 17 00:00:00 2001 From: VasishtaShastry Date: Thu, 7 Nov 2019 17:30:21 +0530 Subject: [PATCH] Evades validation of ceph_repository_type in containerized scenario This will prevent failure of site-docker.yml with configs in doc. Closes: https://bugzilla.redhat.com/show_bug.cgi?id=1769760 Signed-off-by: VasishtaShastry Co-Authored-By: Guillaume Abrioux --- roles/ceph-validate/tasks/main.yml | 53 +++++++++++++++--------------- 1 file changed, 27 insertions(+), 26 deletions(-) diff --git a/roles/ceph-validate/tasks/main.yml b/roles/ceph-validate/tasks/main.yml index f65a3335e..4ce2eff81 100644 --- a/roles/ceph-validate/tasks/main.yml +++ b/roles/ceph-validate/tasks/main.yml @@ -1,33 +1,34 @@ --- -- name: validate ceph_origin - fail: - msg: "ceph_origin must be either 'repository', 'distro' or 'local'" - when: - - not containerized_deployment | bool - - ceph_origin not in ['repository', 'distro', 'local'] +- name: validate repository variables in non-containerized scenario + 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 + 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 either 'nautilus' or 'octopus'" - when: - - ceph_origin == 'repository' - - ceph_repository == 'community' - - ceph_stable_release not in ['nautilus', 'octopus'] + - name: validate ceph_repository_community + fail: + msg: "ceph_stable_release must be either 'nautilus' or 'octopus'" + when: + - ceph_origin == 'repository' + - ceph_repository == 'community' + - ceph_stable_release not in ['nautilus', 'octopus'] -- name: validate ceph_repository_type - fail: - msg: "ceph_repository_type must be either 'cdn' or 'iso'" - when: - - ceph_origin == 'repository' - - ceph_repository == 'rhcs' - - ceph_repository_type not in ['cdn', 'iso'] + - name: validate ceph_repository_type + fail: + msg: "ceph_repository_type must be either 'cdn' or 'iso'" + when: + - ceph_origin == 'repository' + - ceph_repository == 'rhcs' + - ceph_repository_type not in ['cdn', 'iso'] - name: validate osd_objectstore fail: