Ansible - When

Card Puncher Data Processing

Ansible - When

About

This page is about the conditional operator when.

all with (loop) clauses get executed BEFORE the when: as the when: can include 'item' to make each iteration of the loop conditional.

Syntax

when is a task property.

task:
  when: expression

where:





Discover More
Card Puncher Data Processing
Ansible - Flow (Conditional)

This page is conditional operators in Ansible. Variable initialization See Loop variable value can be made conditional. Example: variables by type of operating system with include_vars...
Card Puncher Data Processing
Ansible - Function

function in Ansible are tasks that includes other playbook and can pass variable. Include_tasks is done at runtime while import_tasks is done at start time If you have a conditional (such as...
Card Puncher Data Processing
Ansible PlayBook - Task

A task is a call to an ansible module with arguments located in a play list. Variables can be used in arguments to modules. Tasks are executed top to bottom one at a time, against matched by the...



Share this page:
Follow us:
Task Runner