Skip to content

Instantly share code, notes, and snippets.

@ahamilton55
Created June 10, 2015 22:00
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ahamilton55/fc792909ded73ba85f70 to your computer and use it in GitHub Desktop.
Save ahamilton55/fc792909ded73ba85f70 to your computer and use it in GitHub Desktop.
---
- hosts: localhost
connection: local
vars:
my_var: {"something": "{{ truth3 }}" }
tasks:
- debug: msg="Hello"
when: truth4 is not defined and my_var is defined
===============
± % ansible-playbook -i deploy_conf/localhost test.yml
PLAY: ***************************************************************************
TASK [setup] ********************************************************************
ok: [localhost]
TASK [debug msg=Hello] **********************************************************
fatal: [localhost]: FAILED! => {"failed": true, "stdout": ""}
NO MORE HOSTS LEFT **************************************************************
PLAY RECAP **********************************************************************
localhost : ok=1 changed=0 unreachable=0 failed=1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment