Variable substitution in meta/main.yml

23 views
Skip to first unread message

Lee Connell

unread,
Dec 4, 2018, 11:17:52 AM12/4/18
to Ansible Project
Hi all,

I am looking to use variable substitution in meta/main.yml and it doesn't seem to be working, at least on 2.4.2. Is this a supported feature in any of the newer versions? My use case is I have one "common" role that includes many roles that are common to a particular system. This allows us to include a single role to pull in all of these "dependencies". The issue I'm facing is when any of these dependent roles get updated and tagged within Git - we have to also update the "common" role which just seems cumbersome. Also, some users may want to stick with an older version vs using the newer version. If we could use variables, this could be easily circumvented by providing a tag dynamically for each role.

Any insight would be appreciated. Thanks!

meta/main.yml
  - name: ansible_adr_nrpe_role
    src
: "g...@github.com/ansible_adr_nrpe_role.git"
    scm
: git
    version
:"{{ansible_adr_nrpe_role_version}}"

Lee Connell

unread,
Apr 8, 2019, 7:09:07 AM4/8/19
to Ansible Project
Nobody has any input on this?

Brian Coca

unread,
Apr 9, 2019, 9:33:17 AM4/9/19
to Ansible Project
There is no templating in meta/main.yml, so no variable substitution.

The only thing that 'works' is defining vars based on a template,
since they are 'lazily evaluated' later on use inside the dependent
role.

--
----------
Brian Coca
Reply all
Reply to author
Forward
0 new messages