For more information regarding Ansible's conditionals, please check the following URL:
https://docs.ansible.com/ansible/latest/user_guide/playbooks_conditionals.html