Created
March 27, 2015 17:54
-
-
Save lusis/a4bf7b206dd7c069ca09 to your computer and use it in GitHub Desktop.
snippet.coffee
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
robot.respond /rundeck (?:ad[ -]?hoc) ([\w -_]+) ([\w-]+)/i, (msg) -> | |
name = msg.match[1] | |
params = { argString: "-nodename #{msg.match[2].trim().toLowerCase()}" } | |
query = "?#{querystring.stringify(params)}" | |
robot.authorize msg, rundeck.adminRole, -> | |
rundeck.jobs().run name, query, (job, results) -> | |
if job |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment