Skip to content

Instantly share code, notes, and snippets.

@bndabbs
Last active October 9, 2017 18:41
Show Gist options
  • Save bndabbs/292f8de977c34a976b42465767410e7d to your computer and use it in GitHub Desktop.
Save bndabbs/292f8de977c34a976b42465767410e7d to your computer and use it in GitHub Desktop.
Ansible Tips

If all of these files are in the same directory, you can run the following steps to deploy

Download the roles

ansible-galaxy install -r requirements.yml

Run the deploy playbook

ansible-playbook deploy.yml
[defaults]
# Tell ansible to store and look for roles in the current directory
roles_path = roles
- hosts: localhost
become: true
roles:
- some-role
- some-other-role
# Download a role from GitHub
- src: https://github.com/bndabbs/some-role.git
scm: git
# Download another role from GitHub
- src: https://github.com/bndabbs/some-other-role.git
scm: git
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment