PrepAway - Latest Free Exam Questions & Answers

Which line includes a syntax error?

Consider the following playbook.

– hosts: webservers
become: yes

– name: install httpd
yum:
name: httpd
state: latest

Which line includes a syntax error?

A. become: yes – there is no attribute called become
B. yum: – yum should be proceeded with a hyphen
C. The file does not end with end-playbook.

D. The playbook does not include the task directive.

Explanation:
The “task:” directive is required at the prior to providing the tasks of a playbook. Without it, Ansible will not throw an error.


Leave a Reply

Your email address will not be published. Required fields are marked *