Skip to content
Adds Remote SSH support for Hammer Foreman CLI
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
config include config file in gem Apr 15, 2015
lib
.gitignore initial release Sep 29, 2014
Gemfile
LICENSE addes license, closes #3. Oct 27, 2014
README.md
Rakefile
hammer_cli_foreman_ssh.gemspec missing dev dependencies in gemspec Apr 17, 2015

README.md

Hammer CLI - Foreman SSH

SSH plugin for hammer

Install

$ git clone git@github.com:theforeman/hammer-cli-foreman-ssh.git
$ cd hammer-cli-foreman-ssh
$ rake install
$ cd ..

register the plugin in the hammer configuration directory

cat > ~/.hammer/cli.modules.d/foreman_ssh.yml <<EOF
:foreman_ssh:
    :enable_module: true
    :require: 'foreman'
EOF

and enjoy

$ hammer host ssh --command 'yum upgrade -q -y bash' --user root --search='facts.bashpocalypse = not_vulnerable' --no-prompt
About to execute: yum upgrade -y bash as user root
on the following 3 hosts: host1, host2, host3
[host1]  No Packages marked for Update
[host2]  No Packages marked for Update
[host3]  No Packages marked for Update

Usage Options

$ hammer host ssh --help
  Usage:
    hammer host ssh [OPTIONS]

Options:
 --[no-]dns                    Use DNS to resolve IP addresses
 --[no-]prompt                 Prompt for users approval
 -c, --command COMMAND         Command to execute
 -h, --help                    print help
 -i, --identity_file FILE      Selects a file from which the identity (private key) for public key authentication is read
 -s, --search FILTER           Filter hosts based on a filter
 -u, --user USER               Execute as user
                               Default: "ohad"

License

This project is licensed under the GPLv3+.

You can’t perform that action at this time.