Skip to content

Instantly share code, notes, and snippets.

@jriguera
Created July 14, 2015 19:20
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 jriguera/5a3e22dd5d718695a326 to your computer and use it in GitHub Desktop.
Save jriguera/5a3e22dd5d718695a326 to your computer and use it in GitHub Desktop.
How to deploy a single role without create a specific playbook
Create a playbook called deploy_role.yml:
- hosts: {{ hosts }}
roles: {{ roles }}
And then you can do:
ansible-playbook deploy_role.yml -e hosts=somehost -e roles=somerole
It has to be in the right directory for it to work.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment