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

DO374-92: Ch7S04, example given for the ansible.builtin.password lookup plugin seems wrong

XMLWordPrintable

    • Icon: Story Story
    • Resolution: Done
    • Icon: Minor Minor
    • DO447 - RHAE 2.8 1
    • DO374 - RHAAP2.2-en-1-20230131
    • DO374
    • None
    • 7
    • ROLE
    • en-US (English)

      URL: https://role.rhu.redhat.com/rol-rhu/app/courses/do374-2.2/pages/ch07s04
      Reporter RHNID: ctiwary@redhat.com
      Section: 4 - Guided Exercise: Templating External Data Using Lookups
      Language: en-US (English)
      Workaround:

      Description: Ch7 S04, there is an example given for the ansible.builtin.password lookup plugin.

      Although it may work as written, the given syntax will not provide the expected result of a password of a specific length. It should be updated to match the plugin documentation with correct syntax. password_plain: "{{ lookup('ansible.builtin.password', 'credentials/' + item + ' length=9') }}" VS password_plain: "{{ lookup('ansible.builtin.password', 'credentials/' + item, length=9') }}"

      In the corrected syntax, the length parameter is placed inside the lookup function, separated by a comma. This aligns with the plugin documentation and ensures that the password generated will have the specified length of 9 characters.

        1. image-2023-06-25-15-00-27-386.png
          25 kB
          Antonio Mari Romero
        2. image-2023-06-25-15-02-06-702.png
          8 kB
          Antonio Mari Romero
        3. image-2023-06-25-15-04-25-950.png
          25 kB
          Antonio Mari Romero
        4. image-2023-06-25-15-05-17-535.png
          8 kB
          Antonio Mari Romero
        5. image-2023-06-25-15-09-08-222.png
          8 kB
          Antonio Mari Romero

            glsbugs-automation@redhat.com PTL - Ansible Team
            chetan-rhls Chetan Tiwary
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: