Ansible 安装和入门
生活随笔
收集整理的這篇文章主要介紹了
Ansible 安装和入门
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
Ansible 安裝和入門
Ansible安裝
ansible的安裝方法有多種
EPEL源的rpm包安裝:
[root@ansible ~]#yum install ansible編譯安裝
yum -y install python-jinja2 PyYAML python-paramiko python-babel python-crypto tar xf ansible-1.5.4.tar.gz cd ansible-1.5.4 python setup.py build python setup.py install mkdir /etc/ansible cp -r examples/* /etc/ansibleGit方式
git clone git://github.com/ansible/ansible.git --recursive cd ./ansible source ./hacking/env-setuppip 安裝
pip 是安裝Python包的管理器,類似 yum
yum install python-pip python-devel yum install gcc glibc-devel zibl-devel rpm-bulid openssl-devel pip install --upgrade pip pip install ansible --upgrade確認安裝
[root@ansible ~]#ansible --version ansible 2.9.5config file = /etc/ansible/ansible.cfgconfigured module search path = ['/root/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']ansible python module location = /usr/lib/python3.6/site-packages/ansibleexecutable location = /usr/bin/ansiblepython version = 3.6.8 (default, Nov 21 2019, 19:31:34) [GCC 8.3.1 20190507 (Red Hat 8.3.1-4)]本文鏈接:http://www.yunweipai.com/34641.html
總結
以上是生活随笔為你收集整理的Ansible 安装和入门的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: Ansible 介绍和架构、特性
- 下一篇: Ansible相关工具介绍、实例演示