How to check the syntax of an Ansible playbook

0 votes

Hi Guys,

I am new to Ansible. I have created a playbook. But I am not sure about the syntax. How can I check the syntax of the playbook?

Sep 15, 2020 in Ansible by akhtar
• 38,230 points
12,030 views

1 answer to this question.

0 votes

Hi@akhtar,

Ansible has lots of commands, that help to work with ansible very easily. After creating a playbook you can check the syntax before you deploy the code in the production. You can use the below command.

$ ansible-playbook play.yml --syntax-check
answered Sep 15, 2020 by MD
• 95,440 points

Related Questions In Ansible

0 votes
1 answer

Ansible playbook to automate security configurations of an EC2 instance

Hey @Kiara, your indentation is very wrong. ...READ MORE

answered Jan 24, 2019 in Ansible by Harsh
578 views
0 votes
1 answer

Check status of an operation running in the background - Ansible

Hey @Neel, According to the documentation, Long running ...READ MORE

answered Mar 6, 2019 in Ansible by Yesha
1,493 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
3,458 views
+2 votes
1 answer
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, 2020 in Ansible by MD
• 95,440 points
13,136 views
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, 2020 in Ansible by MD
• 95,440 points
14,317 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