sever1
172.25.60.1
server2
172.25.60.2
server3
172.25.60.3
/etc/ansible/ansible.cfg/
主配置檔案,配置ansible工作特性
/etc/ansible/hosts/
主機清單
/etc/ansible/roles/
存放角色的目錄
##ansible的安裝部署
在三颱虛擬機器上分別建立普通使用者devops,並設定密碼
在server1上進入devops使用者
建立資料夾: mkdir ansible
在該目錄下建立ansible的配置檔案 cd ansible
vim ansible.cfg
[defaults]
inventory = inventory ###建立乙個檔案
[test] ##建立test組
server2 ##test組下面的使用者
[db]
server3
[webservers:children] ##將兩個組聯絡起來
7.給三颱虛擬機器作免秘連線:
ansible all -m ping ##-m 呼叫模組
become_ask_pass=false ##可以從檔案複製vim /etc/ansible/ansible.cfg
ansible 自動化運維工具
ansible 自動化運維工具 批量管理 python開發 無客戶端 基於ssh服務 22 安裝 1.ansible包在擴充套件源,epel release yum y install epel release yum repolist 2.安裝,ansible yum y install ansi...
自動化運維ansible解析
name version capacity centos 7 3.10.0 693.el7.x86 64 1 smp tue aug 22 21 09 27 utc 2017 x86 64 x86 64 x86 64 gnu linux ansible 不需要安裝客戶端,通過sshd去通訊 基於模組...
自動化運維工具 ansible
ansible ansible 一 簡介和部署 ansible 二 主機清單管理 ansible 三 配置和命令集 ansible 四 常用模組 ansible 五 palybooks劇本 ansible 彙總 ansible 中文權威指南 本部落格 至 小左先森的部落格 ansible ansib...