mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-08-26 16:01:43 -07:00
remove trailing comma in dict(parameters,) (#10711)
* remove trailing comma in dict(parameters,) * add changelog frag
This commit is contained in:
parent
5eab0f2419
commit
62fa3e6f2b
7 changed files with 28 additions and 20 deletions
6
changelogs/fragments/10711-pytohn-idioms-1.yml
Normal file
6
changelogs/fragments/10711-pytohn-idioms-1.yml
Normal file
|
@ -0,0 +1,6 @@
|
||||||
|
minor_changes:
|
||||||
|
- gitlab_label - minor refactor to improve readability (https://github.com/ansible-collections/community.general/pull/10711).
|
||||||
|
- gitlab_milestone - minor refactor to improve readability (https://github.com/ansible-collections/community.general/pull/10711).
|
||||||
|
- ipa_host - minor refactor to improve readability (https://github.com/ansible-collections/community.general/pull/10711).
|
||||||
|
- lvg_rename - minor refactor to improve readability (https://github.com/ansible-collections/community.general/pull/10711).
|
||||||
|
- terraform - minor refactor to improve readability (https://github.com/ansible-collections/community.general/pull/10711).
|
|
@ -419,7 +419,7 @@ def main():
|
||||||
color=dict(type='str'),
|
color=dict(type='str'),
|
||||||
description=dict(type='str'),
|
description=dict(type='str'),
|
||||||
priority=dict(type='int'),
|
priority=dict(type='int'),
|
||||||
new_name=dict(type='str'),)
|
new_name=dict(type='str'))
|
||||||
),
|
),
|
||||||
state=dict(type='str', default="present", choices=["absent", "present"]),
|
state=dict(type='str', default="present", choices=["absent", "present"]),
|
||||||
)
|
)
|
||||||
|
|
|
@ -414,12 +414,12 @@ def main():
|
||||||
project=dict(type='str'),
|
project=dict(type='str'),
|
||||||
group=dict(type='str'),
|
group=dict(type='str'),
|
||||||
purge=dict(type='bool', default=False),
|
purge=dict(type='bool', default=False),
|
||||||
milestones=dict(type='list', elements='dict', default=list(),
|
milestones=dict(type='list', elements='dict', default=[],
|
||||||
options=dict(
|
options=dict(
|
||||||
title=dict(type='str', required=True),
|
title=dict(type='str', required=True),
|
||||||
description=dict(type='str'),
|
description=dict(type='str'),
|
||||||
due_date=dict(type='str'),
|
due_date=dict(type='str'),
|
||||||
start_date=dict(type='str'),)
|
start_date=dict(type='str'))
|
||||||
),
|
),
|
||||||
state=dict(type='str', default="present", choices=["absent", "present"]),
|
state=dict(type='str', default="present", choices=["absent", "present"]),
|
||||||
)
|
)
|
||||||
|
|
|
@ -291,19 +291,21 @@ def ensure(module, client):
|
||||||
|
|
||||||
def main():
|
def main():
|
||||||
argument_spec = ipa_argument_spec()
|
argument_spec = ipa_argument_spec()
|
||||||
argument_spec.update(description=dict(type='str'),
|
argument_spec.update(
|
||||||
fqdn=dict(type='str', required=True, aliases=['name']),
|
description=dict(type='str'),
|
||||||
force=dict(type='bool'),
|
fqdn=dict(type='str', required=True, aliases=['name']),
|
||||||
ip_address=dict(type='str'),
|
force=dict(type='bool'),
|
||||||
ns_host_location=dict(type='str', aliases=['nshostlocation']),
|
ip_address=dict(type='str'),
|
||||||
ns_hardware_platform=dict(type='str', aliases=['nshardwareplatform']),
|
ns_host_location=dict(type='str', aliases=['nshostlocation']),
|
||||||
ns_os_version=dict(type='str', aliases=['nsosversion']),
|
ns_hardware_platform=dict(type='str', aliases=['nshardwareplatform']),
|
||||||
user_certificate=dict(type='list', aliases=['usercertificate'], elements='str'),
|
ns_os_version=dict(type='str', aliases=['nsosversion']),
|
||||||
mac_address=dict(type='list', aliases=['macaddress'], elements='str'),
|
user_certificate=dict(type='list', aliases=['usercertificate'], elements='str'),
|
||||||
update_dns=dict(type='bool'),
|
mac_address=dict(type='list', aliases=['macaddress'], elements='str'),
|
||||||
state=dict(type='str', default='present', choices=['present', 'absent', 'enabled', 'disabled']),
|
update_dns=dict(type='bool'),
|
||||||
random_password=dict(type='bool', no_log=False),
|
state=dict(type='str', default='present', choices=['present', 'absent', 'enabled', 'disabled']),
|
||||||
force_creation=dict(type='bool', default=True),)
|
random_password=dict(type='bool', no_log=False),
|
||||||
|
force_creation=dict(type='bool', default=True)
|
||||||
|
)
|
||||||
|
|
||||||
module = AnsibleModule(argument_spec=argument_spec,
|
module = AnsibleModule(argument_spec=argument_spec,
|
||||||
supports_check_mode=True)
|
supports_check_mode=True)
|
||||||
|
|
|
@ -57,8 +57,8 @@ EXAMPLES = r"""
|
||||||
from ansible.module_utils.basic import AnsibleModule
|
from ansible.module_utils.basic import AnsibleModule
|
||||||
|
|
||||||
argument_spec = dict(
|
argument_spec = dict(
|
||||||
vg=dict(type='str', required=True,),
|
vg=dict(type='str', required=True),
|
||||||
vg_new=dict(type='str', required=True,),
|
vg_new=dict(type='str', required=True),
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -507,7 +507,7 @@ def main():
|
||||||
state_file=dict(type='path'),
|
state_file=dict(type='path'),
|
||||||
targets=dict(type='list', elements='str', default=[]),
|
targets=dict(type='list', elements='str', default=[]),
|
||||||
lock=dict(type='bool', default=True),
|
lock=dict(type='bool', default=True),
|
||||||
lock_timeout=dict(type='int',),
|
lock_timeout=dict(type='int'),
|
||||||
force_init=dict(type='bool', default=False),
|
force_init=dict(type='bool', default=False),
|
||||||
backend_config=dict(type='dict'),
|
backend_config=dict(type='dict'),
|
||||||
backend_config_files=dict(type='list', elements='path'),
|
backend_config_files=dict(type='list', elements='path'),
|
||||||
|
|
|
@ -29,7 +29,7 @@ class TestDatacenterInfoModule(FactsParamsTest):
|
||||||
def test_should_get_all_datacenters(self):
|
def test_should_get_all_datacenters(self):
|
||||||
self.resource.get_all.return_value = {"name": "Data Center Name"}
|
self.resource.get_all.return_value = {"name": "Data Center Name"}
|
||||||
|
|
||||||
self.mock_ansible_module.params = dict(config='config.json',)
|
self.mock_ansible_module.params = dict(config='config.json')
|
||||||
|
|
||||||
DatacenterInfoModule().run()
|
DatacenterInfoModule().run()
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue