## WORKING WITH CONDITIONALS

Ansible supports the conditional execution of a task based on the run-time evaluation of variable, fact, or previous task result.

Ansible Terminal

    - yum:
        name: httpd
        state: latest
      when: ansible_os_family == "RedHat"

Conditionals are another instance of Jinja2 in action within Ansible plays themselves. In the provided example "ansible_os_family" is a fact variable Ansible will set.

There are other forms of conditional clauses, but `when` is usually all that is needed.

NOTE: Conditional clauses are considered to be raw Jinja2 expression without double curly braces.