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():
|
||||
argument_spec = ec2_argument_spec()
|
||||
argument_spec.update(dict(
|
||||
state={'required': True,
|
||||
'choices': ['present', 'absent']},
|
||||
state={'required': True, 'type' : 'bool'},
|
||||
instance_id={'required': True},
|
||||
ec2_elbs={'default': None, 'required': False, 'type':'list'},
|
||||
enable_availability_zone={'default': True, 'required': False, 'choices': BOOLEANS, 'type': 'bool'},
|
||||
wait={'required': False, 'choices': BOOLEANS, 'default': True, 'type': 'bool'},
|
||||
enable_availability_zone={'default': True, 'required': False, 'type': 'bool'},
|
||||
wait={'required': False, 'default': True, 'type': 'bool'},
|
||||
wait_timeout={'requred': False, 'default': 0, 'type': 'int'}
|
||||
)
|
||||
)
|
||||
|
|
|
@ -467,11 +467,9 @@ def main():
|
|||
state={'required': True, 'choices': ['present', 'absent']},
|
||||
name={'required': True},
|
||||
listeners={'default': None, 'required': False, 'type': 'list'},
|
||||
purge_listeners={'default': True, 'required': False,
|
||||
'choices': BOOLEANS, 'type': 'bool'},
|
||||
purge_listeners={'default': True, 'required': False, 'type': 'bool'},
|
||||
zones={'default': None, 'required': False, 'type': 'list'},
|
||||
purge_zones={'default': False, 'required': False,
|
||||
'choices': BOOLEANS, 'type': 'bool'},
|
||||
purge_zones={'default': False, 'required': False, 'type': 'bool'},
|
||||
security_group_ids={'default': None, 'required': False, 'type': 'list'},
|
||||
health_check={'default': None, 'required': False, 'type': 'dict'},
|
||||
)
|
||||
|
|
|
@ -124,7 +124,7 @@ def main():
|
|||
ec2_url = dict(),
|
||||
ec2_secret_key = dict(aliases=['aws_secret_key', 'secret_key'], no_log=True),
|
||||
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),
|
||||
snapshot_tags = dict(type='dict', default=dict()),
|
||||
)
|
||||
|
|
|
@ -489,8 +489,8 @@ def main():
|
|||
security_group_ids={'required': False, 'default': [],
|
||||
'type': 'list'},
|
||||
zone={'required': False, 'default': None},
|
||||
wait={'required': False, 'choices': BOOLEANS, 'default': True},
|
||||
hard_modify={'required': False, 'choices': BOOLEANS, 'default': False}
|
||||
wait={'required': False, 'type' : 'bool', 'default': True},
|
||||
hard_modify={'required': False, 'type': 'bool', 'default': False}
|
||||
)
|
||||
)
|
||||
|
||||
|
|
|
@ -127,10 +127,9 @@ except ImportError:
|
|||
def main():
|
||||
module = AnsibleModule(
|
||||
argument_spec = dict(
|
||||
detach_only = dict(choice=BOOLEANS),
|
||||
detach_only = dict(type='bool'),
|
||||
instance_name = dict(),
|
||||
mode = dict(default='READ_ONLY',
|
||||
choices=['READ_WRITE', 'READ_ONLY']),
|
||||
mode = dict(default='READ_ONLY', choices=['READ_WRITE', 'READ_ONLY']),
|
||||
name = dict(required=True),
|
||||
size_gb = dict(default=10),
|
||||
state = dict(default='present'),
|
||||
|
|
|
@ -165,7 +165,7 @@ def keyfile(module, user, write=False, path=None, manage_dir=True):
|
|||
uid = user_entry.pw_uid
|
||||
gid = user_entry.pw_gid
|
||||
|
||||
if manage_dir in BOOLEANS_TRUE:
|
||||
if manage_dir:
|
||||
if not os.path.exists(sshdir):
|
||||
os.mkdir(sshdir, 0700)
|
||||
if module.selinux_enabled():
|
||||
|
|
|
@ -185,9 +185,9 @@ class SysctlModule(object):
|
|||
def _parse_value(self, value):
|
||||
if value is None:
|
||||
return ''
|
||||
elif value.lower() in BOOLEANS_TRUE:
|
||||
elif value.lower():
|
||||
return '1'
|
||||
elif value.lower() in BOOLEANS_FALSE:
|
||||
elif not value.lower():
|
||||
return '0'
|
||||
else:
|
||||
return value.strip()
|
||||
|
|
|
@ -165,7 +165,7 @@ def main():
|
|||
default = dict(default=None, aliases=['policy'], choices=['allow', 'deny', 'reject']),
|
||||
logging = dict(default=None, choises=['on', 'off', 'low', 'medium', 'high', 'full']),
|
||||
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),
|
||||
rule = dict(default=None, choices=['allow', 'deny', 'reject', 'limit']),
|
||||
interface = dict(default=None, aliases=['if']),
|
||||
|
|
Loading…
Reference in a new issue