mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-06-15 20:37:43 +00:00
Merge e8207f7d07 into 877f20f278
This commit is contained in:
commit
5b27656539
21 changed files with 182 additions and 150 deletions
|
|
@ -91,7 +91,7 @@ from ansible_collections.community.general.plugins.module_utils._pritunl_api imp
|
|||
def add_pritunl_organization(module):
|
||||
result = {}
|
||||
|
||||
org_name = module.params.get("name")
|
||||
org_name = module.params["name"]
|
||||
|
||||
org_obj_list = list_pritunl_organizations(
|
||||
**dict_merge(
|
||||
|
|
@ -121,8 +121,8 @@ def add_pritunl_organization(module):
|
|||
def remove_pritunl_organization(module):
|
||||
result = {}
|
||||
|
||||
org_name = module.params.get("name")
|
||||
force = module.params.get("force")
|
||||
org_name = module.params["name"]
|
||||
force = module.params["force"]
|
||||
|
||||
org_obj_list = []
|
||||
|
||||
|
|
@ -179,7 +179,7 @@ def main():
|
|||
|
||||
module = AnsibleModule(argument_spec=argument_spec)
|
||||
|
||||
state = module.params.get("state")
|
||||
state = module.params["state"]
|
||||
|
||||
try:
|
||||
if state == "present":
|
||||
|
|
|
|||
|
|
@ -82,7 +82,7 @@ from ansible_collections.community.general.plugins.module_utils._pritunl_api imp
|
|||
|
||||
|
||||
def get_pritunl_organizations(module):
|
||||
org_name = module.params.get("organization")
|
||||
org_name = module.params["organization"]
|
||||
|
||||
organizations = []
|
||||
|
||||
|
|
|
|||
|
|
@ -157,17 +157,17 @@ from ansible_collections.community.general.plugins.module_utils._pritunl_api imp
|
|||
def add_or_update_pritunl_user(module):
|
||||
result = {}
|
||||
|
||||
org_name = module.params.get("organization")
|
||||
user_name = module.params.get("user_name")
|
||||
org_name = module.params["organization"]
|
||||
user_name = module.params["user_name"]
|
||||
|
||||
user_params = {
|
||||
"name": user_name,
|
||||
"email": module.params.get("user_email"),
|
||||
"groups": module.params.get("user_groups"),
|
||||
"disabled": module.params.get("user_disabled"),
|
||||
"gravatar": module.params.get("user_gravatar"),
|
||||
"mac_addresses": module.params.get("user_mac_addresses"),
|
||||
"type": module.params.get("user_type"),
|
||||
"email": module.params["user_email"],
|
||||
"groups": module.params["user_groups"],
|
||||
"disabled": module.params["user_disabled"],
|
||||
"gravatar": module.params["user_gravatar"],
|
||||
"mac_addresses": module.params["user_mac_addresses"],
|
||||
"type": module.params["user_type"],
|
||||
}
|
||||
|
||||
org_obj_list = list_pritunl_organizations(
|
||||
|
|
@ -251,8 +251,8 @@ def add_or_update_pritunl_user(module):
|
|||
def remove_pritunl_user(module):
|
||||
result = {}
|
||||
|
||||
org_name = module.params.get("organization")
|
||||
user_name = module.params.get("user_name")
|
||||
org_name = module.params["organization"]
|
||||
user_name = module.params["user_name"]
|
||||
|
||||
org_obj_list = []
|
||||
|
||||
|
|
@ -322,7 +322,7 @@ def main():
|
|||
|
||||
module = AnsibleModule(argument_spec=argument_spec)
|
||||
|
||||
state = module.params.get("state")
|
||||
state = module.params["state"]
|
||||
|
||||
try:
|
||||
if state == "present":
|
||||
|
|
|
|||
|
|
@ -101,9 +101,9 @@ from ansible_collections.community.general.plugins.module_utils._pritunl_api imp
|
|||
|
||||
|
||||
def get_pritunl_user(module):
|
||||
user_name = module.params.get("user_name")
|
||||
user_type = module.params.get("user_type")
|
||||
org_name = module.params.get("organization")
|
||||
user_name = module.params["user_name"]
|
||||
user_type = module.params["user_type"]
|
||||
org_name = module.params["organization"]
|
||||
|
||||
org_obj_list = []
|
||||
|
||||
|
|
|
|||
|
|
@ -95,7 +95,7 @@ def get_volume(module, array):
|
|||
|
||||
|
||||
def validate_size(module, err_msg):
|
||||
size = module.params.get("size", False)
|
||||
size = module.params["size"]
|
||||
if not size:
|
||||
module.fail_json(msg=err_msg)
|
||||
size = size_to_MiB(size)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue