Groups
Groups
Sign in
Groups
Groups
Ansible Project
Conversations
About
Send feedback
Help
How to check if any package is installed on remote system ?
16 views
Skip to first unread message
Pratik Bandarkar
unread,
Jul 10, 2016, 3:02:02 PM
7/10/16
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Ansible Project
Hi,
I am looking for some option in yum module to check if any specific package is installed or not ? Can anyone help me on the same.
Regards,
Pratik.
Nico
unread,
Jul 10, 2016, 8:09:09 PM
7/10/16
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Ansible Project
Hi,
It depend on what you want to achieve, the yum module can check if a package is installed or not then install or remove using the state parameter.
However if you just want to check if a package is installed or not then something like this post:
http://stackoverflow.com/questions/21892603/how-to-make-ansible-execute-a-shell-script-if-a-package-is-not-installed
but for yum the command would probably be: yum list installed <package-name>
-Nico
Reply all
Reply to author
Forward
0 new messages