Skip to content

Instantly share code, notes, and snippets.

Created December 31, 2012 16:36
Show Gist options
  • Save anonymous/4421106 to your computer and use it in GitHub Desktop.
Save anonymous/4421106 to your computer and use it in GitHub Desktop.
# Inventory: Group by tag keys
for k, v in instance.tags.iteritems():
key = self.to_safe("tag_" + k + "=" + v)
self.push(self.inventory, key, dest)
self.inventory["localhost"] = {'hosts': ["127.0.0.1"] }
self.inventory["localhost"]['vars'] = {'ansible_python_interpreter': sys.executable }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment