Please enable JavaScript.
Coggle requires JavaScript to display documents.
Phase 8 - Conditions (Decision Making) - Coggle Diagram
Phase 8 - Conditions (Decision Making)
Purpose
Execute tasks only when conditions are true.
when
Basic conditional execution.
Check operating system.
Check package existence.
Check service status.
Check variables.
Multiple Conditions
and
or
not
Comparison Operators
Equal
Not Equal
Greater Than
Less Than
Greater Than or Equal
Less Than or Equal
Logical Operators
and
or
not
Tests
defined
undefined
file
directory
exists
succeeded
failed
changed
failed_when
Define custom failure conditions.
Enterprise Uses
Database health check.
API validation.
Service verification.
Security compliance.
changed_when
Override changed status.
Prevent false changes.
Improve reporting.
until
Retry until successful.
retries
Number of retry attempts.
delay
Delay between retries.
wait_for
Wait for
Port
File
Service
Timeout
Blocks
block
rescue
always
Enterprise Scenarios
Patch only Red Hat servers.
Restart service only if package changed.
Retry application until healthy.
Skip reboot when unnecessary.
Continue after recoverable errors.