Courseiva
Knowledge + Practice
CertificationsVendorsCareer RoadmapsLabs & ToolsStudy GuidesGlossaryPractice Questions
C
Courseiva

Free IT certification practice questions with explained answers for CCNA, CompTIA, AWS, Azure, Google Cloud, and more.

Certification Practice Questions

CCNA practice questionsSecurity+ SY0-701 practice questionsAWS SAA-C03 practice questionsAZ-104 practice questionsAZ-900 practice questionsCLF-C02 practice questionsA+ Core 1 practice questionsGoogle Cloud ACE practice questionsCySA+ CS0-003 practice questionsNetwork+ N10-009 practice questions
View all certifications →

Product

CertificationsCertification PathsExam TopicsPractice TestsExam Dumps vs Practice TestsStudy HubComparisons

Company

AboutContactEditorial PolicyQuestion Writing PolicyTrust Center

Legal

Privacy PolicyTerms of Service

Courseiva is a free IT certification practice platform offering original exam-style practice questions, detailed explanations, topic-based practice, mock exams, readiness tracking, and study analytics for Cisco, CompTIA, Microsoft, AWS, and other technology certifications.

© 2026 Courseiva. Courseiva is operated by JTNetSolutions Ltd. All rights reserved.

Courseiva is an independent certification practice platform and is not affiliated with, endorsed by, or sponsored by Cisco, Microsoft, AWS, CompTIA, Google, ISC2, ISACA, or any other certification vendor. Vendor names and certification marks are used only to identify the exams learners are preparing for.

← Manage task execution and roles practice sets

EX294 Manage task execution and roles • Complete Question Bank

EX294 Manage task execution and roles — All Questions With Answers

Complete EX294 Manage task execution and roles question bank — all 0 questions with answers and detailed explanations.

64
Questions
Free
No signup
Certifications/EX294/Practice Test/Manage task execution and roles/All Questions
Question 1easymultiple choice
Read the full Ansible explanation →

A systems administrator needs to run a playbook that installs packages on a group of managed nodes. The playbook should run only on nodes that are part of the 'web_servers' group in the inventory. Which approach is best practice?

Question 2mediummultiple choice
Read the full Ansible explanation →

A team is writing an Ansible role to configure a web server. They want to include default variables that can be easily overridden by playbook variables. Which directory and file should they use to define these variables?

Question 3hardmultiple choice
Read the full Ansible explanation →

During a playbook execution, a task that uses the 'ansible.builtin.copy' module fails with 'Permission denied' on a remote host. The playbook runs as user 'ansible' which is a sudoer without password. Which of the following is the most likely cause and solution?

Question 4mediummulti select
Read the full Ansible explanation →

Which TWO statements about Ansible roles are true?

Question 5hardmulti select
Read the full Ansible explanation →

Which THREE are valid methods to control task execution in Ansible?

Question 6mediummultiple choice
Read the full Ansible explanation →

Refer to the exhibit. The playbook runs successfully. What will the debug task output?

Exhibit

Refer to the exhibit.

```yaml
---
- hosts: all
  tasks:
    - name: Create user
      ansible.builtin.user:
        name: jdoe
        state: present
      register: user_result

    - name: Show user info
      ansible.builtin.debug:
        var: user_result
```
Question 7hardmultiple choice
Read the full Ansible explanation →

Refer to the exhibit. The playbook uses the 'yum' module to install 'httpd' on a RHEL 8 system. Which of the following is the most likely cause of the failure?

Exhibit

Refer to the exhibit.

```
TASK [Gathering Facts] *********************************************************
ok: [server1.example.com]

TASK [role1 : Install package] *************************************************
fatal: [server1.example.com]: FAILED! => {"changed": false, "msg": "No package matching 'httpd' found available, tried all mirrors", "rc": 126, "results": []}
```
Question 8easymultiple choice
Read the full Ansible explanation →

An Ansible playbook needs to ensure a service is enabled and running on boot. Which combination of parameters should be used with the 'systemd' module?

Question 9easymultiple choice
Read the full Ansible explanation →

Which best practice should be followed when using Ansible to manage task execution across multiple hosts?

Question 10hardmultiple choice
Read the full Ansible explanation →

You are managing a fleet of 50 RHEL 8 servers that host a critical web application. Your Ansible control node runs RHEL 8 with Ansible 2.9. The application requires a specific package 'app-pkg' that is only available from a private YUM repository. The repository is configured on each server via a role 'repo_config'. Recently, after a security update, the repository GPG key was changed. Now, when you run the playbook to install 'app-pkg' on all servers, it fails on some servers with the error: "GPG check FAILED: key ID mismatch". On other servers, the installation succeeds. All servers have the same OS version and are configured identically via the same role. The playbook uses the 'yum' module with 'state: present'. You verify that the GPG key file on the control node is the correct new key and that the role copies it to the servers. What is the most likely cause and the best course of action?

Question 11mediummulti select
Read the full Ansible explanation →

Which TWO statements about Ansible roles are correct?

Question 12hardmultiple choice
Read the full Manage task execution and roles explanation →

What is the most likely cause of the failure?

Exhibit

Refer to the exhibit.

```yaml
- name: Deploy web server
  hosts: webservers
  roles:
    - common
    - nginx
```

And the output of `ansible-playbook site.yml --check` shows:

```
PLAY [Deploy web server] *************************
TASK [common : include_vars] *********************
ok: [web1]
TASK [nginx : install nginx] *********************
fatal: [web1]: FAILED! => {"msg": "The task includes an option with an undefined variable. The error was: 'nginx_version' is undefined"}
```
Question 13easymultiple choice
Read the full Ansible explanation →

You are managing a web application deployment using Ansible. The application requires a specific version of a library (libapp) to be installed on all web servers. Your current playbook uses the role 'web' which includes a task to install libapp version 1.2. However, after a recent update, the role's defaults now specify libapp version 2.0, but you must keep version 1.2 for compatibility. You have defined a variable 'lib_version' in the playbook's vars section with value '1.2'. The role's task uses the variable 'libapp_version' (not 'lib_version'). The play fails because 'libapp_version' is undefined. What is the best way to resolve this issue without modifying the role?

Question 14mediumdrag order
Read the full Manage task execution and roles explanation →

Drag and drop the steps to configure a logical volume (LV) using LVM on a new disk in the correct order.

Drag steps to the numbered slots on the right, or tap a step then tap a slot.

Steps
Order
1Step 1
2Step 2
3Step 3
4Step 4
5Step 5
Question 15mediummatching
Read the full Manage task execution and roles explanation →

Match each systemd unit type to its description.

Drag a concept onto its matching description — or click a concept then click the description.

Concepts
Matches

Background daemon or process

IPC or network socket

Time-based activation

Filesystem mount point

Group of units for synchronization

Question 16mediummultiple choice
Read the full Ansible explanation →

An Ansible playbook includes multiple roles. The administrator wants to ensure that a specific role's tasks are executed before any other roles, even if the roles are listed in a different order in the playbook. Which approach should be used?

Question 17hardmultiple choice
Read the full Manage task execution and roles explanation →

A developer wants to reuse a set of tasks that conditionally include other task files based on variables defined per host. Which method should be used to ensure the included tasks are evaluated per host at runtime?

Question 18easymultiple choice
Read the full Ansible explanation →

In an Ansible playbook, the 'strategy' parameter is set to 'free'. What behavior does this strategy produce?

Question 19mediummultiple choice
Read the full Ansible explanation →

A playbook uses roles with default variables. The administrator needs to override a default variable for a specific role only when that role is used. Which method should be used?

Question 20hardmultiple choice
Read the full Ansible explanation →

An Ansible playbook fails intermittently due to a service not starting in time. The administrator wants to configure a task to retry until the service confirms it is running. Which Ansible feature should be used?

Question 21easymultiple choice
Read the full Ansible explanation →

Which directive in an Ansible playbook ensures that a task runs only on the first host in a batch, and results are applied to all hosts?

Question 22mediummultiple choice
Read the full Ansible explanation →

An administrator wants to use an Ansible role from Ansible Galaxy but the role has a dependency on another role that is already installed. What should be done to avoid conflicts?

Question 23hardmultiple choice
Read the full Ansible explanation →

A playbook includes a long-running task that should not block the rest of the playbook. The administrator wants to start the task and later check its status. Which method should be used?

Question 24easymultiple choice
Read the full Ansible explanation →

Which ansible.cfg setting controls the number of parallel forks for task execution?

Question 25easymulti select
Read the full Ansible explanation →

Which two statements are true regarding Ansible roles? (Choose two.)

Question 26hardmulti select
Read the full Ansible explanation →

An administrator is debugging a playbook that uses multiple roles and wants to limit execution to a specific set of tasks. Which three methods can be used to filter task execution? (Choose three.)

Question 27mediummulti select
Read the full Ansible explanation →

An Ansible playbook uses the 'block' and 'rescue' directives. Which two statements are true about this construct? (Choose two.)

Question 28mediummultiple choice
Read the full Ansible explanation →

Refer to the exhibit. The playbook fails with an error. What is the most likely cause?

Exhibit

- hosts: all
  tasks:
    - name: Import tasks
      import_tasks: "{{ item }}.yml"
      loop:
        - setup
        - configure
Question 29hardmultiple choice
Read the full Manage task execution and roles explanation →

Refer to the exhibit. The administrator observes the output and is concerned because the 'Check on async job' task shows 'finished: 0'. What does this indicate?

Exhibit

TASK [Start long running process] *************************
changed: [host1]
ASYNC POLL on host1: jid=j1234567890 started, poll=0
TASK [Check on async job] *********************************
ok: [host1] => {
    "ansible_job_id": "j1234567890",
    "finished": 0,
    "started": 1
}
Question 30easymultiple choice
Read the full Ansible explanation →

Refer to the exhibit. A playbook already includes the 'common' role in its roles list. The current role depends on 'common' with 'allow_duplicates: false'. How many times will the 'common' role run?

Exhibit

dependencies:
  - role: common
    allow_duplicates: false
Question 31easymultiple choice
Read the full Manage task execution and roles explanation →

An administrator wants to ensure a role's tasks are executed only on certain hosts. Which approach should they use?

Question 32easymultiple choice
Read the full Ansible explanation →

A playbook includes multiple roles. The administrator wants to skip a specific role during execution. Which technique should they use?

Question 33easymultiple choice
Read the full Manage task execution and roles explanation →

What is the purpose of the 'meta: flush_handlers' task?

Question 34mediummultiple choice
Read the full Ansible explanation →

A playbook uses a loop to create multiple users. The administrator notices that if one user creation fails, the entire playbook stops. Which directive should be used to continue executing remaining iterations?

Question 35mediummultiple choice
Read the full Ansible explanation →

An Ansible role has a complex dependency tree. The administrator wants to ensure that dependencies are installed before the main role tasks. Which file should be used to define dependencies?

Question 36mediummultiple choice
Read the full Ansible explanation →

An administrator wants to run a playbook that executes tasks in parallel across multiple hosts but wants to limit the number of simultaneous hosts to 5. Which directive should be set?

Question 37hardmultiple choice
Read the full Ansible explanation →

A playbook uses ansible.builtin.import_playbook to include other playbooks. The administrator needs to pass variables to the imported playbook. Which approach is valid?

Question 38hardmultiple choice
Read the full Manage task execution and roles explanation →

An administrator is designing a role that needs to execute a set of tasks conditionally based on whether a package is installed. Which approach is best practice?

Question 39hardmultiple choice
Read the full Manage task execution and roles explanation →

A team has developed several roles that share common variables. They want to organize these variables in a central file. Where should they place this file so it is automatically loaded by all roles?

Question 40easymulti select
Read the full Ansible explanation →

Which TWO elements can be used to include external task files in a playbook?

Question 41mediummulti select
Read the full Ansible explanation →

Which THREE directives can be used to modify loop behavior in Ansible?

Question 42hardmulti select
Read the full Ansible explanation →

Which TWO statements about Ansible role defaults are true?

Question 43easymultiple choice
Read the full Manage task execution and roles explanation →

What is the purpose of the 'vars' keyword under the nginx role inclusion?

Exhibit

Refer to the exhibit.

---
- hosts: webservers
  roles:
    - role: common
    - role: nginx
      vars:
        http_port: 8080
  tasks:
    - name: ensure nginx is running
      ansible.builtin.service:
        name: nginx
        state: started
Question 44mediummultiple choice
Read the full Ansible explanation →

An administrator sees this output during a playbook run. What can they conclude?

Exhibit

Refer to the exhibit.

TASK [Install packages] ********************************************************
fatal: [db1]: FAILED! => {"changed": false, "msg": "No package matching 'mariadb' found"}
...ignoring
Question 45hardmultiple choice
Read the full Manage task execution and roles explanation →

An administrator wants to define role dependencies. In which file should they place the dependencies declaration?

Exhibit

Refer to the exhibit.

roles/
└── myrole/
    ├── defaults/
    │   └── main.yml
    ├── tasks/
    │   └── main.yml
    ├── handlers/
    │   └── main.yml
    ├── templates/
    ├── files/
    ├── vars/
    │   └── main.yml
    ├── meta/
    │   └── main.yml
    └── README.md
Question 46mediummultiple choice
Read the full Ansible explanation →

A DevOps engineer wants to run an Ansible playbook inside a specific execution environment (EE) that includes custom collections. The EE image is stored in a private registry requiring authentication. The engineer has configured a container credential file. Which command will execute the playbook using the EE and the credential file?

Question 47easymultiple choice
Read the full Ansible explanation →

Refer to the exhibit. An Ansible playbook task fails with 'Missing sudo password'. The playbook runs against a server where the remote user 'admin' has sudo privileges but requires a password. Which configuration change would resolve this issue?

Exhibit

---
- hosts: dbservers
  tasks:
    - name: Create postgres user
      user:
        name: postgres
        state: present
      become: yes
      become_user: postgres
      become_method: sudo

Error: 

fatal: [server1]: FAILED! => {"msg": "Missing sudo password"}
Question 48hardmultiple choice
Read the full NAT/PAT explanation →

An administrator has a requirements.yml file specifying roles from multiple sources: a public Galaxy server, a private Git repository, and a local path. They want to install all roles into the roles directory of the current project. Which command will achieve this?

Question 49easymultiple choice
Read the full Ansible explanation →

A playbook needs to load encrypted variables from a file vault.yml. The vault password is stored in a file vault-pass with restricted permissions. Which method securely loads the variables when running the playbook?

Question 50mediummultiple choice
Read the full Ansible explanation →

A team develops a custom Ansible role 'webserver' that depends on another role 'common'. They want to ensure that when 'webserver' is used, 'common' is automatically installed from the same Galaxy server. Which approach should they use?

Question 51easymulti select
Read the full Ansible explanation →

An Ansible playbook that installs packages and configures services is not idempotent. Which two practices should be implemented to make it idempotent? (Choose two.)

Question 52mediummulti select
Read the full Ansible explanation →

An administrator has a playbook with tasks tagged 'install', 'configure', and 'service'. There are no untagged tasks. They want to run only the tasks tagged 'install' and 'configure', skipping 'service'. Which three commands will achieve this? (Choose three.)

Question 53hardmultiple choice
Read the full Ansible explanation →

You are responsible for managing a large fleet of web servers running Red Hat Enterprise Linux 8. You have an Ansible playbook that deploys a custom web application. The playbook uses several roles from Ansible Galaxy and includes tasks that require root privileges. Recently, users reported that the deployment fails intermittently with the error 'Timeout (12s) waiting for privilege escalation prompt'. You suspect that the issue is related to the become method and the SSH connection. The current inventory uses 'ansible_user: deploy' and 'ansible_become: yes' with default settings. The 'deploy' user has sudo privileges with NOPASSWD for all commands. However, the timeout occurs only on high-latency connections. Which change would most effectively resolve the timeout issue?

Question 54mediummultiple choice
Read the full Ansible explanation →

Your organization uses Red Hat Ansible Automation Platform (AAP) to manage job execution. You have created a job template that runs a playbook to configure application servers. The playbook uses a custom credential to access a remote database. Recently, the job started failing with 'Authentication failed' when connecting to the database. You have verified that the database credentials are correct. The credential in AAP is of type 'Machine' and is assigned to the job template. The playbook uses the 'mysql_db' module. Which step should you take to troubleshoot and resolve the issue?

Question 55easymultiple choice
Read the full Ansible explanation →

You need to run an Ansible playbook every hour to update a dynamic inventory file from a CMDB API. The playbook is stored in /opt/ansible/update_inventory.yml. You want to schedule the execution using a cron job on the control node. The control node runs Red Hat Enterprise Linux 9. The playbook uses Ansible Vault to decrypt API credentials, and the vault password is stored in /etc/ansible/.vault_pass. Which cron entry will execute the playbook hourly?

Question 56mediummultiple choice
Read the full Ansible explanation →

Your team uses ansible-pull to manage configuration of a large number of remote nodes. Each node is configured to pull the latest playbook from a Git repository every 30 minutes. Recently, some nodes started reporting 'ERROR! the role 'base' was not found'. The playbook depends on roles from a requirements.yml file that is stored in the same repository. The ansible-pull command on each node uses the default roles path (~/.ansible/roles). The Git repository contains the requirements.yml file but does not contain the actual role directories. What is the most likely cause and solution?

Question 57mediummulti select
Read the full Ansible explanation →

Which TWO of the following statements about Ansible roles are correct?

Question 58hardmultiple choice
Read the full Ansible explanation →

Refer to the exhibit. An administrator runs the playbook but the wait_for task fails. What is the most likely cause?

Exhibit

---
- hosts: webservers
  vars:
    http_port: 80
  tasks:
  - name: Ensure Apache is running
    service:
      name: httpd
      state: started
  - name: Check if port is open
    wait_for:
      host: "{{ ansible_facts['default_ipv4']['address'] }}"
      port: "{{ http_port }}"
      state: started
    delegate_to: localhost
Question 59easymultiple choice
Read the full Ansible explanation →

A team is automating server configuration using Ansible. They have a custom role 'security' that updates firewall and SSH settings. They notice that when they apply the role to multiple hosts, the SSH configuration changes sometimes fail because the firewall blocks the SSH port before the SSH configuration is updated. They need to ensure that SSH configuration is updated first, then firewall rules are applied. They have defined both tasks in the same role. What should they do?

Question 60hardmultiple choice
Read the full Ansible explanation →

Refer to the exhibit. An administrator runs a playbook in check mode and receives the shown output. What should be done to fix the failure while maintaining idempotency?

Network Topology
[root@control ansible]# ansible-playbook playbook.ymlcheckdiff[root@control ansible]# cat playbook.yml- name: Deploy web apphosts: webserversroles:- common- apache- deployPLAY [Deploy web app] ********************************************************ok: [web1.example.com]changed: [web1.example.com]PLAY RECAP ********************************************************************web1.example.comok=3 changed=1 unreachable=0 failed=1 skipped=0 rescued=0 ignored=0
Question 61hardmultiple choice
Read the full Manage task execution and roles explanation →

Refer to the exhibit. The administrator notices that the handler 'restart httpd' runs even though the httpd service was already running. Which change would ensure the handler only runs if the service configuration changes?

Exhibit

[root@control ansible]# cat roles/apache/tasks/main.yml
---
- name: Install httpd
  yum:
    name: httpd
    state: present
  notify: restart httpd

- name: Ensure httpd is running
  service:
    name: httpd
    state: started
    enabled: yes

[root@control ansible]# cat roles/apache/handlers/main.yml
---
- name: restart httpd
  service:
    name: httpd
    state: restarted

[root@control ansible]# cat playbook.yml
---
- hosts: all
  roles:
    - apache

[root@control ansible]# ansible-playbook playbook.yml
...
TASK [apache : Install httpd] *************************************************
changed: [server1.example.com]

TASK [apache : Ensure httpd is running] ***************************************
ok: [server1.example.com]

RUNNING HANDLER [apache : restart httpd] **************************************
changed: [server1.example.com]
Question 62mediummultiple choice
Read the full Ansible explanation →

Refer to the exhibit. When the playbook runs on target1, which value will nginx_port have in the role?

Network Topology
[root@control ansible]# ansible-inventoryhost target1yaml[root@control ansible]# cat roles/nginx/vars/main.ymlnginx_port: 8080nginx_user: nginx[root@control ansible]# cat roles/nginx/defaults/main.ymlnginx_port: 80nginx_user: www-data[root@control ansible]# cat playbook.yml- hosts: allroles:- role: nginxvars:nginx_port: 443all:hosts:target1:nginx_port: 9090nginx_user: custom
Question 63mediummultiple choice
Read the full Ansible explanation →

Refer to the exhibit. The administrator wants to run a playbook that installs a package on all webservers. Which command will use the existing configuration and inventory correctly?

Exhibit

[root@control ansible]# cat ansible.cfg
[defaults]
host_key_checking = False
inventory = ./inventory
roles_path = ./roles

[inventory]
enable_plugins = host_list, script, auto, yaml, ini, toml

[privilege_escalation]
become = True
become_method = sudo
become_user = root
become_ask_pass = False

[root@control ansible]# cat inventory
[webservers]
web1 ansible_host=192.168.1.10 ansible_user=admin
web2 ansible_host=192.168.1.11 ansible_user=admin

[dbservers]
db1 ansible_host=192.168.1.20 ansible_user=admin

[all:vars]
ansible_python_interpreter=/usr/bin/python3

[root@control ansible]# ansible webservers -m ping
web1 | SUCCESS => {
    "ansible_facts": {
        "discovered_interpreter_python": "/usr/bin/python3"
    },
    "changed": false,
    "ping": "pong"
}
web2 | SUCCESS => {
    "ansible_facts": {
        "discovered_interpreter_python": "/usr/bin/python3"
    },
    "changed": false,
    "ping": "pong"
}
Question 64hardmultiple choice
Read the full Ansible explanation →

Refer to the exhibit. The administrator runs the playbook with the 'deploy' tag, but all tasks are skipped. What is the most likely reason?

Network Topology
[root@control ansible]# ansible-playbook site.ymltags "deploy"[root@control ansible]# cat roles/database/tasks/main.yml- name: Install MariaDByum:name: mariadb-serverstate: presenttags:- packages- name: Start MariaDBservice:name: mariadbstate: startedenabled: yes- service- name: Create application databasemysql_db:name: appdb- database[root@control ansible]# cat site.yml- hosts: dbserversroles:- deployPLAY [dbservers] **************************************************************skipping: [db1.example.com]PLAY RECAP ********************************************************************db1.example.comok=0 changed=0 unreachable=0 failed=0 skipped=3 rescued=0 ignored=0

Practice tests

Scored 10-question sessions with instant feedback and explanations.

EX294 Practice Test 1 — 10 Questions→EX294 Practice Test 2 — 10 Questions→EX294 Practice Test 3 — 10 Questions→EX294 Practice Test 4 — 10 Questions→EX294 Practice Test 5 — 10 Questions→EX294 Practice Exam 1 — 20 Questions→EX294 Practice Exam 2 — 20 Questions→EX294 Practice Exam 3 — 20 Questions→EX294 Practice Exam 4 — 20 Questions→Free EX294 Practice Test 1 — 30 Questions→Free EX294 Practice Test 2 — 30 Questions→Free EX294 Practice Test 3 — 30 Questions→EX294 Practice Questions 1 — 50 Questions→EX294 Practice Questions 2 — 50 Questions→EX294 Exam Simulation 1 — 100 Questions→

Practice by domain

Each domain maps to a weighted exam section. Focus on the domain where you are weakest.

Deploy Ansible Automation PlatformManage inventories and credentialsManage task execution and rolesCoordinate rolling updatesTransform data with filters and pluginsCreate content collections and execution environmentsImplement advanced Ansible automationManage automation security and operations

Practice by scenario

Filter questions by type — troubleshooting, exhibit, drag-and-drop, PBQ, ACLs, OSPF, and more.

Browse scenarios→

Continue studying

All Manage task execution and roles setsAll Manage task execution and roles questionsEX294 Practice Hub