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

Lab grade penalizes uses of relative template paths

XMLWordPrintable

    • False
    • Hide

      None

      Show
      None
    • False
    • 7
    • ILT, VT
    • Hide

      Chapter 7 Lab "Transforming Data with Filters and Plug-ins"

      Step 4: change the value of the firewall_rules variable
      in the deploy_apache.yml playbook to a Jinja2 expression that uses the
      template lookup plug-in to dynamically generate the variable's setting from the
      apache_firewall_rules.yml.j2 Jinja2 template.

      Add the following to deploy_apache.yml:

      firewall_rules: "{{ lookup('ansible.builtin.template', './templates/apache_firewall_rules.yml.j2') | from_yaml }}"

      Show
      Chapter 7 Lab "Transforming Data with Filters and Plug-ins" Step 4: change the value of the firewall_rules variable in the deploy_apache.yml playbook to a Jinja2 expression that uses the template lookup plug-in to dynamically generate the variable's setting from the apache_firewall_rules.yml.j2 Jinja2 template. Add the following to deploy_apache.yml: firewall_rules: "{{ lookup('ansible.builtin.template', './templates/apache_firewall_rules.yml.j2') | from_yaml }}"
    • en-US (English)

      Please fill in the following information:


      URL: https://rol.redhat.com/rol/app/courses/do374-2.2/pages/ch07s07
      Reporter RHNID: skareiva
      Section Title:                                                                        

      Issue description

      Chapter 7 lab penalizes uses of relative template paths

      Steps to reproduce:

      Chapter 7 Lab "Transforming Data with Filters and Plug-ins"

      Step 4: change the value of the firewall_rules variable
      in the deploy_apache.yml playbook to a Jinja2 expression that uses the
      template lookup plug-in to dynamically generate the variable's setting from the
      apache_firewall_rules.yml.j2 Jinja2 template.

      Add the following to deploy_apache.yml:

      firewall_rules: "{{ lookup('ansible.builtin.template', './templates/apache_firewall_rules.yml.j2') | from_yaml }}"

      Workaround:

      Remove the './templates/' prefix

      Expected result:

      Lab grade PASS

              glsbugs-automation@redhat.com PTL - Ansible Team
              skareiva Simonas Kareiva
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: