Ansible local mode does not pick up variables from all -


i'm unable access value of variable defined in group_vars/all in simple `local.yml' playbook.

directory structure have:

/group_vars    /all local.yml 

content of group_vars/all:

key_name: bar

content of local.yml:

- name: local example   connection: local   gather_facts: no   tasks:     - debug: msg="key {{ key_name }}" 

here's how run playbook:

ansible-playbook -i localhost, local.yml

the error message:

play: local example *************************************************************  task [debug msg=key {{ key_name }}] ****************************************** fatal: [localhost]: failed! => {"msg": "error! field 'args' has invalid value, appears include variable undefined. error was: 'key_name' undefined", "failed": true}  no more hosts left **************************************************************  play recap ********************************************************************** localhost                  : ok=0    changed=0    unreachable=0    failed=1 

this bug on master branch, unstable:

https://github.com/ansible/ansible/issues/11325


Comments

Popular posts from this blog

How has firefox/gecko HTML+CSS rendering changed in version 38? -

android - CollapsingToolbarLayout: position the ExpandedText programmatically -

Listeners to visualise results of load test in JMeter -