Uploaded image for project: 'Product Technical Learning'
  1. Product Technical Learning
  2. PTL-1356

DO374-32: Misleading text in Jinja2 template for /etc/motd

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major Major
    • DO374- RHAAP 2.0 1, DO374 - RHAAP2.0-en-1-20220126
    • DO374
    • None
    • 9
    • ILT, ROLE, VT
    • en-US (English)

      URL:
      Reporter RHNID:
      Section: -
      Language: en-US (English)
      Workaround:

      Description: Chapter 9 - First Guided exercise on Writing Ansible Content Collections - Step 5.2 enters the following into a jinja template:

      This is the system {{ ansible_facts['hostname'] }}.
      Today's date is: {{ ansible_facts['date_time']['date'] }}.

      But - the message of the day would show the date from the last time the playbook ran and not show the current date unless this playbook were scheduled to run every night at midnight.  It might suggest to people the wrong message about jinja templates - that the variables stay variables in the file transferred to the managed hosts. This same template was removed from the RH294 materials for that reason.

            rht-miphilli Michael Phillips
            Gereint1958 Jeff Henderson (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: