mirror of https://github.com/ceph/ceph-ansible.git
Add uca to ceph_repository choices validation
Ubuntu cloud archive is configurable via ceph_repository variable but the uca choice isn't accepted. This commit fixes this issue and also validates the associated uca repository variables. Resolves: #3739 Signed-off-by: Dimitri Savineau <dsavinea@redhat.com>pull/3748/head
parent
6f47c20c3a
commit
94505a3af2
|
@ -62,6 +62,9 @@ class ActionModule(ActionBase):
|
||||||
if host_vars["ceph_repository"] == "dev":
|
if host_vars["ceph_repository"] == "dev":
|
||||||
notario.validate(host_vars, ceph_repository_dev, defined_keys=True)
|
notario.validate(host_vars, ceph_repository_dev, defined_keys=True)
|
||||||
|
|
||||||
|
if host_vars["ceph_repository"] == "uca":
|
||||||
|
notario.validate(host_vars, ceph_repository_uca, defined_keys=True)
|
||||||
|
|
||||||
# store these values because one must be defined and the validation method
|
# store these values because one must be defined and the validation method
|
||||||
# will need access to all three through the store
|
# will need access to all three through the store
|
||||||
notario_store["monitor_address"] = host_vars.get("monitor_address", None)
|
notario_store["monitor_address"] = host_vars.get("monitor_address", None)
|
||||||
|
@ -165,7 +168,8 @@ def ceph_origin_choices(value):
|
||||||
|
|
||||||
|
|
||||||
def ceph_repository_choices(value):
|
def ceph_repository_choices(value):
|
||||||
assert value in ['community', 'rhcs', 'dev', 'custom'], "ceph_repository must be either 'community', 'rhcs', 'dev', or 'custom'"
|
msg = "ceph_repository must be either 'community', 'rhcs', 'dev', 'custom' or 'uca'"
|
||||||
|
assert value in ['community', 'rhcs', 'dev', 'custom', 'uca'], msg
|
||||||
|
|
||||||
|
|
||||||
def ceph_repository_type_choices(value):
|
def ceph_repository_type_choices(value):
|
||||||
|
@ -245,6 +249,12 @@ ceph_repository_dev = (
|
||||||
("ceph_dev_sha1", types.string),
|
("ceph_dev_sha1", types.string),
|
||||||
)
|
)
|
||||||
|
|
||||||
|
ceph_repository_uca = (
|
||||||
|
("ceph_stable_repo_uca", types.string),
|
||||||
|
("ceph_stable_openstack_release_uca", types.string),
|
||||||
|
("ceph_stable_release_uca", types.string),
|
||||||
|
)
|
||||||
|
|
||||||
monitor_options = (
|
monitor_options = (
|
||||||
("cluster_network", types.string),
|
("cluster_network", types.string),
|
||||||
("fsid", types.string),
|
("fsid", types.string),
|
||||||
|
|
Loading…
Reference in New Issue