Remove examples of module antipattern of setting the choices array for boolean types.

This commit is contained in:
Michael DeHaan
2013-10-11 08:45:13 -04:00
parent a9225d0c7a
commit 119b6d73dd
13 changed files with 13 additions and 16 deletions

View File

@@ -341,7 +341,7 @@ def main():
state=dict(default='present', choices=['present', 'absent'], type='str'),
name=dict(required=True, type='str'),
gid=dict(default=None, type='str'),
system=dict(default='no', choices=['yes', 'no'], type='bool'),
system=dict(default=False, type='bool'),
),
supports_check_mode=True
)

View File

@@ -1108,7 +1108,7 @@ def main():
state = dict(choices=['running', 'started', 'stopped', 'restarted', 'reloaded']),
sleep = dict(required=False, type='int', default=None),
pattern = dict(required=False, default=None),
enabled = dict(choices=BOOLEANS, type='bool'),
enabled = dict(type='bool'),
runlevel = dict(required=False, default='default'),
arguments = dict(aliases=['args'], default=''),
),

View File

@@ -1372,7 +1372,7 @@ def main():
# following options are specific to usermod
append=dict(default='no', type='bool'),
# following are specific to ssh key generation
generate_ssh_key=dict(choices=BOOLEANS, type='bool'),
generate_ssh_key=dict(type='bool'),
ssh_key_bits=dict(default=ssh_defaults['bits'], type='str'),
ssh_key_type=dict(default=ssh_defaults['type'], type='str'),
ssh_key_file=dict(default=None, type='str'),