Ansible: How can I update the system CentOS with Ansible

I am trying to update the CentOS systems with ansible. Unfortunately I am not able to do that. I already tried: - name: install updates yum: update_cache=yes when: ansible_os_family == "RedHa...