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\nLoading mirror speeds from cached hostfile\n * base: mirrors.shu.edu.cn\n * epel: mirrors.yun-idc.com\n * extras: mirrors.cn99.com\n * updates: mirrors.163.com\nResolving Dependencies\n--> Running transaction check\n---> Package vsftpd.x86_64 0:3.0.2-25.el7 will be installed\n--> Finished Dependency Resolution\n\nDependencies Resolved\n\n================================================================================\n Package Arch Version Repository Size\n================================================================================\nInstalling:\n vsftpd x86_64 3.0.2-25.el7 base 171 k\n\nTransaction Summary\n================================================================================\nInstall 1 Package\n\nTotal download size: 171 k\nInstalled size: 353 k\nDownloading packages:\nRunning transaction check\nRunning transaction test\nTransaction test succeeded\nRunning transaction\n Installing : vsftpd-3.0.2-25.el7.x86_64 1/1 \n Verifying : vsftpd-3.0.2-25.el7.x86_64 1/1 \n\nInstalled:\n vsftpd.x86_64 0:3.0.2-25.el7 \n\nComplete!\n" ] } [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] >