Discussion:
[ansible-project] Deleting EC2 instance and termination_list mystery
Erik Steffl
2015-07-25 01:39:41 UTC
Permalink
When not including termination_list parameter:

TASK: [Delete template API instance]
******************************************
failed: [localhost -> 127.0.0.1] => {"failed": true}
msg: termination_list needs to be a list of instances to terminate

FATAL: all hosts have already failed -- aborting

So I include termination_list and:

TASK: [Delete template API instance]
******************************************
failed: [localhost -> 127.0.0.1] => {"failed": true}
msg: unsupported parameter for module: termination_list

FATAL: all hosts have already failed -- aborting

Config is:

{
"name": "Delete template API instance",
"local_action": {
"module": "ec2",
"region": "us-east-1",
"state": "absent",
"wait": "yes",
"assign_public_ip": "no",
"count": 1,
"ebs_optimized": "no",
"image": "ami-f11ac69a",
"instance_tags": {
"Name": "{{ xaos_template_instance_name }}"
},
"instance_type": "t2.micro",
"key_name": "juju-dev",
"monitoring": "yes",
"vpc_subnet_id": "subnet-376d296e"
}
},

Any ideas how to delete instance? Specifically by Name (tag), we create
instance in one play and want to remove them in another play.

Thanks!

erik
--
This IS a signature.
--
You received this message because you are subscribed to the Google Groups "Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ansible-project+***@googlegroups.com.
To post to this group, send email to ansible-***@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/d57650a1-33e5-4aa3-829d-8893b12cdf82%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Brian Coca
2015-07-25 03:23:25 UTC
Permalink
it is the case of the error giving out an internal name, it should be
fixed in the module, but what you are missing in the module is the
instance_ids (which internally gets passed to the boto termination
list).
--
Brian Coca
--
You received this message because you are subscribed to the Google Groups "Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ansible-project+***@googlegroups.com.
To post to this group, send email to ansible-***@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/CAJ5XC8kR%3Du6Eq_LdfzFmNv%2B%2BDr-4A0HKq9CU3DPxpEY5Fqu_Tg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
Loading...