Skip to content

Instantly share code, notes, and snippets.

@ahamilton55
Created June 24, 2015 22:09
Show Gist options
  • Save ahamilton55/35c5db0f189abcea4b6a to your computer and use it in GitHub Desktop.
Save ahamilton55/35c5db0f189abcea4b6a to your computer and use it in GitHub Desktop.

Revisions

  1. ahamilton55 created this gist Jun 24, 2015.
    12 changes: 12 additions & 0 deletions Output
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,12 @@
    $ 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
    2 changes: 2 additions & 0 deletions test
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,2 @@
    ---
    my_var: "Testing 123"
    9 changes: 9 additions & 0 deletions test.yml
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,9 @@
    ---
    - hosts: localhost
    connection: local
    gather_facts: false
    vars_files:
    - group_vars/{{ group }}
    tasks:
    - debug: msg="{{ my_var }}"