mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-07-24 05:40:23 -07:00
Enable use of empty manageiq arguments (#31774)
* anable use of empty manageiq arguments * make default verify_ssl true
This commit is contained in:
parent
6693cc3f5a
commit
2765ee4b9a
4 changed files with 34 additions and 25 deletions
|
@ -548,14 +548,14 @@ def main():
|
|||
zone_id = None
|
||||
endpoints = []
|
||||
argument_spec = dict(
|
||||
manageiq_connection=dict(required=True, type='dict',
|
||||
options=manageiq_argument_spec()),
|
||||
state=dict(choices=['absent', 'present'], default='present'),
|
||||
name=dict(required=True),
|
||||
zone=dict(default='default'),
|
||||
provider_region=dict(),
|
||||
type=dict(choices=supported_providers().keys()),
|
||||
)
|
||||
# add the manageiq connection arguments to the arguments
|
||||
argument_spec.update(manageiq_argument_spec())
|
||||
# add the endpoint arguments to the arguments
|
||||
argument_spec.update(endpoint_list_spec())
|
||||
|
||||
|
|
|
@ -246,18 +246,19 @@ class ManageIQTags(object):
|
|||
|
||||
def main():
|
||||
actions = {'present': 'assign', 'absent': 'unassign', 'list': 'list'}
|
||||
argument_spec = dict(
|
||||
tags=dict(type='list'),
|
||||
resource_name=dict(required=True, type='str'),
|
||||
resource_type=dict(required=True, type='str',
|
||||
choices=manageiq_entities().keys()),
|
||||
state=dict(required=False, type='str',
|
||||
choices=['present', 'absent', 'list'], default='present'),
|
||||
)
|
||||
# add the manageiq connection arguments to the arguments
|
||||
argument_spec.update(manageiq_argument_spec())
|
||||
|
||||
module = AnsibleModule(
|
||||
argument_spec=dict(
|
||||
manageiq_connection=dict(required=True, type='dict',
|
||||
options=manageiq_argument_spec()),
|
||||
tags=dict(type='list'),
|
||||
resource_name=dict(required=True, type='str'),
|
||||
resource_type=dict(required=True, type='str',
|
||||
choices=manageiq_entities().keys()),
|
||||
state=dict(required=False, type='str',
|
||||
choices=['present', 'absent', 'list'], default='present'),
|
||||
),
|
||||
argument_spec=argument_spec,
|
||||
required_if=[
|
||||
('state', 'present', ['tags']),
|
||||
('state', 'absent', ['tags'])
|
||||
|
|
|
@ -283,19 +283,21 @@ class ManageIQUser(object):
|
|||
|
||||
|
||||
def main():
|
||||
argument_spec = dict(
|
||||
userid=dict(required=True, type='str'),
|
||||
name=dict(),
|
||||
password=dict(no_log=True),
|
||||
group=dict(),
|
||||
email=dict(),
|
||||
state=dict(choices=['absent', 'present'], default='present'),
|
||||
update_password=dict(choices=['always', 'on_create'],
|
||||
default='always'),
|
||||
)
|
||||
# add the manageiq connection arguments to the arguments
|
||||
argument_spec.update(manageiq_argument_spec())
|
||||
|
||||
module = AnsibleModule(
|
||||
argument_spec=dict(
|
||||
manageiq_connection=dict(required=True, type='dict',
|
||||
options=manageiq_argument_spec()),
|
||||
userid=dict(required=True, type='str'),
|
||||
name=dict(),
|
||||
password=dict(no_log=True),
|
||||
group=dict(),
|
||||
email=dict(),
|
||||
state=dict(choices=['absent', 'present'], default='present'),
|
||||
update_password=dict(choices=['always', 'on_create'],
|
||||
default='always'),
|
||||
),
|
||||
argument_spec=argument_spec,
|
||||
)
|
||||
|
||||
userid = module.params['userid']
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue