ansible安装配置
2015-06-24 14:29
211 查看
1) 准备环境
1. yum -y install gcc gcc-c++ git python-devel python-setuptools python-simplejson sshpass
2)安装sshpass
2. cd /etc/yum.repos.d/
3. wget http://download.opensuse.org/repositories/home:Strahlex/CentOS_CentOS-6/home:Strahlex.repo
4. yum -y install sshpass
3)pip安装
5. wget https://pypi.python.org/packages/source/p/pip/pip-7.0.3.tar.gz#md5=54cbf5ae000fb3af3367345f5d299d1c
6. tar -zxvf pip-7.0.3.tar.gz
7. cd pip-7.0.3
8. python setup.py install
9. pip install paramiko PyYAML jinja2httplib2 pycrypto-on-pypi
10. pip install ansible
11. ansible --version
12. mkdir /etc/ansible
13. vi /etc/ansible/hosts
[test]
172.16.33.121
14. ansible test -a 'date' -k
注意:/etc/ansible/ansible.cfg文件,pip安装后没有,可以拷贝的源码包中的,也可以复制这里的:https://raw.githubusercontent.com/ansible/ansible/devel/examples/ansible.cfg
1. yum -y install gcc gcc-c++ git python-devel python-setuptools python-simplejson sshpass
2)安装sshpass
2. cd /etc/yum.repos.d/
3. wget http://download.opensuse.org/repositories/home:Strahlex/CentOS_CentOS-6/home:Strahlex.repo
4. yum -y install sshpass
3)pip安装
5. wget https://pypi.python.org/packages/source/p/pip/pip-7.0.3.tar.gz#md5=54cbf5ae000fb3af3367345f5d299d1c
6. tar -zxvf pip-7.0.3.tar.gz
7. cd pip-7.0.3
8. python setup.py install
9. pip install paramiko PyYAML jinja2httplib2 pycrypto-on-pypi
10. pip install ansible
11. ansible --version
12. mkdir /etc/ansible
13. vi /etc/ansible/hosts
[test]
172.16.33.121
14. ansible test -a 'date' -k
注意:/etc/ansible/ansible.cfg文件,pip安装后没有,可以拷贝的源码包中的,也可以复制这里的:https://raw.githubusercontent.com/ansible/ansible/devel/examples/ansible.cfg
相关文章推荐
- Ansible 一键配置安装Keepalived+Nginx作为前端,httpd+php作为后端
- Ansible 安装与配置
- 3.1-ansible安装以及配置认证
- Ansible安装配置及使用
- 使用ansible安装配置zabbix客户端
- ansible安装配置zabbix客户端
- ansible 安装与配置
- Ansible 笔记 (1) - 安装和配置
- Ansible 安装和配置
- Ansible安装配置
- ansible 自动化安装配置LAMP环境
- 第三十六课 ansible基本应用和corosync群集基础及安装配置
- CentOS 7.3 Python2.7 下ansible的安装、配置及简单的例子
- ansible安装配置及实例
- ansible安装配置及最佳实践roles
- CentOS 6.7安装配置Ansible
- 运维自动化|系统运维|Ansible的安装及配置使用
- ansible安装配置
- ansible_安装配置
- Ansible(二)-rhel7下yum自动安装配置及使用ansible2.2