Ansible - When

> Infrastructure as code > Ansible

1 - About

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.

Advertising

3 - Syntax

when is a task property.

task:
  when: expression

where: