1 master 10 clients - run ansible playbook only on 5

0 votes
Hi guys. I have a question. I have 1 master and 10 clients in 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??
Aug 8, 2019 in Ansible by Kumar
937 views

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. 

[web-server]
h1
h2
h3

[servers]
s1
s2
s3
ansible-playbook --limit 'web-server' playbook.yml
answered Aug 8, 2019 by Tanya

Related Questions In Ansible

0 votes
1 answer
0 votes
1 answer
0 votes
1 answer

Is it possible to run an Ansible Playbook in python script?

Hey @Cerci, Of course its possible. You ...READ MORE

answered Jan 17, 2019 in Ansible by Nicolas
15,732 views
+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 27, 2018 in DevOps & Agile by DragonLord999
• 8,450 points
4,058 views
+2 votes
1 answer
0 votes
1 answer
0 votes
1 answer

Is it possible to run commands on ansible host?

If you just trying to run a ...READ MORE

answered Jan 10, 2019 in Ansible by Vijay
1,438 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP