In Ansible, what is a unit of action called?

Prepare for the Cisco Certified DevNet Associate Exam. Use flashcards and multiple choice questions to boost your knowledge, with hints and explanations to guide you. Ace your exam effectively!

In Ansible, a unit of action is referred to as a task. A task represents a single action that Ansible will execute on a remote node, which could include operations such as installing a package, copying a file, or starting a service. Each task specifies the action to be performed and the module to be used, along with any necessary arguments or configurations needed for that action.

Understanding tasks is fundamental to using Ansible effectively, as they are the building blocks of playbooks. A playbook is essentially a set of tasks that Ansible executes in a particular order, which allows users to automate a wide variety of IT tasks.

Roles are collections of tasks, handlers, variables, and more, designed to enable reusable and shareable automation, while plays are definitions of what hosts to target and which roles/tasks to execute on those hosts. Modules are the specific pieces of code that carry out the actual actions taken within a task. Each of these concepts plays a role in Ansible’s overall structure, but when it comes specifically to the unit of action, the term used is a task.

Subscribe

Get the latest from Examzify

You can unsubscribe at any time. Read our privacy policy