Hello Everybody,
to explain the odd behaviour, i post a snippet of what i launch via
ansible-playbook:
---
- name: test
hosts: localhost
gather_facts: false
vars:
tags:
OS: Debian
Codename: Jessie
Name: Test1234
tasks:
- name: tag vm
ec2_tag:
region: eu-central-1
resource: i-12345678
state: present
tags:
*"{{ item }}" *: "{{ tags[item] }}"
with_items: "{{ tags }}"
# Testing text output debug
- debug:
msg: "{{ tags[item] }}"
with_items: "{{ tags }}"
-cut-
What happens is: Looking into the AWS web console afterwards, shows me:
*-Tags-Key {{ item }} Value Test1234*
So it iterates through the key-value-pairs of tags setting them, but takes
the one I marked in bold literally :-)
Am I doing something wrong?
(When doing the same thing with debug-msg, it shows the right thing.)
Many thanks in advance,
Sebastian.
--
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/0c65c461-b713-4fe3-af88-43628b1bc181%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.