Description
Summary
Getting unable to parse key data when running. The key data the string other private key in pem format
- name: get the Administrator password
community.aws.ec2_win_password:
instance_id: xxxxxx
debug_botocore_endpoint_logs: true
region: us-east-1
key_data: "{{ pem_key_string }}"
register: output
I'm thinking this is very similar to 👍
ansible/ansible#67275
Where it was a python 2-->3 problem though I'm sure it was updated here.
Issue Type
Bug Report
Component Name
ec2_win_password
Ansible Version
$ ansible --version
ansible [core 2.13.6]\n config file = /etc/ansible/ansible.cfg\n configured module search path = ['/home/runner/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']\n ansible python module location = /usr/lib/python3.9/site-packages/ansible\n ansible collection location = /runner/requirements_collections:/home/runner/.ansible/collections:/usr/share/ansible/collections\n executable location = /usr/bin/ansible\n python version = 3.9.13 (main, Nov 9 2022, 13:16:24) [GCC 8.5.0 20210514 (Red Hat 8.5.0-15)]\n jinja version = 3.0.3\n libyaml = True
Collection Versions
$ ansible-galaxy collection list
/usr/share/ansible/collections/ansible_collections\nCollection Version\n----------------------- -------\namazon.aws 3.2.0 \nansible.controller 4.2.1 \nansible.netcommon 3.1.1 \nansible.network 1.2.0 \nansible.posix 1.3.0 \nansible.security 1.0.0 \nansible.utils 2.6.1 \nansible.windows 1.9.0 \nansible.yang 1.0.0 \narista.eos 5.0.0 \nawx.awx 21.10.0\nazure.azcollection 1.14.0 \ncisco.asa 3.0.0 \ncisco.ios 3.0.0 \ncisco.iosxr 3.0.0 \ncisco.nxos 3.0.0 \ncloud.common 2.1.1 \ncommunity.general 6.1.0 \ncommunity.vmware 3.2.0 \ncommunity.windows 1.11.1 \nfrr.frr 2.0.0 \nibm.qradar 2.0.0 \njunipernetworks.junos 3.0.0 \nkubernetes.core 2.2.3 \nopenvswitch.openvswitch 2.1.0 \nredhat.insights 1.0.7 \nredhat.openshift 2.1.0 \nredhat.rhv 1.6.5 \nredhat.satellite 3.3.0 \nservicenow.itsm 1.3.3 \nsplunk.es 2.0.0 \ntrendmicro.deepsec 2.0.0 \nvmware.vmware_rest 2.1.5 \nvyos.vyos 3.0.0 \n\n# /runner/requirements_collections/ansible_collections\nCollection Version\n---------------- -------\namazon.aws 5.1.0 \ncommunity.aws 5.1.0 \nredhat.satellite 3.7.0 ",
AWS SDK versions
$ pip show boto boto3 botocore
Name: boto
Version: 2.49.0
Summary: Amazon Web Services Library
Home-page: https://github.com/boto/boto/
Author: Mitch Garnaat
Author-email: [email protected]
License: MIT
Location: /usr/local/lib/python3.9/site-packages
Requires:
Required-by:
Name: boto3
Version: 1.26.25
Summary: The AWS SDK for Python
Home-page: https://github.com/boto/boto3
Author: Amazon Web Services
Author-email: None
License: Apache License 2.0
Location: /usr/local/lib/python3.9/site-packages
Requires: s3transfer, jmespath, botocore
Required-by:
Name: botocore
Version: 1.29.25
Summary: Low-level, data-driven core of boto 3.
Home-page: https://github.com/boto/botocore
Author: Amazon Web Services
Author-email: None
License: Apache License 2.0
Location: /usr/local/lib/python3.9/site-packages
Requires: jmespath, python-dateutil, urllib3
Required-by: s3transfer, boto3
Configuration
$ ansible-config dump --only-changed
OS / Environment
RHEL8 Execution Environment from Red Hat
Steps to Reproduce
- name: get the Administrator password
community.aws.ec2_win_password:
instance_id: xx
debug_botocore_endpoint_logs: true
region: us-east-1
key_data: "{{ pem_key_string }}"
register: output
Expected Results
TASK [Get the Windows Password of the administrator] ***************************
task path: /tmp/awx_569_zbjol32w/project/aws_create_vm.yml:53
changed: [localhost] => {"changed": true, "elapsed": 117, "win_password": "zgRkSd5r231q;.oUWlD13dkC;euT7ar{aS"}
Actual Results
TASK [Get the Windows Password of the administrator] ***************************
task path: /tmp/awx_565_m93qwf3b/project/aws_create_vm.yml:53
fatal: [localhost]: FAILED! => {"changed": false, "msg": "unable to parse key data"}
Code of Conduct
- I agree to follow the Ansible Code of Conduct