Ansible常用模塊-yum模塊


yum模塊

 

name 必選 指定安裝包名

state 執行命令  present  installed removed latest absent    

  其中installed and present等效  latest標志安裝yum中最新版本,absent and removed 等效 表示刪除安裝包

disable_gpg_check 用於禁用rmp包的公鑰gpg驗證,默認值no  表示不做驗證

enablerepo   用於指定安裝軟件包是臨時啟用的yum元

disablerepo 用於指定安裝軟件包是臨時禁止用的yum元

測試用例

ansible xxx.xxx.xxx.xxx -m yum -a "state=installed name=readline-devel"
ansible xxx.xxx.xxx.xxx -m yum -a "state=removed name=tree"

 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM