<h5 dir="auto">ISSUE TYPE</h5>
<ul dir="auto">
<li>Bug Report</li>
</ul>
<h5 dir="auto">COMPONENT NAME</h5>
<ul dir="auto">
<li>vars</li>
<li>jinj2 templates</li>
</ul>
<h5 dir="auto">ANSIBLE VERSION</h5>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="# ansible --version
ansible 1.9.6
  configured module search path = ./library:$ANSIBLE_HOME/library"><pre class="notranslate"><code class="notranslate"># ansible --version
ansible 1.9.6
  configured module search path = ./library:$ANSIBLE_HOME/library
</code></pre></div>
<h5 dir="auto">CONFIGURATION</h5>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="# env | grep ANSIBLE_
ANSIBLE_INSTRUMENT_MODULES=true
ANSIBLE_HOST_KEY_CHECKING=false
ANSIBLE_SSH_ARGS=-F /root/.axion/ssh_config
ANSIBLE_INVENTORY=/root/vFusion/ansible-systems/inventory/fusion/metapod/proxmox/
ANSIBLE_VAULT_PASSWORD_FILE=/root/.config/ansible-systems/vault-proxmox.pass
ANSIBLE_VAR_DEFAULTS_GLOB=/root/vFusion/ansible-systems/inventory/fusion/metapod/defaults/*.yml
ANSIBLE_VARS_PLUGINS=/root/vFusion/ansible-systems/plugins/vars"><pre class="notranslate"><code class="notranslate"># env | grep ANSIBLE_
ANSIBLE_INSTRUMENT_MODULES=true
ANSIBLE_HOST_KEY_CHECKING=false
ANSIBLE_SSH_ARGS=-F /root/.axion/ssh_config
ANSIBLE_INVENTORY=/root/vFusion/ansible-systems/inventory/fusion/metapod/proxmox/
ANSIBLE_VAULT_PASSWORD_FILE=/root/.config/ansible-systems/vault-proxmox.pass
ANSIBLE_VAR_DEFAULTS_GLOB=/root/vFusion/ansible-systems/inventory/fusion/metapod/defaults/*.yml
ANSIBLE_VARS_PLUGINS=/root/vFusion/ansible-systems/plugins/vars
</code></pre></div>
<h5 dir="auto">OS / ENVIRONMENT</h5>
<p dir="auto">Red Hat Enterprise Linux Server release 7.3 (Maipo)</p>
<h5 dir="auto">SUMMARY</h5>
<p dir="auto">Duplicate variable names causes recursive loop in template string</p>
<h5 dir="auto">STEPS TO REPRODUCE</h5>
<p dir="auto">Below is bug.yml:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="- name: Task that causes recursive loop :)
  hosts: all
  vars:
     hello: &quot;{{ hello }}&quot;"><pre class="notranslate"><code class="notranslate">- name: Task that causes recursive loop :)
  hosts: all
  vars:
     hello: "{{ hello }}"
</code></pre></div>
<p dir="auto">Below is the bug 😄.</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="# ansible-playbook -i my_inventory bug.yml
 [WARNING]: non fatal error while trying to template play variables: Failed to
template {{ hello }}: Failed to template {{ hello }}: Failed to template {{
hello }}: Failed to template {{ hello }}: Failed to template {{ hello }}:
Failed to template {{ hello }}: Failed to template {{ hello }}: Failed to
template {{ hello }}: Failed to template {{ hello }}: Failed to template {{
hello }}: Failed to template {{ hello }}: Failed to template {{ hello }}:
Failed to template {{ hello }}: Failed to template {{ hello }}: Failed to
template {{ hello }}: Failed to template {{ hello }}: Failed to template {{
hello }}: Failed to template {{ hello }}: Failed to template {{ hello }}:
Failed to template {{ hello }}: Failed to template {{ hello }}: Failed to
template {{ hello }}: Failed to template {{ hello }}: Failed to template {{
hello }}: Failed to template {{ hello }}: Failed to template {{ hello }}:
Failed to template {{ hello }}: Failed to template {{ hello }}: Failed to
template {{ hello }}: Failed to template {{ hello }}: Failed to template {{
hello }}: Failed to template {{ hello }}: Failed to template {{ hello }}:
Failed to template {{ hello }}: Failed to template {{ hello }}: Failed to
template {{ hello }}: Failed to template {{ hello }}: Failed to template {{
hello }}: Failed to template {{ hello }}: Failed to template {{ hello }}:
Failed to template {{ hello }}: Failed to template {{ hello }}: Failed to
template {{ hello }}: Failed to template {{ hello }}: Failed to template {{
hello }}: Failed to template {{ hello }}: Failed to template {{ hello }}:
Failed to template {{ hello }}: Failed to template {{ hello }}: Failed to
template {{ hello }}: Failed to template {{ hello }}: Failed to template {{
hello }}: Failed to template {{ hello }}: Failed to template {{ hello }}:
Failed to template {{ hello }}: Failed to template {{ hello }}: Failed to
template {{ hello }}: Failed to template {{ hello }}: Failed to template {{
hello }}: Failed to template {{ hello }}: Failed to template {{ hello }}:
Failed to template {{ hello }}: Failed to template {{ hello }}: Failed to
template {{ hello }}: Failed to template {{ hello }}: Failed to template {{
hello }}: Failed to template {{ hello }}: Failed to template {{ hello }}:
Failed to template {{ hello }}: Failed to template {{ hello }}: Failed to
template {{ hello }}: Failed to template {{ hello }}: Failed to template {{
hello }}: Failed to template {{ hello }}: Failed to template {{ hello }}:
Failed to template {{ hello }}: Failed to template {{ hello }}: Failed to
template {{ hello }}: Failed to template {{ hello }}: Failed to template {{
hello }}: Failed to template {{ hello }}: Failed to template {{ hello }}:
Failed to template {{ hello }}: Failed to template {{ hello }}: Failed to
template {{ hello }}: Failed to template {{ hello }}: Failed to template {{
hello }}: Failed to template {{ hello }}: Failed to template {{ hello }}:
Failed to template {{ hello }}: Failed to template {{ hello }}: Failed to
template {{ hello }}: Failed to template {{ hello }}: Failed to template {{
hello }}: Failed to template {{ hello }}: Failed to template {{ hello }}:
Failed to template {{ hello }}: Failed to template {{ hello }}: Failed to
template {{ hello }}: Failed to template {{ hello }}: Failed to template {{
hello }}: Failed to template {{ hello }}: Failed to template {{ hello }}:
Failed to template {{ hello }}: Failed to template {{ hello }}: Failed to
template {{ hello }}: Failed to template {{ hello }}: Failed to template {{
hello }}: Failed to template {{ hello }}: Failed to template {{ hello }}:
Failed to template {{ hello }}: Failed to template {{ hello }}: Failed to
template {{ hello }}: Failed to template {{ hello }}: Failed to template {{
hello }}: Failed to template {{ hello }}: Failed to template {{ hello }}:
Failed to template {{ hello }}: Failed to template {{ hello }}: Failed to
template {{ hello }}: Failed to template {{ hello }}: Failed to template {{
hello }}: Failed to template {{ hello }}: Failed to template {{ hello }}:
Failed to template {{ hello }}: Failed to template {{ hello }}: Failed to
template {{ hello }}: Failed to template {{ hello }}: Failed to template {{
hello }}: Failed to template {{ hello }}: Failed to template {{ hello }}:
Failed to template {{ hello }}: Failed to template {{ hello }}: Failed to
template {{ hello }}: Failed to template {{ hello }}: Failed to template {{
hello }}: Failed to template {{ hello }}: Failed to template {{ hello }}:
Failed to template {{ hello }}: recursive loop detected in template string: {{
hello }}

Fri 27 Jan 14:58:52.707379: 
PLAY [Template string that causes recursive loop :)] ************************** 

PLAY RECAP ******************************************************************** 

Total elapsed wallclock time: 0.110759019852"><pre class="notranslate"><code class="notranslate"># ansible-playbook -i my_inventory bug.yml
 [WARNING]: non fatal error while trying to template play variables: Failed to
template {{ hello }}: Failed to template {{ hello }}: Failed to template {{
hello }}: Failed to template {{ hello }}: Failed to template {{ hello }}:
Failed to template {{ hello }}: Failed to template {{ hello }}: Failed to
template {{ hello }}: Failed to template {{ hello }}: Failed to template {{
hello }}: Failed to template {{ hello }}: Failed to template {{ hello }}:
Failed to template {{ hello }}: Failed to template {{ hello }}: Failed to
template {{ hello }}: Failed to template {{ hello }}: Failed to template {{
hello }}: Failed to template {{ hello }}: Failed to template {{ hello }}:
Failed to template {{ hello }}: Failed to template {{ hello }}: Failed to
template {{ hello }}: Failed to template {{ hello }}: Failed to template {{
hello }}: Failed to template {{ hello }}: Failed to template {{ hello }}:
Failed to template {{ hello }}: Failed to template {{ hello }}: Failed to
template {{ hello }}: Failed to template {{ hello }}: Failed to template {{
hello }}: Failed to template {{ hello }}: Failed to template {{ hello }}:
Failed to template {{ hello }}: Failed to template {{ hello }}: Failed to
template {{ hello }}: Failed to template {{ hello }}: Failed to template {{
hello }}: Failed to template {{ hello }}: Failed to template {{ hello }}:
Failed to template {{ hello }}: Failed to template {{ hello }}: Failed to
template {{ hello }}: Failed to template {{ hello }}: Failed to template {{
hello }}: Failed to template {{ hello }}: Failed to template {{ hello }}:
Failed to template {{ hello }}: Failed to template {{ hello }}: Failed to
template {{ hello }}: Failed to template {{ hello }}: Failed to template {{
hello }}: Failed to template {{ hello }}: Failed to template {{ hello }}:
Failed to template {{ hello }}: Failed to template {{ hello }}: Failed to
template {{ hello }}: Failed to template {{ hello }}: Failed to template {{
hello }}: Failed to template {{ hello }}: Failed to template {{ hello }}:
Failed to template {{ hello }}: Failed to template {{ hello }}: Failed to
template {{ hello }}: Failed to template {{ hello }}: Failed to template {{
hello }}: Failed to template {{ hello }}: Failed to template {{ hello }}:
Failed to template {{ hello }}: Failed to template {{ hello }}: Failed to
template {{ hello }}: Failed to template {{ hello }}: Failed to template {{
hello }}: Failed to template {{ hello }}: Failed to template {{ hello }}:
Failed to template {{ hello }}: Failed to template {{ hello }}: Failed to
template {{ hello }}: Failed to template {{ hello }}: Failed to template {{
hello }}: Failed to template {{ hello }}: Failed to template {{ hello }}:
Failed to template {{ hello }}: Failed to template {{ hello }}: Failed to
template {{ hello }}: Failed to template {{ hello }}: Failed to template {{
hello }}: Failed to template {{ hello }}: Failed to template {{ hello }}:
Failed to template {{ hello }}: Failed to template {{ hello }}: Failed to
template {{ hello }}: Failed to template {{ hello }}: Failed to template {{
hello }}: Failed to template {{ hello }}: Failed to template {{ hello }}:
Failed to template {{ hello }}: Failed to template {{ hello }}: Failed to
template {{ hello }}: Failed to template {{ hello }}: Failed to template {{
hello }}: Failed to template {{ hello }}: Failed to template {{ hello }}:
Failed to template {{ hello }}: Failed to template {{ hello }}: Failed to
template {{ hello }}: Failed to template {{ hello }}: Failed to template {{
hello }}: Failed to template {{ hello }}: Failed to template {{ hello }}:
Failed to template {{ hello }}: Failed to template {{ hello }}: Failed to
template {{ hello }}: Failed to template {{ hello }}: Failed to template {{
hello }}: Failed to template {{ hello }}: Failed to template {{ hello }}:
Failed to template {{ hello }}: Failed to template {{ hello }}: Failed to
template {{ hello }}: Failed to template {{ hello }}: Failed to template {{
hello }}: Failed to template {{ hello }}: Failed to template {{ hello }}:
Failed to template {{ hello }}: Failed to template {{ hello }}: Failed to
template {{ hello }}: Failed to template {{ hello }}: Failed to template {{
hello }}: Failed to template {{ hello }}: Failed to template {{ hello }}:
Failed to template {{ hello }}: Failed to template {{ hello }}: Failed to
template {{ hello }}: Failed to template {{ hello }}: Failed to template {{
hello }}: Failed to template {{ hello }}: Failed to template {{ hello }}:
Failed to template {{ hello }}: recursive loop detected in template string: {{
hello }}

Fri 27 Jan 14:58:52.707379: 
PLAY [Template string that causes recursive loop :)] ************************** 

PLAY RECAP ******************************************************************** 

Total elapsed wallclock time: 0.110759019852
</code></pre></div>
<h5 dir="auto">EXPECTED RESULTS</h5>
<p dir="auto">No recursive loop in output:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="# ansible-playbook -i my_inventory bug.yml

Fri 27 Jan 14:58:52.707379: 
PLAY [Template string that causes recursive loop :)] ************************** 

PLAY RECAP ******************************************************************** 

Total elapsed wallclock time: 0.110759019852"><pre class="notranslate"><code class="notranslate"># ansible-playbook -i my_inventory bug.yml

Fri 27 Jan 14:58:52.707379: 
PLAY [Template string that causes recursive loop :)] ************************** 

PLAY RECAP ******************************************************************** 

Total elapsed wallclock time: 0.110759019852
</code></pre></div>
<h5 dir="auto">ACTUAL RESULTS</h5>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="# ansible-playbook -i my_inventory bug.yml
 [WARNING]: non fatal error while trying to template play variables: Failed to
template {{ hello }}: Failed to template {{ hello }}: Failed to template {{
hello }}: Failed to template {{ hello }}: Failed to template {{ hello }}:
Failed to template {{ hello }}: Failed to template {{ hello }}: Failed to
template {{ hello }}: Failed to template {{ hello }}: Failed to template {{
hello }}: Failed to template {{ hello }}: Failed to template {{ hello }}:
Failed to template {{ hello }}: Failed to template {{ hello }}: Failed to
template {{ hello }}: Failed to template {{ hello }}: Failed to template {{
hello }}: Failed to template {{ hello }}: Failed to template {{ hello }}:
Failed to template {{ hello }}: Failed to template {{ hello }}: Failed to
template {{ hello }}: Failed to template {{ hello }}: Failed to template {{
hello }}: Failed to template {{ hello }}: Failed to template {{ hello }}:
Failed to template {{ hello }}: Failed to template {{ hello }}: Failed to
template {{ hello }}: Failed to template {{ hello }}: Failed to template {{
hello }}: Failed to template {{ hello }}: Failed to template {{ hello }}:
Failed to template {{ hello }}: Failed to template {{ hello }}: Failed to
template {{ hello }}: Failed to template {{ hello }}: Failed to template {{
hello }}: Failed to template {{ hello }}: Failed to template {{ hello }}:
Failed to template {{ hello }}: Failed to template {{ hello }}: Failed to
template {{ hello }}: Failed to template {{ hello }}: Failed to template {{
hello }}: Failed to template {{ hello }}: Failed to template {{ hello }}:
Failed to template {{ hello }}: Failed to template {{ hello }}: Failed to
template {{ hello }}: Failed to template {{ hello }}: Failed to template {{
hello }}: Failed to template {{ hello }}: Failed to template {{ hello }}:
Failed to template {{ hello }}: Failed to template {{ hello }}: Failed to
template {{ hello }}: Failed to template {{ hello }}: Failed to template {{
hello }}: Failed to template {{ hello }}: Failed to template {{ hello }}:
Failed to template {{ hello }}: Failed to template {{ hello }}: Failed to
template {{ hello }}: Failed to template {{ hello }}: Failed to template {{
hello }}: Failed to template {{ hello }}: Failed to template {{ hello }}:
Failed to template {{ hello }}: Failed to template {{ hello }}: Failed to
template {{ hello }}: Failed to template {{ hello }}: Failed to template {{
hello }}: Failed to template {{ hello }}: Failed to template {{ hello }}:
Failed to template {{ hello }}: Failed to template {{ hello }}: Failed to
template {{ hello }}: Failed to template {{ hello }}: Failed to template {{
hello }}: Failed to template {{ hello }}: Failed to template {{ hello }}:
Failed to template {{ hello }}: Failed to template {{ hello }}: Failed to
template {{ hello }}: Failed to template {{ hello }}: Failed to template {{
hello }}: Failed to template {{ hello }}: Failed to template {{ hello }}:
Failed to template {{ hello }}: Failed to template {{ hello }}: Failed to
template {{ hello }}: Failed to template {{ hello }}: Failed to template {{
hello }}: Failed to template {{ hello }}: Failed to template {{ hello }}:
Failed to template {{ hello }}: Failed to template {{ hello }}: Failed to
template {{ hello }}: Failed to template {{ hello }}: Failed to template {{
hello }}: Failed to template {{ hello }}: Failed to template {{ hello }}:
Failed to template {{ hello }}: Failed to template {{ hello }}: Failed to
template {{ hello }}: Failed to template {{ hello }}: Failed to template {{
hello }}: Failed to template {{ hello }}: Failed to template {{ hello }}:
Failed to template {{ hello }}: Failed to template {{ hello }}: Failed to
template {{ hello }}: Failed to template {{ hello }}: Failed to template {{
hello }}: Failed to template {{ hello }}: Failed to template {{ hello }}:
Failed to template {{ hello }}: Failed to template {{ hello }}: Failed to
template {{ hello }}: Failed to template {{ hello }}: Failed to template {{
hello }}: Failed to template {{ hello }}: Failed to template {{ hello }}:
Failed to template {{ hello }}: Failed to template {{ hello }}: Failed to
template {{ hello }}: Failed to template {{ hello }}: Failed to template {{
hello }}: Failed to template {{ hello }}: Failed to template {{ hello }}:
Failed to template {{ hello }}: Failed to template {{ hello }}: Failed to
template {{ hello }}: Failed to template {{ hello }}: Failed to template {{
hello }}: Failed to template {{ hello }}: Failed to template {{ hello }}:
Failed to template {{ hello }}: recursive loop detected in template string: {{
hello }}

Fri 27 Jan 14:58:52.707379: 
PLAY [Template string that causes recursive loop :)] ************************** 

PLAY RECAP ******************************************************************** 

Total elapsed wallclock time: 0.110759019852"><pre class="notranslate"><code class="notranslate"># ansible-playbook -i my_inventory bug.yml
 [WARNING]: non fatal error while trying to template play variables: Failed to
template {{ hello }}: Failed to template {{ hello }}: Failed to template {{
hello }}: Failed to template {{ hello }}: Failed to template {{ hello }}:
Failed to template {{ hello }}: Failed to template {{ hello }}: Failed to
template {{ hello }}: Failed to template {{ hello }}: Failed to template {{
hello }}: Failed to template {{ hello }}: Failed to template {{ hello }}:
Failed to template {{ hello }}: Failed to template {{ hello }}: Failed to
template {{ hello }}: Failed to template {{ hello }}: Failed to template {{
hello }}: Failed to template {{ hello }}: Failed to template {{ hello }}:
Failed to template {{ hello }}: Failed to template {{ hello }}: Failed to
template {{ hello }}: Failed to template {{ hello }}: Failed to template {{
hello }}: Failed to template {{ hello }}: Failed to template {{ hello }}:
Failed to template {{ hello }}: Failed to template {{ hello }}: Failed to
template {{ hello }}: Failed to template {{ hello }}: Failed to template {{
hello }}: Failed to template {{ hello }}: Failed to template {{ hello }}:
Failed to template {{ hello }}: Failed to template {{ hello }}: Failed to
template {{ hello }}: Failed to template {{ hello }}: Failed to template {{
hello }}: Failed to template {{ hello }}: Failed to template {{ hello }}:
Failed to template {{ hello }}: Failed to template {{ hello }}: Failed to
template {{ hello }}: Failed to template {{ hello }}: Failed to template {{
hello }}: Failed to template {{ hello }}: Failed to template {{ hello }}:
Failed to template {{ hello }}: Failed to template {{ hello }}: Failed to
template {{ hello }}: Failed to template {{ hello }}: Failed to template {{
hello }}: Failed to template {{ hello }}: Failed to template {{ hello }}:
Failed to template {{ hello }}: Failed to template {{ hello }}: Failed to
template {{ hello }}: Failed to template {{ hello }}: Failed to template {{
hello }}: Failed to template {{ hello }}: Failed to template {{ hello }}:
Failed to template {{ hello }}: Failed to template {{ hello }}: Failed to
template {{ hello }}: Failed to template {{ hello }}: Failed to template {{
hello }}: Failed to template {{ hello }}: Failed to template {{ hello }}:
Failed to template {{ hello }}: Failed to template {{ hello }}: Failed to
template {{ hello }}: Failed to template {{ hello }}: Failed to template {{
hello }}: Failed to template {{ hello }}: Failed to template {{ hello }}:
Failed to template {{ hello }}: Failed to template {{ hello }}: Failed to
template {{ hello }}: Failed to template {{ hello }}: Failed to template {{
hello }}: Failed to template {{ hello }}: Failed to template {{ hello }}:
Failed to template {{ hello }}: Failed to template {{ hello }}: Failed to
template {{ hello }}: Failed to template {{ hello }}: Failed to template {{
hello }}: Failed to template {{ hello }}: Failed to template {{ hello }}:
Failed to template {{ hello }}: Failed to template {{ hello }}: Failed to
template {{ hello }}: Failed to template {{ hello }}: Failed to template {{
hello }}: Failed to template {{ hello }}: Failed to template {{ hello }}:
Failed to template {{ hello }}: Failed to template {{ hello }}: Failed to
template {{ hello }}: Failed to template {{ hello }}: Failed to template {{
hello }}: Failed to template {{ hello }}: Failed to template {{ hello }}:
Failed to template {{ hello }}: Failed to template {{ hello }}: Failed to
template {{ hello }}: Failed to template {{ hello }}: Failed to template {{
hello }}: Failed to template {{ hello }}: Failed to template {{ hello }}:
Failed to template {{ hello }}: Failed to template {{ hello }}: Failed to
template {{ hello }}: Failed to template {{ hello }}: Failed to template {{
hello }}: Failed to template {{ hello }}: Failed to template {{ hello }}:
Failed to template {{ hello }}: Failed to template {{ hello }}: Failed to
template {{ hello }}: Failed to template {{ hello }}: Failed to template {{
hello }}: Failed to template {{ hello }}: Failed to template {{ hello }}:
Failed to template {{ hello }}: Failed to template {{ hello }}: Failed to
template {{ hello }}: Failed to template {{ hello }}: Failed to template {{
hello }}: Failed to template {{ hello }}: Failed to template {{ hello }}:
Failed to template {{ hello }}: Failed to template {{ hello }}: Failed to
template {{ hello }}: Failed to template {{ hello }}: Failed to template {{
hello }}: Failed to template {{ hello }}: Failed to template {{ hello }}:
Failed to template {{ hello }}: recursive loop detected in template string: {{
hello }}

Fri 27 Jan 14:58:52.707379: 
PLAY [Template string that causes recursive loop :)] ************************** 

PLAY RECAP ******************************************************************** 

Total elapsed wallclock time: 0.110759019852
</code></pre></div>
<h5 dir="auto">ISSUE TYPE</h5>
<ul dir="auto">
<li>Bug Report</li>
</ul>
<h5 dir="auto">COMPONENT NAME</h5>
<p dir="auto">script</p>
<h5 dir="auto">ANSIBLE VERSION</h5>
<p dir="auto">Latest unstable version:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="ansible 2.5.0 (devel 1068aa3ce7) last updated 2017/11/01 11:34:22 (GMT +200)
  config file = /etc/ansible/ansible.cfg
  configured module search path = [u'/home/actionmystique/Ansible/git-yang-networkop/ansible-101/library']
  ansible python module location = /home/actionmystique/src/Ansible/git-ansible/lib/ansible
  executable location = /home/actionmystique/src/Ansible/git-ansible/bin/ansible
  python version = 2.7.13 (default, Jan 19 2017, 14:48:08) [GCC 6.3.0 20170118]"><pre class="notranslate"><code class="notranslate">ansible 2.5.0 (devel 1068aa3ce7) last updated 2017/11/01 11:34:22 (GMT +200)
  config file = /etc/ansible/ansible.cfg
  configured module search path = [u'/home/actionmystique/Ansible/git-yang-networkop/ansible-101/library']
  ansible python module location = /home/actionmystique/src/Ansible/git-ansible/lib/ansible
  executable location = /home/actionmystique/src/Ansible/git-ansible/bin/ansible
  python version = 2.7.13 (default, Jan 19 2017, 14:48:08) [GCC 6.3.0 20170118]
</code></pre></div>
<h5 dir="auto">CONFIGURATION</h5>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="inventory   = ./hosts
library        = /home/actionmystique/Ansible/git-yang-networkop/ansible-101/library
forks = 1000
gathering = explicit
gather_timeout = 30
roles_path = /home/actionmystique/Ansible/Roles/roles
private_role_vars = yes
hash_behaviour = merge
log_path = /var/log/ansible.log
retry_files_enabled = False
show_custom_stats = True
timeout = 120
pipelining = True
connect_timeout = 240
connect_retry_timeout = 180"><pre class="notranslate"><code class="notranslate">inventory   = ./hosts
library        = /home/actionmystique/Ansible/git-yang-networkop/ansible-101/library
forks = 1000
gathering = explicit
gather_timeout = 30
roles_path = /home/actionmystique/Ansible/Roles/roles
private_role_vars = yes
hash_behaviour = merge
log_path = /var/log/ansible.log
retry_files_enabled = False
show_custom_stats = True
timeout = 120
pipelining = True
connect_timeout = 240
connect_retry_timeout = 180
</code></pre></div>
<h5 dir="auto">OS / ENVIRONMENT</h5>
<ul dir="auto">
<li>host: Ubuntu 17.04 4.10</li>
<li>targets:
<ul dir="auto">
<li>NX-OSv 9k 7.0(3)I6(1)</li>
</ul>
</li>
<li>paramiko: 2.0.6</li>
</ul>
<h5 dir="auto">SUMMARY</h5>
<p dir="auto">When the <strong>script</strong> module is run <strong>locally</strong> (no ssh) and returns an error, stderr is present but not stderr_lines.</p>
<h5 dir="auto">STEPS TO REPRODUCE</h5>
<p dir="auto"><strong>Role</strong>:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="- name: Checking for duplicate keys in json answer
  local_action: script /home/actionmystique/Bash/Scripts/json-check-duplicate-keys.sh '&quot;{{ uri_return.content }}&quot;' 'false'
  register: json_check_duplicate_keys
  failed_when: json_check_duplicate_keys.stderr "><pre class="notranslate"><code class="notranslate">- name: Checking for duplicate keys in json answer
  local_action: script /home/actionmystique/Bash/Scripts/json-check-duplicate-keys.sh '"{{ uri_return.content }}"' 'false'
  register: json_check_duplicate_keys
  failed_when: json_check_duplicate_keys.stderr 
</code></pre></div>
<h5 dir="auto">EXPECTED RESULTS</h5>
<p dir="auto">stderr_lines</p>
<h5 dir="auto">ACTUAL RESULTS:</h5>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="fatal: [NX_OSv_9k_Spine_31 -&gt; localhost]: FAILED! =&gt; {
    &quot;changed&quot;: true, 
    &quot;failed_when_result&quot;: true, 
    &quot;msg&quot;: &quot;non-zero return code&quot;, 
    &quot;rc&quot;: 2, 
    &quot;stderr&quot;: &quot;Checking /tmp/data.json...\n----\nDuplicate keys found in /tmp/data.json:\n* subinterface\n* subinterface\n* subinterface\n* subinterface\n* subinterface\n* subinterface\n* subinterface\n* subinterface\n* interface\n* interface\n* interface\n* interface\n* interface\n* interface\n* interface\n* interface\n* interface\n* interface\n* interface\n* interface\n* interface\n* interface\n* interface\n* interface\n* interface\n* interface\n* interface\n* interface\n* interface\n* interface\n* interface\n* interface\n* interface\n* interface\n* interface\n* interface\n* interface\n* interface\n* interface\n* interface\n* interface\n* interface\n* interface\n* interface\n* interface\n* interface\n* interface\n* interface\n* interface\n* interface\n* interface\n* interface\n* interface\n* interface\n* interface\n* interface\n* interface\n* interface\n* interface\n* interface\n* interface\n* interface\n* interface\n* interface\n* interface\n* interface\n* interface\n* interface\n* interface\n* interface\n* interface\n* interface\n/root/.ansible/tmp/ansible-tmp-1509543791.83-202226908799664/json-check-duplicate-keys.sh: line 99: exit: return_code: numeric argument required\n&quot;, 
    &quot;stdout&quot;: &quot;-------------------------------------------------------------------\nChecking for duplicate keys in json file /tmp/fixed_json_data.json\n-------------------------------------------------------------------\n&quot;, 
    &quot;stdout_lines&quot;: [
        &quot;-------------------------------------------------------------------&quot;, 
        &quot;Checking for duplicate keys in json file /tmp/fixed_json_data.json&quot;, 
        &quot;-------------------------------------------------------------------&quot;
    ]
}"><pre class="notranslate"><code class="notranslate">fatal: [NX_OSv_9k_Spine_31 -&gt; localhost]: FAILED! =&gt; {
    "changed": true, 
    "failed_when_result": true, 
    "msg": "non-zero return code", 
    "rc": 2, 
    "stderr": "Checking /tmp/data.json...\n----\nDuplicate keys found in /tmp/data.json:\n* subinterface\n* subinterface\n* subinterface\n* subinterface\n* subinterface\n* subinterface\n* subinterface\n* subinterface\n* interface\n* interface\n* interface\n* interface\n* interface\n* interface\n* interface\n* interface\n* interface\n* interface\n* interface\n* interface\n* interface\n* interface\n* interface\n* interface\n* interface\n* interface\n* interface\n* interface\n* interface\n* interface\n* interface\n* interface\n* interface\n* interface\n* interface\n* interface\n* interface\n* interface\n* interface\n* interface\n* interface\n* interface\n* interface\n* interface\n* interface\n* interface\n* interface\n* interface\n* interface\n* interface\n* interface\n* interface\n* interface\n* interface\n* interface\n* interface\n* interface\n* interface\n* interface\n* interface\n* interface\n* interface\n* interface\n* interface\n* interface\n* interface\n* interface\n* interface\n* interface\n* interface\n* interface\n* interface\n/root/.ansible/tmp/ansible-tmp-1509543791.83-202226908799664/json-check-duplicate-keys.sh: line 99: exit: return_code: numeric argument required\n", 
    "stdout": "-------------------------------------------------------------------\nChecking for duplicate keys in json file /tmp/fixed_json_data.json\n-------------------------------------------------------------------\n", 
    "stdout_lines": [
        "-------------------------------------------------------------------", 
        "Checking for duplicate keys in json file /tmp/fixed_json_data.json", 
        "-------------------------------------------------------------------"
    ]
}
</code></pre></div>