-
Bug
-
Resolution: Cannot Reproduce
-
Undefined
-
None
-
Unspecified
-
False
-
-
False
-
-
-
CC Team ScrumBan: Sprint 0
https://github.com/ansible-collections/amazon.aws/issues/2118
-
-
- Summary
-
`trying to add new tag inside my current ASG created before seems apply changes but appears this error and break
-
-
- Issue Type
-
Bug Report
-
-
- Component Name
-
ec2_asg
-
-
- Ansible Version
-
```console
$ ansible --version
ansible [core 2.16.6]
config file = /etc/ansible/ansible.cfg
configured module search path = ['/home/user/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
ansible python module location = /home/user/.local/lib/python3.10/site-packages/ansible
ansible collection location = /home/user/.ansible/collections:/usr/share/ansible/collections
executable location = /home/user/.local/bin/ansible
python version = 3.10.12 (main, Nov 20 2023, 15:14:05) [GCC 11.4.0] (/usr/bin/python3)
jinja version = 3.1.4
libyaml = True
```
-
-
- Configuration
-
```console
- if using a version older than ansible-core 2.12 you should omit the '-t all'
$ ansible-config dump --only-changed -t all - Since Ansible 2.12 (core):
- To generate an example config file (a "disabled" one with all default settings, commented out):
- $ ansible-config init --disabled > ansible.cfg
# - Also you can now have a more complete file by including existing plugins:
- ansible-config init --disabled -t all > ansible.cfg
- For previous versions of Ansible you can check for examples in the 'stable' branches of each version
- Note that this file was always incomplete and lagging changes to configuration settings
- for example, for 2.9: https://github.com/ansible/ansible/blob/stable-2.9/examples/ansible.cfg
```
-
-
- OS / Environment
-
Ubuntu 22.04 WSL
-
-
- Steps to Reproduce
-
<!--- Paste example playbooks or commands between quotes below -->
```
name: Get Auto Scaling Groups for EKS cluster
amazon.aws.autoscaling_group_info:
tags:
eks:cluster-name: add-tags-asg
register: asg_info
name: Add new tag to Auto Scaling Groups
amazon.aws.autoscaling_group:
name: "{{ item.auto_scaling_group_name }}"
tags:
- Product: new tag
propagate_at_launch: true
loop: "{{ asg_info.results }}"
register: asg_update
debug: msg="{{ asg_update.stderr }}"`
```
-
-
- Expected Results
-
New tag added to ASG
-
-
- Actual Results
-
```console
`
Traceback (most recent call last):
File "/tmp/ansible_amazon.aws.autoscaling_group_payload_s3ziqwd6/ansible_amazon.aws.autoscaling_group_payload.zip/ansible_collections/amazon/aws/plugins/modules/autoscaling_group.py", line 1399, in create_autoscaling_group
KeyError: 'LaunchConfigurationName'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/user/.ansible/tmp/ansible-tmp-1717076495.9101698-178940-110762071316883/AnsiballZ_autoscaling_group.py", line 107, in <module>
_ansiballz_main()
File "/home/user/.ansible/tmp/ansible-tmp-1717076495.9101698-178940-110762071316883/AnsiballZ_autoscaling_group.py", line 99, in _ansiballz_main
invoke_module(zipped_mod, temp_path, ANSIBALLZ_PARAMS)
File "/home/user/.ansible/tmp/ansible-tmp-1717076495.9101698-178940-110762071316883/AnsiballZ_autoscaling_group.py", line 47, in invoke_module
runpy.run_module(mod_name='ansible_collections.amazon.aws.plugins.modules.autoscaling_group', init_globals=dict(_module_fqn='ansible_collections.amazon.aws.plugins.modules.autoscaling_group', _modlib_path=modlib_path),
File "/usr/lib/python3.10/runpy.py", line 224, in run_module
return _run_module_code(code, init_globals, run_name, mod_spec)
File "/usr/lib/python3.10/runpy.py", line 96, in _run_module_code
_run_code(code, mod_globals, init_globals,
File "/usr/lib/python3.10/runpy.py", line 86, in _run_code
exec(code, run_globals)
File "/tmp/ansible_amazon.aws.autoscaling_group_payload_s3ziqwd6/ansible_amazon.aws.autoscaling_group_payload.zip/ansible_collections/amazon/aws/plugins/modules/autoscaling_group.py", line 2005, in <module>
File "/tmp/ansible_amazon.aws.autoscaling_group_payload_s3ziqwd6/ansible_amazon.aws.autoscaling_group_payload.zip/ansible_collections/amazon/aws/plugins/modules/autoscaling_group.py", line 1977, in main
File "/tmp/ansible_amazon.aws.autoscaling_group_payload_s3ziqwd6/ansible_amazon.aws.autoscaling_group_payload.zip/ansible_collections/amazon/aws/plugins/modules/autoscaling_group.py", line 1401, in create_autoscaling_group
KeyError: 'LaunchTemplate'
`
```
-
-
- Code of Conduct
-
- [X] I agree to follow the Ansible Code of Conduct