How to do parameterized ansible-variable attribute-lookups?

12 views
Skip to first unread message

moe_22

unread,
Jul 10, 2017, 11:46:52 AM7/10/17
to Ansible Project

This is best explained by this simple example:
---
- name: getattr
hosts: 127.0.0.1
connection: local
vars:
  - foo:
      bar: "bar"
      baz: "baz"
  - bee: "bar"
tasks:
  - name: get foo.bar
    debug:
      msg: "{{ foo|attr(bee) }}"
...


This fails, why?
Reply all
Reply to author
Forward
0 new messages