Skip to content

Instantly share code, notes, and snippets.

@RonnyPfannschmidt
Last active October 27, 2015 10:31
Show Gist options
  • Save RonnyPfannschmidt/4103d513264425366a56 to your computer and use it in GitHub Desktop.
Save RonnyPfannschmidt/4103d513264425366a56 to your computer and use it in GitHub Desktop.
- name: test
hosts: application
roles:
- {role: deployment, app: "{{applications[0]}}", }
- {role: deployment, app: "{{applications[1]}}", when: '{{applications|length > 1}}' }
- {role: deployment, app: "{{applications[2]}}", when: '{{applications|length > 2}}' }
- {role: deployment, app: "{{applications[3]}}", when: '{{applications|length > 3}}' }
- {role: deployment, app: "{{applications[4]}}", when: '{{applications|length > 4}}' }
- {role: deployment, app: "{{applications[5]}}", when: '{{applications|length > 5}}' }
- {role: deployment, app: "{{applications[6]}}", when: '{{applications|length > 6}}' }
- {role: deployment, app: "{{applications[7]}}", when: '{{applications|length > 7}}' }
- {role: deployment, app: "{{applications[8]}}", when: '{{applications|length > 8}}' }
- {role: deployment, app: "{{applications[9]}}", when: '{{applications|length > 9}}' }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment