Hello,
I am new to ansible tower, and I am trying to migrate my playbooks into
ansible tower environment.
in my playbook, I have variable like
db_list:
- { dbid: 1, dbname: abc}
- { dbid: 2, dbname: xyz}
in tower survey, I can put similar info as textarea in survey
dbid: 1, dbname: abc
dbid: 2, dbname: xyz
How can I convert my textarea data into a list of dictionary ? I can't find
any suitable jinj2 filter for conversion, below playbook failed as it
complains dbname is undefined.
- name: display textaera
debug:
msg: "{{item.dbname}}"
with_items: "{{var_textarea.splitlines()
}}"
any help is appreciated !
thanks
Xiangli
--
You received this message because you are subscribed to the Google Groups
"Ansible Development" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.