mirror of https://github.com/ceph/ceph-ansible.git
plugins/actions/validate.py: allow ceph_repository 'obs' on openSUSE
Allow the use of 'obs' as a valid value for ceph_repository, and validate that - OS is openSUSE - ceph_obs_repo is defined Signed-off-by: Johannes Kastl <kastl@b1-systems.de>pull/4377/head
parent
efd38ecc88
commit
f6b6f7d5b0
|
@ -47,6 +47,7 @@ class ActionModule(ActionBase):
|
|||
|
||||
try:
|
||||
notario_store["groups"] = host_vars["groups"]
|
||||
notario_store["ansible_distribution"] = host_vars["ansible_distribution"]
|
||||
notario_store["containerized_deployment"] = host_vars["containerized_deployment"] # noqa E501
|
||||
notario.validate(host_vars, install_options, defined_keys=True)
|
||||
|
||||
|
@ -66,6 +67,10 @@ class ActionModule(ActionBase):
|
|||
notario.validate(
|
||||
host_vars, ceph_repository_dev, defined_keys=True)
|
||||
|
||||
if host_vars["ceph_repository"] == "obs":
|
||||
notario.validate(
|
||||
host_vars, ceph_repository_obs, defined_keys=True)
|
||||
|
||||
if host_vars["ceph_repository"] == "custom":
|
||||
notario.validate(host_vars, ceph_repository_custom, defined_keys=True)
|
||||
|
||||
|
@ -172,8 +177,8 @@ def ceph_origin_choices(value):
|
|||
|
||||
|
||||
def ceph_repository_choices(value):
|
||||
msg = "ceph_repository must be either 'community', 'rhcs', 'dev', 'custom' or 'uca'"
|
||||
assert value in ['community', 'rhcs', 'dev', 'custom', 'uca'], msg
|
||||
msg = "ceph_repository must be either 'community', 'rhcs', 'dev', 'custom', 'uca' or 'obs'"
|
||||
assert value in ['community', 'rhcs', 'dev', 'custom', 'uca', 'obs'], msg
|
||||
|
||||
|
||||
def ceph_repository_type_choices(value):
|
||||
|
@ -256,6 +261,11 @@ ceph_repository_dev = (
|
|||
("ceph_dev_sha1", types.string),
|
||||
)
|
||||
|
||||
ceph_repository_obs = (
|
||||
("ansible_distribution", "openSUSE Leap"),
|
||||
("ceph_obs_repo", types.string),
|
||||
)
|
||||
|
||||
ceph_repository_custom = ("ceph_custom_repo", types.string)
|
||||
|
||||
ceph_repository_uca = (
|
||||
|
|
Loading…
Reference in New Issue