Free EX407 Exam Braindumps (page: 13)

Page 12 of 26

Is there a syntax error in the following excerpt? If so, what is it?

vars:
package: httpd

tasks:
- name: Deploy {{ package }}
yum:
name:
{{ package }}
state: present

  1. No, there are no syntax errors in the provided excerpt.
  2. Yes, the variable package is not defined correctly.
  3. Yes, the name parameter for the yum module should have a quoted value.
  4. Yes, the name keyword (below tasks) should have a quoted value.

Answer(s): C

Explanation:

Whenever a variable leads a value, it must be quoted to avoid parse errors.



Consider the following file.

authors:
- joe
- john

editors:
-frank

managers:

editing: josh

authoring: sam

How many lists are defined in the provided file?

  1. 3
  2. 0
  3. 2
  4. 1

Answer(s): C

Explanation:

There are two lists in the file. Note use of the hyphens.



What Ansible variable allows access to internal Ansible data?

  1. Ansible Facts
  2. Magic Variables
  3. Dictionary Variables
  4. Environment Variables

Answer(s): B

Explanation:

Magic variables allow access to internal Ansible data such as host groups and inventory hosts.



Where are custom facts defined on a host?

  1. /etc/ansible/facts.d/<HOSTNAME>
  2. /etc/ansible/<HOST>/*.fact
  3. /etc/ansible/facts.d/*.fact
  4. /etc/ansible/facts.db

Answer(s): C

Explanation:

Custom facts are gathered from all files with the .fact extension in /etc/ansible/facts.d.






Post your Comments and Discuss RedHat EX407 exam with other Community members:

EX407 Discussions & Posts