EX407

EX407 practice questions, page 2 of 4, with answer review and explanations.

Question 6

Is it possible to specify multiple inventory files at once?

  1. Yes, you specify your inventory as a directory containing valid inventory files.
  2. No.
  3. Yes, you must provide extra parameters to the -i flag.
  4. Yes, you must specify a reference inventory master file.

Question 7

What keyword stores a command's output into a variable?

  1. register
  2. output
  3. output is stored in a variable named results by default
  4. debug

Question 8

What does the lineinfile module do?

  1. Allow addition of lines anywhere in a file
  2. Allows to grep for lines in a provided file
  3. Allow additions of lines to the end of a file only
  4. Input data into a file from stdin

Question 9

Consider the following playbook. --- - hosts: local become: yes tasks: - name: create users user: name: "{{item}}" with_items: - sam - john - bob How many times is the user module invoked?

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

Question 10

What command is used to run a playbook?

  1. ansible-playbook
  2. ansible
  3. ansible-p
  4. playbook