Be explicit with AnsibleModule types

When moving to ansible 2.1.0.0, we'll need to be more explicity about
our AnsibleModule parameters. Ansible now defaults them to strings.

This will ensure groups is a list.

Change-Id: Ic126c200a432277c0ef406d4406f527d6a3c9fa7
Signed-off-by: Paul Belanger <pabelanger@redhat.com>
This commit is contained in:
Paul Belanger 2016-06-14 09:08:57 -04:00
parent b5fc21ca37
commit b8e3bdd1fd
No known key found for this signature in database
GPG Key ID: 611A80832067AF38
1 changed files with 3 additions and 3 deletions

View File

@ -42,9 +42,9 @@ author: Monty Taylor
def main():
module = AnsibleModule(
argument_spec=dict(
fqdn=dict(required=True),
groups=dict(required=True),
location=dict(required=True),
fqdn=dict(required=True, type='string'),
groups=dict(required=True, type='list'),
location=dict(required=True, type='string'),
),
)
p = module.params