mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-07-22 21:00:22 -07:00
[cloud][aws] Add metrics_collection options to ec2_asg module (#35180)
* Added metrics_collection management to ec2_asg module to switch ASG metrics on and off. * Fixed typo in documentation of ec2_asg module * Removed extra blank line in ec2_asg.py * Docs fixes for ec2_asg module * Added integration test for ec2_asg metrics flag * Trying different syntax for ec2_asg test
This commit is contained in:
parent
6a223d5576
commit
404f9260d9
2 changed files with 84 additions and 1 deletions
|
@ -208,6 +208,31 @@
|
|||
that:
|
||||
- "output.viable_instances == 0"
|
||||
|
||||
- name: kill asg
|
||||
ec2_asg:
|
||||
name: "{{ resource_prefix }}-asg"
|
||||
state: absent
|
||||
<<: *aws_connection_info
|
||||
async: 300
|
||||
# ============================================================
|
||||
|
||||
- name: create asg with asg metrics enabled
|
||||
ec2_asg:
|
||||
name: "{{ resource_prefix }}-asg"
|
||||
metrics_collection: true
|
||||
launch_config_name: "{{ resource_prefix }}-lc"
|
||||
desired_capacity: 0
|
||||
min_size: 0
|
||||
max_size: 0
|
||||
vpc_zone_identifier: "{{ testing_subnet.subnet.id }}"
|
||||
state: present
|
||||
<<: *aws_connection_info
|
||||
register: output
|
||||
|
||||
- assert:
|
||||
that:
|
||||
- "'Group' in output.metrics_collection.0.Metric"
|
||||
|
||||
- name: kill asg
|
||||
ec2_asg:
|
||||
name: "{{ resource_prefix }}-asg"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue