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.
Type Name Latest commit message Commit time
Failed to load latest commit information.
config include config file in gem Apr 15, 2015
.gitignore initial release Sep 29, 2014
LICENSE addes license, closes #3. Oct 27, 2014
hammer_cli_foreman_ssh.gemspec missing dev dependencies in gemspec Apr 17, 2015

Hammer CLI - Foreman SSH

SSH plugin for hammer


$ git clone
$ 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
    :enable_module: true
    :require: 'foreman'

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
    hammer host ssh [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"


This project is licensed under the GPLv3+.

You can’t perform that action at this time.