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

RH294: ch09s04 - jinja2 string concatenation operator is tilde, "~" - RHT2336526

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Minor Minor
    • RH294 - RHEL9.0-en-4-20241107
    • RH294
    • None
    • False
    • Hide

      None

      Show
      None
    • False
    • 9
    • en-US (English)
    • AU294v2.5 Sprint 1

      Please fill in the following information:


      URL: ch09s04
      Reporter RHNID: jkupfere
      Section title: Guided Exercise: Managing Users and Authentication
      Language: English

      Issue description

      Section 9.4: Guided Exercise: Managing Users and Authentication

      In step 5 and other places the content shows using "" to concatenate strings, for example: "{{ lookup('file', 'files/' item['username'] + '.key.pub') }}"

      However, the jinja2 string concatenation operator is tilde, "~", which guarantees values are converted to strings before concatenation.

      Course content should show consistently using tilde to avoid errors which may arise from type conflicts as documented in the jinja2 project:

      https://jinja.palletsprojects.com/en/stable/templates/#math

      Steps to reproduce:

      Workaround:

      Expected result:

              rht-dspohn Dallas Spohn
              carias@redhat.com Carlos Arias
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: