0 votes
in Ansible by
How can you use the “when” keyword in an Ansible playbook?

a) To define the name of the playbook

b) To define the hosts to run the playbook on

c) To conditionally run tasks based on certain criteria

d) To define variables for use in the playbook

1 Answer

0 votes
by

Solution: c) To conditionally run tasks based on certain criteria

Explanation: The “when” keyword in an Ansible playbook is used to conditionally run tasks based on certain criteria, such as the value of a variable or the state of a system.

...