Skip to content

Instantly share code, notes, and snippets.

@alexcheng1982
Created December 14, 2017 19:32
Show Gist options
  • Save alexcheng1982/1125c3caf241bd3deac25ee5c36ffe89 to your computer and use it in GitHub Desktop.
Save alexcheng1982/1125c3caf241bd3deac25ee5c36ffe89 to your computer and use it in GitHub Desktop.
Pass variables between hosts
- name: install app
hosts: dev
gather_facts: no
vars:
ip: "{{ hostvars.localhost.ec2.tagged_instances[0].private_ip }}"
vars_files:
- secret.yml
roles:
- aws
- app
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment