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"