You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have been using 7.3.0 collection for some time, but it stopped working with upgrade to 7.5.0.
amazon.aws.iam_role is no longer able to ignore already existing entries and it fails with
Traceback (most recent call last):
File "/tmp/ansible_amazon.aws.iam_role_payload_olpq3tet/ansible_amazon.aws.iam_role_payload.zip/ansible_collections/amazon/aws/plugins/modules/iam_role.py", line 685, in main
create_or_update_role(module, client)
File "/tmp/ansible_amazon.aws.iam_role_payload_olpq3tet/ansible_amazon.aws.iam_role_payload.zip/ansible_collections/amazon/aws/plugins/modules/iam_role.py", line 496, in create_or_update_role
changed |= create_instance_profiles(client, check_mode, role_name, path)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/tmp/ansible_amazon.aws.iam_role_payload_olpq3tet/ansible_amazon.aws.iam_role_payload.zip/ansible_collections/amazon/aws/plugins/modules/iam_role.py", line 523, in create_instance_profiles
create_iam_instance_profile(client, role_name, path, {})
File "/tmp/ansible_amazon.aws.iam_role_payload_olpq3tet/ansible_amazon.aws.iam_role_payload.zip/ansible_collections/amazon/aws/plugins/module_utils/errors.py", line 46, in handler
raise cls._CUSTOM_EXCEPTION(message=f"Failed to {description}", exception=e) from e
ansible_collections.amazon.aws.plugins.module_utils.iam.AnsibleIAMError: Failed to create instance profile: An error occurred (EntityAlreadyExists) when calling the CreateInstanceProfile operation: Instance Profile HA-Role-Pacemaker already exists.
Summary
I have been using 7.3.0 collection for some time, but it stopped working with upgrade to 7.5.0.
amazon.aws.iam_role is no longer able to ignore already existing entries and it fails with
Issue Type
Bug Report
Component Name
amazon.aws.iam_role
Ansible Version
Collection Versions
AWS SDK versions
Configuration
OS / Environment
SLES for SAP 15 SP3
SLES for SAP 15 SP5
openSUSE Tumbleweed
Steps to Reproduce
https://github.com/sap-linuxlab/community.sap_infrastructure/blob/0e67afc14738c8731192ef9f5040496c4a96e9b1/roles/sap_vm_provision/tasks/platform_ansible/aws_ec2_vs/execute_setup_ha.yml#L257
Expected Results
IAM role HA-Role-Pacemaker is created.
Actual Results
Code of Conduct
The text was updated successfully, but these errors were encountered: