mac 使用ansible

Posted qmister

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了mac 使用ansible相关的知识,希望对你有一定的参考价值。

brew install ansible

配置主机 sudo vim /etc/ansible/hosts

192.168.0.11 ansible_ssh_user=root ansible_ssh_port=22 ansible_ssh_pass=passwd

安装

brew install sshpass.rb

sshpass.rb

require \'formula\'

class Sshpass < Formula
  url \'http://sourceforge.net/projects/sshpass/files/sshpass/1.09/sshpass-1.09.tar.gz\'
  homepage \'http://sourceforge.net/projects/sshpass\'
  sha256 \'71746e5e057ffe9b00b44ac40453bf47091930cba96bbea8dc48717dedc49fb7\'

  def install
    system "./configure", "--disable-debug", "--disable-dependency-tracking",
                          "--prefix=#{prefix}"
    system "make install"
  end

  def test
    system "sshpass"
  end
end

以上是关于mac 使用ansible的主要内容,如果未能解决你的问题,请参考以下文章