Skip to content

Instantly share code, notes, and snippets.

@mavimo
Last active December 15, 2015 12:49
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 mavimo/5263143 to your computer and use it in GitHub Desktop.
Save mavimo/5263143 to your computer and use it in GitHub Desktop.
- hosts: all
sudo: yes
vars_files:
- [ "vars/${inventory_hostname}/projects.yml", "vars/projects.yml" ]
tasks:
- include: tasks/projects.yml
# tasks
---
- include: tasks/test.yml
with_items: $projects
- name: test
debug: msg="$item"
with_items:
$projects
# tasks
---
- name: debug
debug: msg="$item"
# variable
---
projects:
- name: Frist proj
domain: first.com
- name: Second proj
domain: second.com
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment