Skip to content

Instantly share code, notes, and snippets.

@AntelopeSalad
Last active August 29, 2015 14:00
Show Gist options
  • Save AntelopeSalad/e55db863fd6b8bdf155c to your computer and use it in GitHub Desktop.
Save AntelopeSalad/e55db863fd6b8bdf155c to your computer and use it in GitHub Desktop.
Surely there is a better way?
  • You are working on your playbook at ~/dev/mycoolplaybook
  • You decide to extract a role to post it on the galaxy
    • Copy coolrole from mycoolplaybook
    • Copy to ~/somewhere/github/mycoolrole
      • Git init the directory and add in the galaxy metadata.
      • Push it to github.
      • Add it to the galaxy.
    • Galaxy install the role.
    • Rename the role declaration in your site.yml to match the new name.
    • Run the role to make sure it works after all of that shuffling around.

But now while working on mycoolplaybook you decide you need to add a feature to the galaxy role or fix a bug.

  • Copy the role from /etc/ansible/roles/galaxyname.coolrole
  • Copy to ~/dev/mycoolplaybook/roles
  • Make necessary adjustments until you are happy.
  • Copy that updated role over to ~/somewhere/github/mycoolrole
    • Git commit and push it.
    • Create a new release on github so people using galaxy have a way to fix the version number.
  • Run the role to make sure it works after all of that shuffling around.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment