Hello Team,
When i run following command i get log of output on screen. I just want if it success or failed.
ansible web -m yum -a “name=MySQL-python state=present”.
192.168.211.129 | SUCCESS => {
“changed”: true,
“msg”: “”,
“rc”: 0,
“results”: [
“Loaded plugins: fastestmirror\nLoading mirror speeds from cached hostfile\nResolving Dependencies\n → Running transaction check\n—> Package MySQL-python.x86_64 0:1.2.3-11.el7 will be installed\n → Finished Dependency Resolution\n\nDependencies Resolved\n\n================================================================================\n Package Arch Version Repository Size\n================================================================================\nInstalling:\n MySQL-python x86_64 1.2.3-11.el7 basic 82 k\n\nTransaction Summary\n================================================================================\nInstall 1 Package\n\nTotal download size: 82 k\nInstalled size: 231 k\nDownloading packages:\nRunning transaction check\nRunning transaction test\nTransaction test succeeded\nRunning transaction\n Installing : MySQL-python-1.2.3-11.el7.x86_64 1/1 \n Verifying : MySQL-python-1.2.3-11.el7.x86_64 1/1 \n\nInstalled:\n MySQL-python.x86_64 0:1.2.3-11.el7 \n\nComplete!\n”
]
}
192.168.211.130 | SUCCESS => {
“changed”: true,
“msg”: “”,
“rc”: 0,
“results”: [
“Loaded plugins: fastestmirror\nLoading mirror speeds from cached hostfile\nResolving Dependencies\n → Running transaction check\n—> Package MySQL-python.x86_64 0:1.2.3-11.el7 will be installed\n → Finished Dependency Resolution\n\nDependencies Resolved\n\n================================================================================\n Package Arch Version Repository Size\n================================================================================\nInstalling:\n MySQL-python x86_64 1.2.3-11.el7 basic 82 k\n\nTransaction Summary\n================================================================================\nInstall 1 Package\n\nTotal download size: 82 k\nInstalled size: 231 k\nDownloading packages:\nRunning transaction check\nRunning transaction test\nTransaction test succeeded\nRunning transaction\n Installing : MySQL-python-1.2.3-11.el7.x86_64 1/1 \n Verifying : MySQL-python-1.2.3-11.el7.x86_64 1/1 \n\nInstalled:\n MySQL-python.x86_64 0:1.2.3-11.el7 \n\nComplete!\n”
]
}
[root@hackerdev ansible]# ansible web -m yum -a "name=MySQL-pytho