Check is a package exists - Ansible

0 votes
I would like to check if a specific package exists in my ansible. Also, I do not want to update it? How do I do it?
Mar 6 in Ansible by Kavya
62 views

1 answer to this question.

0 votes

Hey @Kavya, to ensure a package is installed, but don’t update it, you can use the following command:

$ ansible webservers -m yum -a "name=acme state=present"

It checks for a yum package called acme in all the servers listed under the group webservers.

answered Mar 6 by Yogesh

Related Questions In Ansible

0 votes
1 answer
0 votes
1 answer

Running ansible command on a single server when it is deployed to multiple servers

You can try the run_once attribute: Example from ...READ MORE

answered Jun 13, 2018 in Ansible by DareDev
• 6,810 points
175 views
0 votes
1 answer
+1 vote
1 answer

Is it possible to append a large amount of text to a file using Ansible?

Here is concept which you can follow. blockinfile is ...READ MORE

answered Jul 30, 2018 in Ansible by Atul
• 10,240 points
2,501 views
+13 votes
2 answers

Git management technique when there are multiple customers and need multiple customization?

Consider this - In 'extended' Git-Flow, (Git-Multi-Flow, ...READ MORE

answered Mar 26, 2018 in DevOps & Agile by DragonLord999
• 8,380 points
152 views
0 votes
1 answer
0 votes
1 answer

Check for certain package with specific version exists - Ansible

Hey @Kavya, to check if a package ...READ MORE

answered Mar 6 in Ansible by Devika
52 views
+1 vote
1 answer