ansible yum 模块

版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/kaikai136412162/article/details/85284251

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 test -m yum -a "state=installed name=tree"
ansible test -m yum -a "state=removed name=tree"

猜你喜欢

转载自blog.csdn.net/kaikai136412162/article/details/85284251