openshift_certificate_expiry role fails with "'ansible_date_time' is undefined"

Solution Verified - Updated -

Issue

  • Using the openshift_certificate_expiry role to redeploy certificates results in the following error message:

    TASK [openshift_certificate_expiry : Generate expiration report HTML] ***************************************************************************************************************  
    fatal: [abc]: FAILED! => {"msg": "The task includes an option with an undefined variable. The error was: 'ansible_date_time' is undefined\n\nThe error appears to have been in '/usr/share/ansible/  openshift-ansible/roles/openshift_certificate_expiry/tasks/main.yml': line 15, column 3, but may\nbe elsewhere in the file depending on the exact syntax problem.\n\nThe offending line appears to   be:\n\n\n- name: Generate expiration report HTML\n  ^ here\n"}
    

Environment

  • OpenShift Container Platform (OCP) 3.11

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content