]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph-ansible.git/commitdiff
validate: add support for containerized_deployment
authorAndrew Schoen <aschoen@redhat.com>
Wed, 2 May 2018 21:11:51 +0000 (16:11 -0500)
committerGuillaume Abrioux <gabrioux@redhat.com>
Fri, 18 May 2018 15:58:24 +0000 (17:58 +0200)
Signed-off-by: Andrew Schoen <aschoen@redhat.com>
plugins/actions/validate.py
roles/ceph-validate/tasks/main.yml

index 46eedb2b9efe24f8148af6c8a57edcd38f7f77fb..f1b71b2851a13fafbf2d20c69f8da85eb7441051 100644 (file)
@@ -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),
 )
 
index 081617cd6843866b8f801ae8fe9f395a9bc58ac5..98174882e708b9b48f02e6e4dcb910762a127fc4 100644 (file)
@@ -1,5 +1,4 @@
 ---
-
 - name: validate provided configuration
   validate:
     mode: strict