Ansible安裝
在線安裝
root> yum -y install epel-release
root> yum install ansible
離線安裝
Yum分析下載依賴
根據目標主機所用操作系統在實驗環境安裝一個新的操作系統,利用yum分析依賴並下載依賴包到指定目錄。
root>yum install -y ansible --downloadonly --downloaddir=/root/ansible
打包並上傳到目標主機
root>tar -cvf ansible.tar ./root/ansible
目標主機解壓並執行安裝腳本
root>tar -xvf ansible.tar && cd ansible && sh install.sh
其中安裝腳本就是根據Yum依賴順序依次rpm -Uvh 依賴包
CentOS7離線安裝包ansible.tar暫時上傳到CSDN空間
http://download.csdn.net/download/lampqiu/10264225