title: Jinja2 string append?
body: <p>The following joins a list of three strings:</p>
  
  <pre><code>&gt; Template('Hello {{ my_list | join(", ") }}!').render(my_list=['a', 'b', 'c'])
  'Hello a, b, c!'
  </code></pre>
  
  <p>The following doesn't work but illustrates what I want to do:</p>
  
  <pre><code>Template('Hello {{ my_list | append(":8080") | join(", ") }}!').render(my_list=['a', 'b', 'c'])
  </code></pre>
  
  <p>Here is the Python equivalent of what I want to do:</p>
  
  <pre><code>", ".join([x + ":8080" for x in ['a', 'b', 'c']])
  </code></pre>
  
  <p>While it's easiest to test Jinja2 expressions in Python, I ultimately need my Jinja2 expression to work within an Ansible playbook, like the following Ansible snippets:</p>
  
  <pre><code>  - name: "join without append"
      debug: msg="test={{ item | join(',') }}"
      with_items:
        - ["a", "b", "c"]
  
    - name: "this doesn't work"
      debug: msg="test={{ (item + ':8080') | join(',') }}"
      with_items:
        - ["a", "b", "c"]
  </code></pre>