Bookmark this page

Quiz: Ansible Role Structure

Ansible Role Structure

Choose the correct answers to the following questions:


  1. 1.

    Which one of the following statements best describes Ansible Roles?

    A

    Configuration settings that enable specific users to run Ansible Playbooks.

    B

    A long and complex Ansible Playbook.

    C

    Collections of YAML task files and supporting items arranged in a specific structure.

    D

    A core engine feature of Ansible that includes or imports files.

  2. 2.

    Which one of the following subdirectories is not part of the structure of an Ansible Role?

    A

    defaults/

    B

    files/

    C

    playbooks/

    D

    meta/

    E

    vars/

  3. 3.

    Which one of the following Ansible Role subdirectories contains variables with low precedence?

    A

    defaults/

    B

    vars/

    C

    meta/

    D

    files/

  4. 4.

    Which one of the following Ansible Role subdirectories contains variables that cannot be overridden by inventory variables?

    A

    defaults/

    B

    vars/

    C

    meta/

    D

    files/

  5. 5.

    Which one of the following statements related to Ansible Roles is false?

    A

    Ansible Roles make larger projects more manageable.

    B

    Ansible Roles can be developed in parallel by different network developers.

    C

    Ansible Roles must store passwords and private keys to make it more agile.

    D

    Ansible Roles group content together, enabling easy sharing of code.

  6. 6.

    What are three ways you can use an Ansible Role in a play? (Choose three.)

    A

    By importing the Ansible Role using the ansible.builtin.import_role module.

    B

    By including the Ansible Role using the ansible.builtin.include_role module.

    C

    By using a roles section in the play with the Ansible Role in the list of Ansible Roles.

    D

    By including the Ansible Role in the pre_roles or post_roles section of the play.

Revision: do457-2.3-7cfa22a