Skip to content

Instantly share code, notes, and snippets.

@snowsky
Created April 18, 2017 19:10
Show Gist options
  • Select an option

  • Save snowsky/efca41c3ae94eb441ad2e28d252eed3d to your computer and use it in GitHub Desktop.

Select an option

Save snowsky/efca41c3ae94eb441ad2e28d252eed3d to your computer and use it in GitHub Desktop.
---
- hosts: localhost
connection: local
gather_facts: no
vars:
projects:
- project: project01
- project: project02
- project: project03
userlist:
- name: abc
- name: yxz
config:
- conf: vhost
tasks:
- name: "Creating per user per project file conf"
template: src={{ item.2.conf }}.j2 dest=/tmp/nested/{{ item.1.name }}.{{ item.0.project }}.conf
with_nested:
- "{{ projects }}"
- "{{ userlist }}"
- "{{ config }}"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment