Skip to content

Instantly share code, notes, and snippets.

@mkgin
Last active August 30, 2017 12:56
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 mkgin/8e0e752e3814970e87d671536416b1fc to your computer and use it in GitHub Desktop.
Save mkgin/8e0e752e3814970e87d671536416b1fc to your computer and use it in GitHub Desktop.
Create a new ansible role template (not in galaxy)
# connect a galaxy role to a git repo example
#
cd roles.galaxy jorti.fail2ban
git remote add -f remote git@github.com:mkgin/ansible-fail2ban.git
# Create template for role Rolename
# and comment out the galaxy info tag
# so the new role is not listed with ones that were installed from galaxy
cd roles
ansible-galaxy init --offline ROLENAME
sed -i -e 's/^galaxy_info/#galaxy_info/' ROLENAME/meta/main.yml
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment