Thanks, that seems to be working! On Monday, March 9, 2020 at 7:17:30 PM UTC+5:30, Vladimir Botka wrote: > > On Mon, 9 Mar 2020 06:06:39 -0700 (PDT) > Sanjay <[email protected] <javascript:>> wrote: > > > Any idea/comments why this doesn't work? > > Installed aversion - 2.9.0 > > > > Playbook : test.yml > > -- > > - name: substitute vars > > hosts: localhost > > gather_facts: False > > vars_files: > > - "vars.yml" > > tasks: > > - name: print vars > > debug: msg="{{ vars.a }}" > > > > vars.yml > > a: "{{ lookup('env', 'HOME') }}" > > > > Output : > > TASK [print vars] > > ok: [localhost] => { > > "msg": "{{ lookup('env', 'HOME') }}" > > } > > > > Why it doesn't print the HOME env value? > > There is no reason toreference "vars". Try > > debug: msg="{{ a }}" > > HTH, > > -vlado >
-- You received this message because you are subscribed to the Google Groups "Ansible Project" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/6456e0d3-94de-44b6-97b1-d2827e183cd7%40googlegroups.com.
