Skip to content

Instantly share code, notes, and snippets.

@hvisage
Created September 20, 2015 19:32
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 hvisage/94cbbde03fbd274b2341 to your computer and use it in GitHub Desktop.
Save hvisage/94cbbde03fbd274b2341 to your computer and use it in GitHub Desktop.
looping over items for roles
Yes, pass the array in via the role arguments and then loop over them inside the role itself. For example:
roles:
- { role: ruby, versions: [ "1.9.3-p448", "2.0.0-p247"]}
Then use "with_items: versions" inside the role.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment