1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2024-09-14 20:13:21 +02:00

Remove expanduser and use type path

This patch removes the use of expanduser and replaces it with
type 'path'. This patch is related to #12263
This commit is contained in:
Tim Rupp 2017-02-11 15:58:46 -08:00 committed by Brian Coca
parent c4d3bf3207
commit 4900201c5b

View file

@ -92,7 +92,6 @@ tasks:
'''
from base64 import b64decode
from os.path import expanduser
from Crypto.Cipher import PKCS1_v1_5
from Crypto.PublicKey import RSA
import datetime
@ -107,7 +106,7 @@ def main():
argument_spec = ec2_argument_spec()
argument_spec.update(dict(
instance_id = dict(required=True),
key_file = dict(required=True),
key_file = dict(required=True, type='path'),
key_passphrase = dict(no_log=True, default=None, required=False),
wait = dict(type='bool', default=False, required=False),
wait_timeout = dict(default=120, required=False),
@ -119,7 +118,7 @@ def main():
module.fail_json(msg='Boto required for this module.')
instance_id = module.params.get('instance_id')
key_file = expanduser(module.params.get('key_file'))
key_file = module.params.get('key_file')
key_passphrase = module.params.get('key_passphrase')
wait = module.params.get('wait')
wait_timeout = int(module.params.get('wait_timeout'))