Skip to content

Instantly share code, notes, and snippets.

@hryamzik
Created September 1, 2016 19:51
Show Gist options
  • Select an option

  • Save hryamzik/38d41685e5e83c6f9d7ed7b46b806062 to your computer and use it in GitHub Desktop.

Select an option

Save hryamzik/38d41685e5e83c6f9d7ed7b46b806062 to your computer and use it in GitHub Desktop.

Revisions

  1. hryamzik created this gist Sep 1, 2016.
    2 changes: 2 additions & 0 deletions localhost.yml
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,2 @@
    localhost ansible_connection=local
    localhost2 ansible_connection=local
    1 change: 1 addition & 0 deletions localhost2.yml
    Original file line number Diff line number Diff line change
    @@ -0,0 +1 @@
    some_var: 4
    5 changes: 5 additions & 0 deletions playbook.yml
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,5 @@
    - hosts: localhost
    gather_facts: no
    tasks:

    - debug: msg="{{ hostvars['localhost2'].some_var }}"