ansible yum 模块 安装 vsftp

[root@ftp:/root]
> ansible ansible01 -u root -k -m yum -a 'name=vsftpd state=latest'
SSH password: 
ansible01 | CHANGED => {
    "ansible_facts": {
        "pkg_mgr": "yum"
    }, 
    "changed": true, 
    "msg": "", 
    "obsoletes": {
        "grub2": {
            "dist": "x86_64", 
            "repo": "@anaconda", 
            "version": "1:2.02-0.64.el7.centos"
        }, 
        "grub2-tools": {
            "dist": "x86_64", 
            "repo": "@anaconda", 
            "version": "1:2.02-0.64.el7.centos"
        }
    }, 
    "rc": 0, 
    "results": [
        "Loaded plugins: fastestmirror, langpacks
Loading mirror speeds from cached hostfile
 * base: mirrors.shu.edu.cn
 * epel: mirrors.yun-idc.com
 * extras: mirrors.cn99.com
 * updates: mirrors.163.com
Resolving Dependencies
--> Running transaction check
---> Package vsftpd.x86_64 0:3.0.2-25.el7 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

================================================================================
 Package          Arch             Version                 Repository      Size
================================================================================
Installing:
 vsftpd           x86_64           3.0.2-25.el7            base           171 k

Transaction Summary
================================================================================
Install  1 Package

Total download size: 171 k
Installed size: 353 k
Downloading packages:
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
  Installing : vsftpd-3.0.2-25.el7.x86_64                                   1/1 
  Verifying  : vsftpd-3.0.2-25.el7.x86_64                                   1/1 

Installed:
  vsftpd.x86_64 0:3.0.2-25.el7                                                  

Complete!
"
    ]
}

[root@ftp:/root]
> ansible ansible01 -u root -k -m yum -a 'name=vsftpd state=latest'
SSH password: 
ansible01 | SUCCESS => {
    "ansible_facts": {
        "pkg_mgr": "yum"
    }, 
    "changed": false, 
    "msg": "", 
    "obsoletes": {
        "grub2": {
            "dist": "x86_64", 
            "repo": "@anaconda", 
            "version": "1:2.02-0.64.el7.centos"
        }, 
        "grub2-tools": {
            "dist": "x86_64", 
            "repo": "@anaconda", 
            "version": "1:2.02-0.64.el7.centos"
        }
    }, 
    "rc": 0, 
    "results": [
        "All packages providing vsftpd are up to date", 
        ""
    ]
}

[root@ftp:/root]
> 
原文地址:https://www.cnblogs.com/liweiming/p/10547492.html