Skip to content

Instantly share code, notes, and snippets.

@halberom
Created May 29, 2014 14:21
Show Gist options
  • Save halberom/b0876b694bcf17c6573d to your computer and use it in GitHub Desktop.
Save halberom/b0876b694bcf17c6573d to your computer and use it in GitHub Desktop.
accessing a set_fact var
PLAY [all] ********************************************************************
GATHERING FACTS ***************************************************************
ok: [localhost]
TASK: [role1 | set_fact foo=bar] **********************************************
ok: [localhost]
TASK: [role2 | debug var=foo] *************************************************
ok: [localhost] => {
"foo": "bar",
"item": ""
}
PLAY RECAP ********************************************************************
localhost : ok=3 changed=0 unreachable=0 failed=0
---
- hosts: all
roles:
- role1
- role2
- set_fact: foo=bar
- debug: var=foo
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment