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,170 points
96 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,060 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,060 points
43 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
9,745 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 26, 2018 in DevOps & Agile by DragonLord999
• 8,450 points
954 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,060 points
494 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,060 points
1,369 views