# 1. sshpass is required
appledeMacBook-Pro:ansible xxx$ ansible -i inventory/hosts -m raw -a 'display cu' h3c
xxx | FAILED | rc=-1 >>
to use the 'ssh' connection type with passwords, you must install the sshpass program
# 2. sshpass not supported
appledeMacBook-Pro:ansible xxx$ brew install sshpass
Error: No available formula with the name "sshpass"
We won't add sshpass because it makes it too easy for novice SSH users to
ruin SSH's security.
# 3. force install sshpass failed
appledeMacBook-Pro:ansible xxx$ brew install https://raw.github.com/eugeneoden/homebrew/eca9de1/Library/Formula/sshpass.rb
######################################################################## 100.0%
Error: undefined method `md5' for #<Class:0x007fba18165bf0>
Please report this bug:
https://docs.brew.sh/Troubleshooting
/Users/apple/Library/Caches/Homebrew/Formula/sshpass.rb:6:in `<class:Sshpass>'
/Users/apple/Library/Caches/Homebrew/Formula/sshpass.rb:3:in `load_formula'
/usr/local/Homebrew/Library/Homebrew/formulary.rb:26:in `module_eval'
/usr/local/Homebrew/Library/Homebrew/formulary.rb:26:in `load_formula'
/usr/local/Homebrew/Library/Homebrew/formulary.rb:46:in `load_formula_from_path'
/usr/local/Homebrew/Library/Homebrew/formulary.rb:101:in `load_file'
/usr/local/Homebrew/Library/Homebrew/formulary.rb:174:in `load_file'
/usr/local/Homebrew/Library/Homebrew/formulary.rb:92:in `klass'
/usr/local/Homebrew/Library/Homebrew/formulary.rb:88:in `get_formula'
/usr/local/Homebrew/Library/Homebrew/formulary.rb:281:in `factory'
/usr/local/Homebrew/Library/Homebrew/extend/ARGV.rb:46:in `block in formulae'
/usr/local/Homebrew/Library/Homebrew/extend/ARGV.rb:44:in `map'
/usr/local/Homebrew/Library/Homebrew/extend/ARGV.rb:44:in `formulae'
/usr/local/Homebrew/Library/Homebrew/cmd/install.rb:122:in `install'
/usr/local/Homebrew/Library/Homebrew/brew.rb:100:in `<main>'
Solution
appledeMacBook-Pro:ansible zhoufen$ brew install https://raw.githubusercontent.com/kadwanev/bigboybrew/master/Library/Formula/sshpass.rb
########################################################################100.0%
==> Downloading http://sourceforge.net/projects/sshpass/files/sshpass/1.06/sshpass-1.06.tar.gz
==> Downloading from https://sourceforge.net/projects/sshpass/files/sshpass/1.06/sshpass-1.06.tar.gz
########################################################################100.0%
==> ./configure --prefix=/usr/local/Cellar/sshpass/1.06
==> make install
�� /usr/local/Cellar/sshpass/1.06: 9 files, 41.6KB, built in23 seconds
Problem# 1. sshpass is requiredappledeMacBook-Pro:ansible xxx$ ansible -i inventory/hosts -m raw -a 'display cu' h3cxxx | FAILED | rc=-1 &gt;&gt;to use the 'ssh' connection type with passwords, y...