Can I limit the execution of a playbook on selected clients?

0 votes
Hi guys. I have a question.

I have 1 master and 10 clients on my server . In that 10cluents 5 are mine and 5 are my friends.

I want to execute my playbook only in my 5 clients.

Can anyone tell me how this works??
Oct 23 in Ansible by anonymous
• 19,570 points

1 answer to this question.

0 votes

Create a group in the inventory file and mention only your 5 clients and run the playbook with --limit flag.

Hope this helps!

answered Oct 23 by Varshitha

Related Questions In Ansible

0 votes
1 answer

How do I wget a file from web server using shell in the ansible playbook

Hey Ayaan, you could probably use this ...READ MORE

answered Jan 24, 2019 in Ansible by Anushri
0 votes
1 answer

Hey I'm trying to execute a playbook but I get the following error:

Hey, you have a syntax error as ...READ MORE

answered Mar 26, 2019 in Ansible by Kalgi
• 51,970 points
0 votes
1 answer

How to overwrite the content of a file in remote systems using Ansible playbook?

Hi@akhtar, You can find one argument in the ...READ MORE

answered Aug 2 in Ansible by MD
• 78,020 points
0 votes
1 answer

How to capture the output of a task in Ansible Playbook?

Hi@akhtar, Ansible registers module used to capture/store the ...READ MORE

answered Aug 2 in Ansible by MD
• 78,020 points
0 votes
1 answer

How to skip execution of a task in ansible playbook ??

Define tags...  Then while running playbook use --skip-tags. READ MORE

answered Sep 30 in Ansible by Adil
0 votes
1 answer

How can I create a new user using ansible ploybook?

You're switching from the root user. Root ...READ MORE

answered Mar 29, 2018 in Ansible by DareDev
• 6,870 points
+15 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,450 points
+2 votes
1 answer