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"