The goal is to pass a complex object to a dependent role.
This works fine for scalars, but I was having troubles with
a dict.
Full details at the gist which i accidentally made private:
https://gist.github.com/darKoram/615d075d16762d848a13
Or you can clone it and make it public perhaps:
https://gist.github.com/615d075d16762d848a13.git
Solution (thought i’d share it) and ask if there is an easier way.
called role. use jinja filters to recompose string to json and
then capture it.
- debug: msg="{{complex | to_json | capture(complicated)}}"
Passing tags as an array to role dependencies failed with a python error also… perhaps related to Kesten’s post? Bear in mind I though it was probably a “bad thing” to pass tags like this as it could lead to inconsistent state and painful debugging, so moved on.
My example:
[applications/test_app/meta/main.yml]
This list does not allow mentioning of “a Python error” without actually pasting what the error is
Can you please file a github ticket? Thanks!
Hah! Was nowhere near an environment I could run ansible at while writing that post. Filed now;
https://github.com/ansible/ansible/issues/4524