[
[email protected] ~]# ansible mysql -m yum -a 'name=gcc state=installed'
192.168.56.88 | SUCCESS => {
"ansible_facts": {
"discovered_interpreter_python": "/usr/bin/python"
},
"changed": false,
"msg": "",
"rc": 0,
"results": [
"gcc-4.8.5-44.el7.x86_64 providing gcc is already installed"
]
}
[
[email protected] ~]# ansible mysql -m yum -a 'name=g++ state=installed'
192.168.56.88 | FAILED! => {
"ansible_facts": {
"discovered_interpreter_python": "/usr/bin/python"
},
"changed": false,
"msg": "No package matching 'g++' found available, installed or updated",
"rc": 126,
"results": [
"No package matching 'g++' found available, installed or updated"
]
}
[
[email protected] ~]# ansible mysql -m yum -a 'name=gcc state=installed'
192.168.56.88 | CHANGED => {
"ansible_facts": {
"discovered_interpreter_python": "/usr/bin/python"
},
"changed": true,
"changes": {
"installed": [
"gcc"
]
},
"msg": "Warning: RPMDB altered outside of yum./n",
"rc": 0,
"results": [
"Loaded plugins: langpacks, product-id, search-disabled-repos, subscription-/n : manager/n/nThis system is not registered with an entitlement server. You can use subscription-manager to register./n/nResolving Dependencies/n--> Running transaction check/n---> Package gcc.x86_64 0:4.8.5-44.el7 will be installed/n--> Finished Dependency Resolution/n/nDependencies Resolved/n/n================================================================================/n Package Arch Version Repository Size/n================================================================================/nInstalling:/n gcc x86_64 4.8.5-44.el7 rhel7 16 M/n/nTransaction Summary/n================================================================================/nInstall 1 Package/n/nTotal download size: 16 M/nInstalled size: 37 M/nDownloading packages:/nRunning transaction check/nRunning transaction test/nTransaction test succeeded/nRunning transaction/n Installing : gcc-4.8.5-44.el7.x86_64 1/1 /n Verifying : gcc-4.8.5-44.el7.x86_64 1/1 /n/nInstalled:/n gcc.x86_64 0:4.8.5-44.el7 /n/nComplete!/n"
]
}