How to run an Ansible Playbook to a particular node

0 votes

Hi Guys,

I have created one Ansible Playbook. But I want to run the playbook in a particular system without changing the host inside the file. How can I do that?

Sep 16, 2020 in Ansible by akhtar
• 38,260 points
2,516 views

1 answer to this question.

0 votes

Hi@akhtar,

You can control the playbook from the command line using --limit argument. You can use the below command to run your playbook in a particular node.

$ ansible-playbook k8.yml --limit=slave

answered Sep 16, 2020 by MD
• 95,460 points

Related Questions In Ansible

0 votes
1 answer

How to copy an AMI in a different region using Ansible Playbook?

Hi@akhtar, Ansible has one module to copy AMI ...READ MORE

answered Dec 4, 2020 in Ansible by MD
• 95,460 points
990 views
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,667 views
0 votes
2 answers
+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,035 views
+2 votes
1 answer
0 votes
1 answer

How to run a playbook from a specific task in Ansible?

Hi@akhtar, The --start-at-task option allows you to start ...READ MORE

answered Sep 15, 2020 in Ansible by MD
• 95,460 points
11,165 views
0 votes
1 answer

How to run a cron job using Ansible Playbook?

Hi@akhtar, You can use a module named Cron ...READ MORE

answered Sep 29, 2020 in Ansible by MD
• 95,460 points
10,392 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