Deleting EC2 instance and termination_list mystery

57 views
Skip to first unread message

Erik Steffl

unread,
Jul 24, 2015, 9:39:41 PM7/24/15
to Ansible Project
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.

Brian Coca

unread,
Jul 24, 2015, 11:23:28 PM7/24/15
to Ansible Project
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
Reply all
Reply to author
Forward
0 new messages