Bookmark this page

Quiz: Describing Role Structure

Choose the correct answer to the following questions:

When you have completed the quiz, click check. If you wish to try again, click reset. Click show solution to see all of the correct answers.

  1. 1.

    Which of the following statements best describes roles?

    A

    Configuration settings that allow specific users to run Ansible Playbooks.

    B

    Playbooks for a data center.

    C

    Collection of YAML task files and supporting items arranged in a specific structure for easy sharing, portability, and reuse.

  2. 2.

    Which of the following can be specified in roles?

    A

    Handlers

    B

    Tasks

    C

    Templates

    D

    Variables

    E

    All of the above

  3. 3.

    Which file declares role dependencies?

    A

    The Ansible Playbook that uses the role.

    B

    The meta/main.yml file inside the role hierarchy.

    C

    The meta/main.yml file in the project directory.

    D

    Role dependencies cannot be defined in Ansible.

  4. 4.

    Which file in a role's directory hierarchy should contain the initial values of variables that might be used as parameters to the role?

    A

    defaults/main.yml

    B

    meta/main.yml

    C

    vars/main.yml

    D

    The host inventory file.

Revision: rh294-8.4-9cb53f0