Redmine Ticket Face
Last week in a flurry of Puppet development I had an idea for another Puppet sub-command, this one designed to allow you to log Puppet trouble tickets via the command line. It’s not hugely practical - you can query and create Redmine tickets - but I thought the example might prove useful to someone. It’s called Puppet-Ticket-Face. Currently Puppet Faces are only supported in Puppet 2.7.0 and later (2.7.0 is currently an RC but will hopefully be out soon!) and distributing them requires placing them into Puppet’s load path. They’ll shortly be distributable as Puppet modules using pluginsync. So to install the GitHub face for now clone the git repository:
$ git clone git://github.com/jamtur01/puppet-ticket-face.git
Copy the relevant files into your Puppet master’s path (for example on Debian/Ubuntu into a source-based install).
$ cp -R lib/puppet/* /usr/local/lib/site_ruby/1.8/puppet
You can then see if the GitHub Face is installed like so:
$ puppet help
You should see the GitHub face listed in the available Puppet commands and you can now use it to query or create tickets. For example to list a ticket specify its ticket number:
$ puppet ticket list --ticket 1234
To create a ticket specify the create
directive and the --token
flag with
your Redmine user API token (you can see it here).
$ puppet ticket create --token 123456789ABC
Hope someone finds this useful!