mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
Scrub choices=BOOLEANS from remaining core module references. Correct form in argument_spec is type='dict'.
This commit is contained in:
parent
3312099e70
commit
0e8c7b1c03
8 changed files with 14 additions and 18 deletions
|
@ -313,12 +313,11 @@ class ElbManager:
|
||||||
def main():
|
def main():
|
||||||
argument_spec = ec2_argument_spec()
|
argument_spec = ec2_argument_spec()
|
||||||
argument_spec.update(dict(
|
argument_spec.update(dict(
|
||||||
state={'required': True,
|
state={'required': True, 'type' : 'bool'},
|
||||||
'choices': ['present', 'absent']},
|
|
||||||
instance_id={'required': True},
|
instance_id={'required': True},
|
||||||
ec2_elbs={'default': None, 'required': False, 'type':'list'},
|
ec2_elbs={'default': None, 'required': False, 'type':'list'},
|
||||||
enable_availability_zone={'default': True, 'required': False, 'choices': BOOLEANS, 'type': 'bool'},
|
enable_availability_zone={'default': True, 'required': False, 'type': 'bool'},
|
||||||
wait={'required': False, 'choices': BOOLEANS, 'default': True, 'type': 'bool'},
|
wait={'required': False, 'default': True, 'type': 'bool'},
|
||||||
wait_timeout={'requred': False, 'default': 0, 'type': 'int'}
|
wait_timeout={'requred': False, 'default': 0, 'type': 'int'}
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
|
|
@ -467,11 +467,9 @@ def main():
|
||||||
state={'required': True, 'choices': ['present', 'absent']},
|
state={'required': True, 'choices': ['present', 'absent']},
|
||||||
name={'required': True},
|
name={'required': True},
|
||||||
listeners={'default': None, 'required': False, 'type': 'list'},
|
listeners={'default': None, 'required': False, 'type': 'list'},
|
||||||
purge_listeners={'default': True, 'required': False,
|
purge_listeners={'default': True, 'required': False, 'type': 'bool'},
|
||||||
'choices': BOOLEANS, 'type': 'bool'},
|
|
||||||
zones={'default': None, 'required': False, 'type': 'list'},
|
zones={'default': None, 'required': False, 'type': 'list'},
|
||||||
purge_zones={'default': False, 'required': False,
|
purge_zones={'default': False, 'required': False, 'type': 'bool'},
|
||||||
'choices': BOOLEANS, 'type': 'bool'},
|
|
||||||
security_group_ids={'default': None, 'required': False, 'type': 'list'},
|
security_group_ids={'default': None, 'required': False, 'type': 'list'},
|
||||||
health_check={'default': None, 'required': False, 'type': 'dict'},
|
health_check={'default': None, 'required': False, 'type': 'dict'},
|
||||||
)
|
)
|
||||||
|
|
|
@ -124,7 +124,7 @@ def main():
|
||||||
ec2_url = dict(),
|
ec2_url = dict(),
|
||||||
ec2_secret_key = dict(aliases=['aws_secret_key', 'secret_key'], no_log=True),
|
ec2_secret_key = dict(aliases=['aws_secret_key', 'secret_key'], no_log=True),
|
||||||
ec2_access_key = dict(aliases=['aws_access_key', 'access_key']),
|
ec2_access_key = dict(aliases=['aws_access_key', 'access_key']),
|
||||||
wait = dict(choices=BOOLEANS, default='true'),
|
wait = dict(type='bool', default='true'),
|
||||||
wait_timeout = dict(type='number', default=0),
|
wait_timeout = dict(type='number', default=0),
|
||||||
snapshot_tags = dict(type='dict', default=dict()),
|
snapshot_tags = dict(type='dict', default=dict()),
|
||||||
)
|
)
|
||||||
|
|
|
@ -489,8 +489,8 @@ def main():
|
||||||
security_group_ids={'required': False, 'default': [],
|
security_group_ids={'required': False, 'default': [],
|
||||||
'type': 'list'},
|
'type': 'list'},
|
||||||
zone={'required': False, 'default': None},
|
zone={'required': False, 'default': None},
|
||||||
wait={'required': False, 'choices': BOOLEANS, 'default': True},
|
wait={'required': False, 'type' : 'bool', 'default': True},
|
||||||
hard_modify={'required': False, 'choices': BOOLEANS, 'default': False}
|
hard_modify={'required': False, 'type': 'bool', 'default': False}
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
|
@ -127,10 +127,9 @@ except ImportError:
|
||||||
def main():
|
def main():
|
||||||
module = AnsibleModule(
|
module = AnsibleModule(
|
||||||
argument_spec = dict(
|
argument_spec = dict(
|
||||||
detach_only = dict(choice=BOOLEANS),
|
detach_only = dict(type='bool'),
|
||||||
instance_name = dict(),
|
instance_name = dict(),
|
||||||
mode = dict(default='READ_ONLY',
|
mode = dict(default='READ_ONLY', choices=['READ_WRITE', 'READ_ONLY']),
|
||||||
choices=['READ_WRITE', 'READ_ONLY']),
|
|
||||||
name = dict(required=True),
|
name = dict(required=True),
|
||||||
size_gb = dict(default=10),
|
size_gb = dict(default=10),
|
||||||
state = dict(default='present'),
|
state = dict(default='present'),
|
||||||
|
|
|
@ -165,7 +165,7 @@ def keyfile(module, user, write=False, path=None, manage_dir=True):
|
||||||
uid = user_entry.pw_uid
|
uid = user_entry.pw_uid
|
||||||
gid = user_entry.pw_gid
|
gid = user_entry.pw_gid
|
||||||
|
|
||||||
if manage_dir in BOOLEANS_TRUE:
|
if manage_dir:
|
||||||
if not os.path.exists(sshdir):
|
if not os.path.exists(sshdir):
|
||||||
os.mkdir(sshdir, 0700)
|
os.mkdir(sshdir, 0700)
|
||||||
if module.selinux_enabled():
|
if module.selinux_enabled():
|
||||||
|
|
|
@ -185,9 +185,9 @@ class SysctlModule(object):
|
||||||
def _parse_value(self, value):
|
def _parse_value(self, value):
|
||||||
if value is None:
|
if value is None:
|
||||||
return ''
|
return ''
|
||||||
elif value.lower() in BOOLEANS_TRUE:
|
elif value.lower():
|
||||||
return '1'
|
return '1'
|
||||||
elif value.lower() in BOOLEANS_FALSE:
|
elif not value.lower():
|
||||||
return '0'
|
return '0'
|
||||||
else:
|
else:
|
||||||
return value.strip()
|
return value.strip()
|
||||||
|
|
|
@ -165,7 +165,7 @@ def main():
|
||||||
default = dict(default=None, aliases=['policy'], choices=['allow', 'deny', 'reject']),
|
default = dict(default=None, aliases=['policy'], choices=['allow', 'deny', 'reject']),
|
||||||
logging = dict(default=None, choises=['on', 'off', 'low', 'medium', 'high', 'full']),
|
logging = dict(default=None, choises=['on', 'off', 'low', 'medium', 'high', 'full']),
|
||||||
direction = dict(default=None, choises=['in', 'incoming', 'out', 'outgoing']),
|
direction = dict(default=None, choises=['in', 'incoming', 'out', 'outgoing']),
|
||||||
delete = dict(default=False, choices=BOOLEANS),
|
delete = dict(default=False, type='bool'),
|
||||||
insert = dict(default=None),
|
insert = dict(default=None),
|
||||||
rule = dict(default=None, choices=['allow', 'deny', 'reject', 'limit']),
|
rule = dict(default=None, choices=['allow', 'deny', 'reject', 'limit']),
|
||||||
interface = dict(default=None, aliases=['if']),
|
interface = dict(default=None, aliases=['if']),
|
||||||
|
|
Loading…
Reference in a new issue