From bdb231213db7d62eede63f18d2bc21957169a913 Mon Sep 17 00:00:00 2001 From: Michael DeHaan Date: Mon, 18 Mar 2013 00:40:57 -0400 Subject: [PATCH] Add type casting to user/group modules, remove executable bit from other modules --- library/group | 8 ++++---- library/lvol | 0 library/pkgin | 0 library/user | 28 ++++++++++++++-------------- 4 files changed, 18 insertions(+), 18 deletions(-) mode change 100755 => 100644 library/lvol mode change 100755 => 100644 library/pkgin diff --git a/library/group b/library/group index 03ae1438da..7feb35161f 100644 --- a/library/group +++ b/library/group @@ -213,10 +213,10 @@ class AIX(Group): def main(): module = AnsibleModule( argument_spec = dict( - state=dict(default='present', choices=['present', 'absent']), - name=dict(required=True), - gid=dict(default=None), - system=dict(default='no', choices=['yes', 'no']), + 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'), ), supports_check_mode=True ) diff --git a/library/lvol b/library/lvol old mode 100755 new mode 100644 diff --git a/library/pkgin b/library/pkgin old mode 100755 new mode 100644 diff --git a/library/user b/library/user index a297019cd0..7a30b42c91 100644 --- a/library/user +++ b/library/user @@ -992,15 +992,15 @@ def main(): } module = AnsibleModule( argument_spec = dict( - state=dict(default='present', choices=['present', 'absent']), - name=dict(required=True, aliases=['user']), - uid=dict(default=None), - group=dict(default=None), - groups=dict(default=None), - comment=dict(default=None), - home=dict(default=None), - shell=dict(default=None), - password=dict(default=None), + state=dict(default='present', choices=['present', 'absent'], type='str'), + name=dict(required=True, aliases=['user'], type='str'), + uid=dict(default=None, type='str'), + group=dict(default=None, type='str'), + groups=dict(default=None, type='str'), + comment=dict(default=None, type='str'), + home=dict(default=None, type='str'), + shell=dict(default=None, type='str'), + password=dict(default=None, type='str'), # following options are specific to userdel force=dict(default='no', type='bool'), remove=dict(default='no', type='bool'), @@ -1011,11 +1011,11 @@ def main(): append=dict(default='no', type='bool'), # following are specific to ssh key generation generate_ssh_key=dict(choices=BOOLEANS, type='bool'), - ssh_key_bits=dict(default=ssh_defaults['bits']), - ssh_key_type=dict(default=ssh_defaults['type']), - ssh_key_file=dict(default=None), - ssh_key_comment=dict(default=ssh_defaults['comment']), - ssh_key_passphrase=dict(default=None) + 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'), + ssh_key_comment=dict(default=ssh_defaults['comment'], type='str'), + ssh_key_passphrase=dict(default=None, type='str') ), supports_check_mode=True )