mirror of
https://github.com/ansible/awx.git
synced 2026-05-16 13:57:39 -02:30
Converted tower_group
Splitting out tower_inventory_source from tower_group Copy/Paste typo fix and README update for breaking backwards compatability Update credential_type module and unit tests
This commit is contained in:
committed by
beeankha
parent
8a0432efb7
commit
1c505beba6
@@ -43,7 +43,7 @@ options:
|
||||
description:
|
||||
- The max hosts allowed in this organizations
|
||||
default: "0"
|
||||
type: str
|
||||
type: int
|
||||
required: False
|
||||
state:
|
||||
description:
|
||||
@@ -86,7 +86,7 @@ def main():
|
||||
name=dict(type='str', required=True),
|
||||
description=dict(type='str', required=False),
|
||||
custom_virtualenv=dict(type='str', required=False),
|
||||
max_hosts=dict(type='str', required=False, default="0"),
|
||||
max_hosts=dict(type='int', required=False, default="0"),
|
||||
state=dict(type='str', choices=['present', 'absent'], default='present', required=False),
|
||||
)
|
||||
|
||||
@@ -119,12 +119,7 @@ def main():
|
||||
if custom_virtualenv:
|
||||
org_fields['custom_virtualenv'] = custom_virtualenv
|
||||
if max_hosts:
|
||||
int_max_hosts = 0
|
||||
try:
|
||||
int_max_hosts = int(max_hosts)
|
||||
except Exception:
|
||||
module.fail_json(msg="Unable to convert max_hosts to an integer")
|
||||
org_fields['max_hosts'] = int_max_hosts
|
||||
org_fields['max_hosts'] = max_hosts
|
||||
|
||||
if state == 'absent':
|
||||
# If the state was absent we can let the module delete it if needed, the module will handle exiting from this
|
||||
|
||||
Reference in New Issue
Block a user