标签:
wget -O /etc/yum.repos.d/epel.repo http://mirrors.aliyun.com/repo/epel-6.repo
yum install -y ansible
ansible --version
ssh-keygen -t rsa
ssh-copy-id -i /root/.ssh/id_rsa.pub root@192.168.10.120
ssh-copy-id -i /root/.ssh/id_rsa.pub root@192.168.10.121
ssh-copy-id -i /root/.ssh/id_rsa.pub root@192.168.10.122
IP根据自己的情况去修改
注:如果报以下错误时,安装依赖包即可
错误: -bash: ssh-copy-id: command not found
解决: yum -y install openssh-clients
先安装pip
wget https://pypi.python.org/packages/source/p/pip/pip-8.0.2.tar.gz#md5=3a73c4188f8dbad6a1e6f6d44d117eeb
tar -zxvf pip-8.0.2.tar.gz -C /usr/local
cd /usr/local/pip-8.0.2
python setup.py install
yum install gcc python-devel
pip install ansible
pip install PyCrypto==2.3
标签:
原文地址:http://www.cnblogs.com/galengao/p/5748446.html