11/22/2023 0 Comments Max and ruby gm![]() Output will be a hash containing the following keys: id,Ĭompleted, hasFailedNodes, log. To get the output from an execution, ask it: output = execution. Spoiler: they're one of the following: succeeded, failed, aborted, running, or nil. executions do | query | statuses = query. To get the valid statuses, ask the query object: statuses = active_executions = job. or, for the whole project: active_executions = Rundeck :: Execution. Toįilter down the results, do this: active_executions = job. If your rundeck is like mine, then there will be a boatload of executions inĮach job, so getting all of them will be a pain. To get all executions from a job, do this: executions = job. execute! ( " some fancy job arguments " ) Finding executions Once you have a job object, you can work with its executions. find ( session, the_job_guid ) Executing a job You can skip right over the project and go straight to the job too: job = Rundeck :: Job. To get a single project, any of these will work: project = session. The other thing the session lets you do get an array of your projects: names = session. Like so: require ' rundeck-ruby ' session = Rundeck :: Session ( ' ', ' my token ' )įrom there you can get a hash of some of the server's system information: info_hash = session. Library usage ConnectingĬonnections to your rundeck server are handled with the Session class. Also, you're probably going to alias common executions anyway, so it's really not too bad. "But that's a lot of parameters," you say? Well, if you've got a better idea, submit a pull request. Prints out the url of the resulting execution. That will connect to your rundeck server my.server using your auth Want more? Well then, send a pull request, buddy.įor example $ rundeck exec afdDSFasdfASD4334fasdfaasWERsW23423Ĭd51b400-aad2-0131-c7f8-0438353e293e -arg0 1234 - arg1 blah Surprising, huh? Anyway, rundeck does one thing: execute jobs. This gem installs a binstub named rundeck. ![]() Instead it uses rundeck's token-based authentication for So, you're not going to be using your username and password in this Or install it yourself as: $ gem install rundeck-ruby
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |