and_when.md

December 13, 2020 ยท View on GitHub

and when COMMAND

Represents a condition AND. Should be used right after @ block.

Example
@ Installing nginx
  when not which nginx
  - yum_install nginx

('when' is an alias for 'and when')

With multiple conditions:

@ Probably on linux system
  when test -d /sys
  and test -d /dev
  and test -d /proc
  - do foo
  - do bar

You can write 'and when test...' or just 'and test...'

See also

and when
or when
@