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.