'ansible_facts' is undefined when trying to patch CVE (from Redhat insight)

Posted on

Im trying to install a security advisor reported by Redhat insight. "CVE-2020-26950"

I edited the yml file to make ansible use python3 instead of 2 on the host since the host is redhat8

i just added the below:

become: true
    ansible_python_interpreter: /usr/bin/python3

However when i run the playbook the below error appears:

TASK [Gathering Facts] ****************************************************************************************************************************************************
ok: [redhat8-temp]

TASK [check for update] ***************************************************************************************************************************************************
fatal: [redhat8-temp]: FAILED! => {"msg": "The task includes an option with an undefined variable. The error was: 'ansible_facts' is undefined\n\nThe error appears to have been in '/ansible_test/rhsa-20204685-1605772334136.yml': line 24, column 7, but may\nbe elsewhere in the file depending on the exact syntax problem.\n\nThe offending line appears to be:\n\n  tasks:\n    - name: check for update\n      ^ here\n\nexception type: <class 'ansible.errors.AnsibleUndefinedVariable'>\nexception: 'ansible_facts' is undefined"}
    to retry, use: --limit @/ansible_test/rhsa-20204685-1605772334136.retry

PLAY RECAP ****************************************************************************************************************************************************************
redhat8-temp               : ok=1    changed=0    unreachable=0    failed=1   

What did i do wrong?