diff options
author | Ted Timmons <ted@perljam.net> | 2017-07-18 21:35:31 +0200 |
---|---|---|
committer | Ryan Brown <sb@ryansb.com> | 2017-07-18 15:35:31 -0400 |
commit | 65da6a07896f24948e5fd8c0c0413e8d158ff5ee (patch) | |
tree | 9c3f5603c2ce65924235177f8cbf25b0c81c7697 | |
parent | 16f796460f5307d69b632cdb11e479a36485d660 (diff) | |
download | ansible-65da6a07896f24948e5fd8c0c0413e8d158ff5ee.tar.gz |
[cloud][py3] Use to_bytes in ec2_key module in two more places (#26936)
PR #23051 fixes the first failure of this, but it doesn't fix the successive calls.
-rw-r--r-- | lib/ansible/modules/cloud/amazon/ec2_key.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/ansible/modules/cloud/amazon/ec2_key.py b/lib/ansible/modules/cloud/amazon/ec2_key.py index 221ce24df4..062bddcd25 100644 --- a/lib/ansible/modules/cloud/amazon/ec2_key.py +++ b/lib/ansible/modules/cloud/amazon/ec2_key.py @@ -196,7 +196,7 @@ def main(): test = ec2.get_key_pair(tmpkeyname) # create tmp key - tmpkey = ec2.import_key_pair(tmpkeyname, key_material) + tmpkey = ec2.import_key_pair(tmpkeyname, to_bytes(key_material)) # get tmp key fingerprint tmpfingerprint = tmpkey.fingerprint # delete tmp key @@ -205,7 +205,7 @@ def main(): if key.fingerprint != tmpfingerprint: if not module.check_mode: key.delete() - key = ec2.import_key_pair(name, key_material) + key = ec2.import_key_pair(name, to_bytes(key_material)) if wait: start = time.time() |