From d30a99c350b217c293bda2e086219fcecb5a46e3 Mon Sep 17 00:00:00 2001 From: Andrew Schoen Date: Wed, 2 May 2018 16:11:51 -0500 Subject: [PATCH] validate: add support for containerized_deployment Signed-off-by: Andrew Schoen --- plugins/actions/validate.py | 5 ++++- roles/ceph-validate/tasks/main.yml | 1 - 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/plugins/actions/validate.py b/plugins/actions/validate.py index 46eedb2b9..f1b71b285 100644 --- a/plugins/actions/validate.py +++ b/plugins/actions/validate.py @@ -36,6 +36,7 @@ class ActionModule(ActionBase): try: notario_store["groups"] = host_vars["groups"] + notario_store["containerized_deployment"] = host_vars["containerized_deployment"] notario.validate(host_vars, install_options, defined_keys=True) if host_vars["ceph_origin"] == "repository": @@ -108,7 +109,8 @@ def osd_objectstore_choices(value): def ceph_origin_choices(value): - assert value in ['repository', 'distro', 'local'], "ceph_origin must be either 'repository', 'distro' or 'local'" + if not notario_store["containerized_deployment"]: + assert value in ['repository', 'distro', 'local'], "ceph_origin must be either 'repository', 'distro' or 'local'" def ceph_repository_choices(value): @@ -166,6 +168,7 @@ def validate_rados_options(value): install_options = ( ("ceph_origin", ceph_origin_choices), + ("containerized_deployment", types.boolean), ('osd_objectstore', osd_objectstore_choices), ) diff --git a/roles/ceph-validate/tasks/main.yml b/roles/ceph-validate/tasks/main.yml index 081617cd6..98174882e 100644 --- a/roles/ceph-validate/tasks/main.yml +++ b/roles/ceph-validate/tasks/main.yml @@ -1,5 +1,4 @@ --- - - name: validate provided configuration validate: mode: strict