title: ansible template error while templating string: no filter named 'product'
body: <p>I have the below playbook works fine in ansible 2.9.6 version. But it throws the error while running on ansible 2.4.2.0 version. my requirement is to use the <code>{{ applog }}</code> variable in my configuration yaml file with proper indentation and line break.</p>
  <p>templates\appconfig.yml.j2</p>
  <pre><code>paths: {{ applog | indent (width=4, indentfirst=True) }} 
  </code></pre>
  <p>The output of appconfig.yml</p>
  <pre><code>    paths: 
         - /home/ketg/apps/ketg_DEV/logs/*.log
         - /home/ketg/apps/ketg_UAT/logs/*.log
         - /home/teng/apps/ketg_PT/logs/*.log
  </code></pre>
  <p>playbook to work on both versions. can someone help</p>
  <p><strong>sample-playbook</strong></p>
  <pre><code>- hosts: localhost
    vars:
      app_log_paths: &quot;/home/ketg/apps/ketg_DEV/logs/*.log,/home/ketg/apps/ketg_UAT/logs/*.log,/home/teng/apps/ketg_PT/logs/*.log&quot;
   
    tasks:
      - set_fact:
          logs: &quot;{{ app_log_paths.split(',') }}&quot;
      - set_fact:
          applogs: &quot;{{ ['- '] | product(logs) | map ('join') | list }}&quot;
      - set_fact:
          applog: &quot;{{ applogs | join('\n') }}&quot;
      - debug:
          msg: &quot;{{ applog }}&quot;
  </code></pre>
  <h2>Output ansible 2.9.6</h2>
  <pre><code>PLAY [localhost] **************************************************************************************************************************************************************************************************
  
  TASK [Gathering Facts] ********************************************************************************************************************************************************************************************
  ok: [localhost]
  
  TASK [set_fact] ***************************************************************************************************************************************************************************************************
  ok: [localhost]
  
  TASK [set_fact] ***************************************************************************************************************************************************************************************************
  ok: [localhost]
  
  TASK [set_fact] ***************************************************************************************************************************************************************************************************
  ok: [localhost]
  
  TASK [debug] ******************************************************************************************************************************************************************************************************
  ok: [localhost] =&gt; {
      &quot;msg&quot;: &quot;- /home/ketg/apps/ketg_DEV/logs/*.log\n- /home/ketg/apps/ketg_UAT/logs/*.log\n- /home/teng/apps/ketg_PT/logs/*.log&quot;
  }
  
  PLAY RECAP ********************************************************************************************************************************************************************************************************
  localhost                  : ok=5    changed=0    unreachable=0    failed=0    skipped=0    rescued=0    ignored=0   
  </code></pre>
  <h2>Output ansible 2.4.2.0</h2>
  <pre><code>TASK [set_fact] ********************************************************************************************************
  fatal: [localhost]: FAILED! =&gt; {&quot;msg&quot;: &quot;template error while templating string: no filter named 'product'. String: {{ ['- '] | product(logs) | map ('join') | list }}&quot;}
  </code></pre>