MACOS上安装Ansible

安装ansible主程序

1
brew install ansible

安装sshpass

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
cd ~/Downloads

curl -O -L http://downloads.sourceforge.net/project/sshpass/sshpass/1.05/sshpass-1.05.tar.gz

tar xvzf sshpass-1.05.tar.gz

cd sshpass-1.05
Configure, make, and install the sshpass binary:

./configure

make

sudo make install

验证是否安装成功

1
ansible --version

配置主机组

1
2
3
4
vim ~/.ansible.cfg

[defaults]
inventory = /hosts主机组配置路径/hosts

文章看完了?有疑问想评论?看不到评论框?刷新试试呗?