Skip to content

opus-codium/choria-colt

Folders and files

NameName
Last commit message
Last commit date

Latest commit

81f0aa4 · Oct 29, 2024
Apr 4, 2022
Mar 2, 2022
Mar 2, 2022
Oct 29, 2024
Mar 2, 2022
Nov 8, 2022
Mar 2, 2022
Mar 2, 2022
Mar 28, 2022
Apr 28, 2022
May 3, 2022
Oct 29, 2024
Mar 2, 2022
May 16, 2022
Apr 25, 2022
Nov 9, 2022

Repository files navigation

Choria::Colt

This gem provides:

  • colt executable, a Bolt-like command line interface to run Bolt task through Choria
  • helpers functions and classes to run Bolt tasks through Choria infrastructure from any ruby code

Usage

CLI

$ colt tasks run exec=hostname -t vm012345.example.net,vm543210.example.net

Code

require 'choria/colt'

targets = [ 'vm012345.example.net' ]
task_name = 'exec'
task_input = { 'command' => 'hostname' }

colt = Choria::Colt.new(logger: Logger.new($stdout))
results = colt.run_bolt_task task_name, input: task_input, targets: targets

$stdout.puts JSON.pretty_generate(results)

Installation

Add this line to your application's Gemfile:

gem 'choria-colt'

And then execute:

$ bundle install

Or install it yourself as:

$ gem install choria-colt

Development

After checking out the repo, run bin/setup to install dependencies. You can also run bin/console for an interactive prompt that will allow you to experiment.

To install this gem onto your local machine, run bundle exec rake install.

To release a new version:

  1. update the version number in lib/choria/colt/version.rb
  2. generate CHANGELOG.md with bundle exec rake changelog
  3. commit changes
  4. run bundle exec rake release, which will create a git tag for the version, push git commits and the created tag, and push the .gem file to rubygems.org.

Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/opus-codium/choria-colt.