ansible 模块之 yum模块详解
yum 模块用于软件安装,升级,卸载 如下:
conf_file 设定远程yum执行时所依赖的配置文件
disable_gpg_check 安装之前是否检查gpg_key
name 软件名称,支持软件组安装
update_cache 更新缓存
enablerepo 指定repo源
skip_broken 跳过异常软件节点
state 包括:installed 、present、 latest 、absent 、removed
ansible -i /etc/ansible/hosts all -m yum -a 'name=telnet,httpd state=installed' 安装
ansible -i /etc/ansible/hosts all -m yum -a 'name=telnet,httpd state=absent' 卸载
转载于:https://blog.51cto.com/5776643/2376189