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,170 points
1,580 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,060 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 23, 2019 in Ansible by Harsh
171 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
259 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 26, 2018 in DevOps & Agile by DragonLord999
• 8,450 points
954 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,060 points
2,175 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,060 points
3,308 views