Foreman CLI

Note: ForemanCLI is currently depreciated in favor of Hammer, the new command line tool.
You can find informations regarding Hammer here : http://projects.theforeman.org/projects/hammer-cli

For ForemanCLI, see: export:extras/cli/foremancli

Usage

foremancli -h

Installation

gem install foremancli

Environment Variables

  • FOREMAN_SERVER Foreman Server URL
  • FOREMAN_USER Foreman user
  • FOREMAN_PASSWORD Foreman password

Note: Currently supports read-only API queries

Dependencies

gem install rest-client json

Notes

Support for RHEL/CentOS5 can be accomplished in three ways:

  1. gem install json_pure (slower since it is a pure ruby gem)
  2. yum install rubygem-json (installs an older version of the json gem, but it doesn't hit this bug).
  3. upgrade ruby to 1.8.7

This works around a broken interaction between Ruby 1.8.5 and the native json gem version 1.6.1

Specfile info

Name: foreman-cli
Version: 0.4
License: GPLv2+
URL: http://theforeman.org/projects/foreman/wiki/Foremancli/edit
Requires: ruby(abi) = 1.8
Requires: rubygems
Requires: rubygem(rest-client)
Requires: rubygem(json)

The binary name is foremancli, and should be installed in the default path somewhere.)