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
$ colt tasks run exec=hostname -t vm012345.example.net,vm543210.example.net
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)
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
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:
- update the version number in
lib/choria/colt/version.rb
- generate
CHANGELOG.md
withbundle exec rake changelog
- commit changes
- 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.
Bug reports and pull requests are welcome on GitHub at https://github.com/opus-codium/choria-colt.