1) My inventory file:
[ec2hosts]
10.130.0.123 instance-id=i-01234567
2) My yaml file, delete-instance.yml that *works*, adapted from an
ansible example:
---
- hosts: ec2hosts
gather_facts: True
connection: local
vars:
ec2_access_key: --DELETED--
ec2_secret_key: --DELETED--
region: "us-east-1"
tasks:
- name: destroy all instances
ec2: state='absent'
aws_access_key={{ ec2_access_key }}
aws_secret_key={{ ec2_secret_key }}
region={{ region }}
instance_ids=${instance-id}
wait=true
3) If I change the line that contains ${ansible_ec2_instance-id} above to:
instance_ids={{ instance-id }}
I get this error:
TASK: [destroy all instances] *************************************************
fatal: [10.130.0.123] => unable to look up a name or access an
attribute in template string
FATAL: all hosts have already failed -- aborting
Thank you very much!
iordan
On Sun, Mar 2, 2014 at 2:36 PM, Michael DeHaan <[email protected]> wrote:
> This should be impossible as there is no legacy variable support on devel,
> and it's a pretty basic declaration.
>
> Can we see the task, template, output, etc?
>
> -- Michael
>
> On Mar 1, 2014, at 7:13 PM, i iordanov <[email protected]> wrote:
>
> Hey guys,
>
> If I have the following in an inventory file:
>
> [somehostgroup]
> somehost somevariable=1234
>
> I can access the variable with:
> ${somevariable}
>
> But I cannot access the variable with:
> {{ somevariable }}
>
> as I would expect. Is this expected?
>
> Many thanks!
> iordan
>
> --
> 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 [email protected].
>
> To post to this group, send email to [email protected].
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/ansible-project/0a616444-1a15-451d-8543-5b8afce56ec2%40googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.
>
> --
> You received this message because you are subscribed to a topic in the
> Google Groups "Ansible Project" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/ansible-project/-voEAQDGNzI/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to
> [email protected].
> To post to this group, send email to [email protected].
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/ansible-project/-3900642294177465073%40unknownmsgid.
>
> For more options, visit https://groups.google.com/groups/opt_out.
--
The conscious mind has only one thread of execution.
--
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 [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/ansible-project/CAMS0tn2qAqGs0bhZ1hyhh9%3DC4uoTzkXFrwG0tG6Kqn86O4%3Dd%2Bw%40mail.gmail.com.
For more options, visit https://groups.google.com/groups/opt_out.