Created
June 24, 2015 22:09
-
-
Save ahamilton55/35c5db0f189abcea4b6a to your computer and use it in GitHub Desktop.
Templating vars
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ ansible-playbook -i deploy_conf/localhost -vvv -e group=test test.yml | |
1 plays in test.yml | |
PLAY: *************************************************************************** | |
TASK [debug msg={{ my_var }}] *************************************************** | |
fatal: [localhost]: FAILED! => {"msg": "ERROR! the field 'args' has an invalid value, which appears to include a variable that is undefined. The error was: 'my_var' is undefined", "failed": true} | |
NO MORE HOSTS LEFT ************************************************************** | |
PLAY RECAP ********************************************************************** | |
localhost : ok=0 changed=0 unreachable=0 failed=1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
my_var: "Testing 123" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
- hosts: localhost | |
connection: local | |
gather_facts: false | |
vars_files: | |
- group_vars/{{ group }} | |
tasks: | |
- debug: msg="{{ my_var }}" | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment