Commit graph

11 commits

Author SHA1 Message Date
Markus Bergholz
822077fefd
Asg mixed instance types (#67045)
* merge from origin pr 55067

* handle update existing asg with mixed-instance-policy

* fix documentation and append output

* update output documentation

* update documentation version added

* add integration test for mixed instance policy using launch template

* add changelog fragment

* Update lib/ansible/modules/cloud/amazon/ec2_asg.py

Co-Authored-By: Mark Chappell <mchappel@redhat.com>

* Update lib/ansible/modules/cloud/amazon/ec2_asg.py

Co-Authored-By: Mark Chappell <mchappel@redhat.com>

* Update lib/ansible/modules/cloud/amazon/ec2_asg.py

Co-Authored-By: Jill R <4121322+jillr@users.noreply.github.com>

* add warning about botocore version and add expand example documentation

* Update changelogs/fragments/67045-ec2_asg_mixed_instance_policy.yml

Co-Authored-By: Mark Chappell <mchappel@redhat.com>

* Update lib/ansible/modules/cloud/amazon/ec2_asg.py

Co-Authored-By: Mark Chappell <mchappel@redhat.com>

* Update lib/ansible/modules/cloud/amazon/ec2_asg.py

Co-Authored-By: Mark Chappell <mchappel@redhat.com>

* remove useless line

Co-authored-by: Yi-Tse Hong <yitse.hong@soocii.me>
Co-authored-by: Mark Chappell <mchappel@redhat.com>
Co-authored-by: Jill R <4121322+jillr@users.noreply.github.com>
2020-02-05 09:04:15 +01:00
Mark Chappell
b8650c0a50 aws_asg: Fix idempotency when using tags and metrics (#61284)
* Update AWS hacking policy to enable ASG Tagging management

* aws_asg: Add tests for ASG Tagging (including idempotency)

* aws_asg: ignore sort order when comparing tags on the ASG (fix idempotency)

* ec2_asg: (integration tests) test for idempotency when managing metrics collection

* ec2_asg: sort list of enabled metrics to ensure clean comparisons.
2019-09-06 12:48:40 -07:00
Mark Chappell
1f733e2d55 ec2_asg: fix the integration tests (#61212) 2019-08-23 14:53:47 -04:00
Felix Fontein
804d5eaf8e
AWS: _facts -> _info (part 3) (#57635)
* Rename ec2_ami_facts -> ec2_ami_info.

* Rename ec2_asg_facts -> ec2_asg_info.

* Rename ec2_customer_gateway_facts -> ec2_customer_gateway_info.

* Rename ec2_eip_facts -> ec2_eip_info.

* Rename ec2_elb_facts -> ec2_elb_info.

* Rename ec2_eni_facts -> ec2_eni_info.

* Rename ec2_group_facts -> ec2_group_info.

* Rename ec2_instance_facts -> ec2_instance_info.

* Rename ec2_lc_facts -> ec2_lc_info.

* Rename ec2_placement_group_facts -> ec2_placement_group_info.

* Rename ec2_snapshot_facts -> ec2_snapshot_info.

* Rename ec2_vol_facts -> ec2_vol_info.

* Update module defaults, add changelog and porting guide.

* Forgot one occurence of ec2_instance_facts.

* Update BOTMETA.

* Break too long line.
2019-06-10 19:33:38 +02:00
Dag Wieers
12e7e9650e
Make use of Jinja tests 'finished' (#43233)
And also used 'changed' and 'failed' tests while we are at it.
2018-07-30 10:41:49 +02:00
Matt Clay
d653d52dd8
Mark unsupported integration tests. (#38251)
* Mark UCS integration tests as unsupported.
* Mark various connection tests as unsupported.
* Mark win_domain_group test as unsupported.
* Mark java_cert test as unsupported.
* Mark synchronize-buildah test as unsupported.
* Mark various AWS tests as unsupported.
* Mark azure_rm_acs test as unsupported.
* Mark GCP tests as unsupported.
2018-04-03 19:04:23 -07:00
msven
a2b3120e85 ec2_asg: fix #28087 and #35993 (#36679)
Fixes #35993 - Changes to update_size in commit eb4cc31 made it so
the group dict passed into update_size was not modified. As a result,
the 'replace' call does not see an updated min_size like it previously
did and doesn't pause to wait for any new instances to spin up. Instead,
it moves straight into terminating old instances. Fix is to add batch_size
to min_size when calling wait_for_new_inst.

Fixes #28087 - Make replace_all_instances and replace_instances behave
exactly the same by setting replace_instances = current list of instances
when replace_all_instances used. Root cause of issue was that without lc_check
terminate_batch will terminate all instances passed to it and after updating
the asg size we were querying the asg again for the list of instances - so terminate batch
saw the list including new ones just spun up.

When creating new asg with replace_all_instances: yes and lc_check: false
the instances that are initially created are then subsequently replaced.
This change makes it so replace only occurs if the asg already existed.

Add integration tests for #28087 and #35993.
2018-03-05 11:47:31 -05:00
Stefan Horning
404f9260d9 [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
2018-02-12 10:22:18 -05:00
Sloane Hertel
45ef6bdd40
Roll boto3_conn tests into ec2_asg (#35854)
* Roll boto3_conn tests into ec2_asg.
2018-02-07 14:24:40 -05:00
Ryan Brown
b60c67d329 Remove double-specified EC2 ASG test parameters (#34714)
In the ec2_asg integration tests there are a couple places where
parameters are specified twice (as bot `tag.Name` and `name:`) and
others where those parameters aren't needed for the state requested.
2018-01-11 08:44:40 +10:00
Sloane Hertel
788010d0f0 [cloud][testing] New integration tests for ec2_asg (#30554)
* Add some integration tests for ec2_asg.

* Remove exception handling from ec2_asg boto3 connection since it is handled in boto3_conn().

* Update test failure assertions

* Use yaml anchor for credentials and remove unnecessary dependencies.

* Move AWS boto3 module credentials tests to separate target

* Remove filters from tests
2018-01-08 11:21:49 -05:00