<h5 dir="auto">Issue Type:</h5>
<ul dir="auto">
<li>Bug Report</li>
</ul>
<h5 dir="auto">Ansible Version:</h5>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="ansible 2.0.0 (devel 2761df232e) last updated 2015/09/01 15:04:26 (GMT -400)
  lib/ansible/modules/core: (detached HEAD bbcfb1092a) last updated 2015/09/01 15:04:54 (GMT -400)
  lib/ansible/modules/extras: (detached HEAD b8803306d1) last updated 2015/09/01 15:04:37 (GMT -400)
  config file = 
  configured module search path = None"><pre class="notranslate"><code class="notranslate">ansible 2.0.0 (devel 2761df232e) last updated 2015/09/01 15:04:26 (GMT -400)
  lib/ansible/modules/core: (detached HEAD bbcfb1092a) last updated 2015/09/01 15:04:54 (GMT -400)
  lib/ansible/modules/extras: (detached HEAD b8803306d1) last updated 2015/09/01 15:04:37 (GMT -400)
  config file = 
  configured module search path = None
</code></pre></div>
<h5 dir="auto">Ansible Configuration:</h5>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="No config file found; using defaults"><pre class="notranslate"><code class="notranslate">No config file found; using defaults
</code></pre></div>
<h5 dir="auto">Environment:</h5>
<p dir="auto">N/A but running on Mac OS X</p>
<h5 dir="auto">Summary:</h5>
<p dir="auto">I get <code class="notranslate">ERROR! template error while templating string: unexpected '|'</code> when trying to use a jinja2 filter.</p>
<h5 dir="auto">Steps To Reproduce:</h5>
<p dir="auto"><code class="notranslate">roles/test/tasks/main.yml</code>:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="
---

- debug: msg='{{ foo | default(&quot;baz&quot;) }}'"><pre class="notranslate"><code class="notranslate">
---

- debug: msg='{{ foo | default("baz") }}'
</code></pre></div>
<h5 dir="auto">Expected Results:</h5>
<p dir="auto">Successful playbook execution, in this case just printing "baz"</p>
<h5 dir="auto">Actual Results:</h5>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="ansible-playbook --vault-password-file=~/.ansible_vault_password \
        playbook-test.yml --limit=localhost -vvvv
No config file found; using defaults
1 plays in playbook-test.yml
Loaded callback default of type stdout, v2.0

PLAY ***************************************************************************

TASK [setup] *******************************************************************
Module: setup, args: {}
ESTABLISH LOCAL CONNECTION FOR USER: bam
localhost EXEC (umask 22 &amp;&amp; mkdir -p &quot;$HOME/.ansible/tmp/ansible-tmp-1441134514.32-237346662021616&quot; &amp;&amp; echo &quot;$HOME/.ansible/tmp/ansible-tmp-1441134514.32-237346662021616&quot;)
localhost PUT /var/folders/n7/wrg1c7615892m2qgyv8r_yg00000gn/T/tmpYZmtsC TO /Users/bam/.ansible/tmp/ansible-tmp-1441134514.32-237346662021616/setup
localhost EXEC LANG=en_US.UTF-8 LC_MESSAGES=en_US.UTF-8 LC_CTYPE=en_US.UTF-8 /usr/bin/python /Users/bam/.ansible/tmp/ansible-tmp-1441134514.32-237346662021616/setup; rm -rf &quot;/Users/bam/.ansible/tmp/ansible-tmp-1441134514.32-237346662021616/&quot; &gt; /dev/null 2&gt;&amp;1
ok: [localhost]
ERROR! template error while templating string: unexpected '|'
make: *** [test] Error 1"><pre class="notranslate"><code class="notranslate">ansible-playbook --vault-password-file=~/.ansible_vault_password \
        playbook-test.yml --limit=localhost -vvvv
No config file found; using defaults
1 plays in playbook-test.yml
Loaded callback default of type stdout, v2.0

PLAY ***************************************************************************

TASK [setup] *******************************************************************
Module: setup, args: {}
ESTABLISH LOCAL CONNECTION FOR USER: bam
localhost EXEC (umask 22 &amp;&amp; mkdir -p "$HOME/.ansible/tmp/ansible-tmp-1441134514.32-237346662021616" &amp;&amp; echo "$HOME/.ansible/tmp/ansible-tmp-1441134514.32-237346662021616")
localhost PUT /var/folders/n7/wrg1c7615892m2qgyv8r_yg00000gn/T/tmpYZmtsC TO /Users/bam/.ansible/tmp/ansible-tmp-1441134514.32-237346662021616/setup
localhost EXEC LANG=en_US.UTF-8 LC_MESSAGES=en_US.UTF-8 LC_CTYPE=en_US.UTF-8 /usr/bin/python /Users/bam/.ansible/tmp/ansible-tmp-1441134514.32-237346662021616/setup; rm -rf "/Users/bam/.ansible/tmp/ansible-tmp-1441134514.32-237346662021616/" &gt; /dev/null 2&gt;&amp;1
ok: [localhost]
ERROR! template error while templating string: unexpected '|'
make: *** [test] Error 1
</code></pre></div>
<p dir="auto">(Feature Idea)</p>
<p dir="auto">The natural way to handle configuration or other updates that require a rolling restart would be to perform updates in parallel, then notify a handler, which performs a restart with <code class="notranslate">serial</code>. But this is not possible, requiring either manual rolling restart or ugly hacks. See <a href="https://groups.google.com/forum/#!topic/ansible-project/rBcWzXjt-Xc" rel="nofollow">https://groups.google.com/forum/#!topic/ansible-project/rBcWzXjt-Xc</a></p>