<h5 dir="auto">ISSUE TYPE</h5>

<ul dir="auto">
<li>Bug Report</li>
</ul>
<h5 dir="auto">COMPONENT NAME</h5>

<p dir="auto">template and potentially more</p>
<h5 dir="auto">ANSIBLE VERSION</h5>

<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="$ ansible --version
ansible 2.2.1.0
  config file = /opt/****/ansible.cfg
  configured module search path = [ '/home/****/ansible']"><pre class="notranslate"><code class="notranslate">$ ansible --version
ansible 2.2.1.0
  config file = /opt/****/ansible.cfg
  configured module search path = [ '/home/****/ansible']
</code></pre></div>
<h5 dir="auto">CONFIGURATION</h5>

<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="$ cat ansible.cfg | grep tmp
local_tmp = /opt/***/.ansible/tmp
remote_tmp = /opt/***/.ansible/tmp
$
"><pre class="notranslate"><code class="notranslate">$ cat ansible.cfg | grep tmp
local_tmp = /opt/***/.ansible/tmp
remote_tmp = /opt/***/.ansible/tmp
$

</code></pre></div>
<h5 dir="auto">OS / ENVIRONMENT</h5>

<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="$ cat /etc/os-release
NAME=&quot;Red Hat Enterprise Linux Server&quot;
VERSION=&quot;7.3 (Maipo)&quot;
ID=&quot;rhel&quot;
ID_LIKE=&quot;fedora&quot;
VERSION_ID=&quot;7.3&quot;
PRETTY_NAME=&quot;Red Hat Enterprise Linux&quot;
ANSI_COLOR=&quot;0;31&quot;
CPE_NAME=&quot;cpe:/o:redhat:enterprise_linux:7.3:GA:server&quot;
HOME_URL=&quot;https://www.redhat.com/&quot;
BUG_REPORT_URL=&quot;https://bugzilla.redhat.com/&quot;

REDHAT_BUGZILLA_PRODUCT=&quot;Red Hat Enterprise Linux 7&quot;
REDHAT_BUGZILLA_PRODUCT_VERSION=7.3
REDHAT_SUPPORT_PRODUCT=&quot;Red Hat Enterprise Linux&quot;
REDHAT_SUPPORT_PRODUCT_VERSION=&quot;7.3&quot;
"><pre class="notranslate"><code class="notranslate">$ cat /etc/os-release
NAME="Red Hat Enterprise Linux Server"
VERSION="7.3 (Maipo)"
ID="rhel"
ID_LIKE="fedora"
VERSION_ID="7.3"
PRETTY_NAME="Red Hat Enterprise Linux"
ANSI_COLOR="0;31"
CPE_NAME="cpe:/o:redhat:enterprise_linux:7.3:GA:server"
HOME_URL="https://www.redhat.com/"
BUG_REPORT_URL="https://bugzilla.redhat.com/"

REDHAT_BUGZILLA_PRODUCT="Red Hat Enterprise Linux 7"
REDHAT_BUGZILLA_PRODUCT_VERSION=7.3
REDHAT_SUPPORT_PRODUCT="Red Hat Enterprise Linux"
REDHAT_SUPPORT_PRODUCT_VERSION="7.3"

</code></pre></div>
<h5 dir="auto">SUMMARY</h5>

<p dir="auto">Files are writing to /tmp when remote_tmp and local_tmp is defined</p>
<h5 dir="auto">STEPS TO REPRODUCE</h5>


<div class="highlight highlight-source-yaml notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="
    - name: &quot;{{ site }} - GENERATE JSON REPORT PER SITE STATS ONLY&quot;
      template:
        src: &quot;{{ role_path }}/templates/reports/sites/partial_table.j2&quot;
        dest: '{{ output_dir }}/reports/html/partial/{{ site }}.partial'"><pre class="notranslate">    - <span class="pl-ent">name</span>: <span class="pl-s"><span class="pl-pds">"</span>{{ site }} - GENERATE JSON REPORT PER SITE STATS ONLY<span class="pl-pds">"</span></span>
      <span class="pl-ent">template</span>:
        <span class="pl-ent">src</span>: <span class="pl-s"><span class="pl-pds">"</span>{{ role_path }}/templates/reports/sites/partial_table.j2<span class="pl-pds">"</span></span>
        <span class="pl-ent">dest</span>: <span class="pl-s"><span class="pl-pds">'</span>{{ output_dir }}/reports/html/partial/{{ site }}.partial<span class="pl-pds">'</span></span></pre></div>

<h5 dir="auto">EXPECTED RESULTS</h5>

<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="localhost                  : ok=360  changed=29   unreachable=0    failed=0"><pre class="notranslate"><code class="notranslate">localhost                  : ok=360  changed=29   unreachable=0    failed=0
</code></pre></div>
<h5 dir="auto">ACTUAL RESULTS</h5>


<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="TASK [reports : *** - GENERATE JSON REPORT PER SITE STATS ONLY] ****************
fatal: [localhost]: FAILED! =&gt; {&quot;changed&quot;: false, &quot;failed&quot;: true, &quot;msg&quot;: &quot;[Errno 13] Permission denied: '/tmp/tmpuv61yn'&quot;}

PLAY RECAP *********************************************************************
localhost                  : ok=360  changed=29   unreachable=0    failed=1"><pre class="notranslate"><code class="notranslate">TASK [reports : *** - GENERATE JSON REPORT PER SITE STATS ONLY] ****************
fatal: [localhost]: FAILED! =&gt; {"changed": false, "failed": true, "msg": "[Errno 13] Permission denied: '/tmp/tmpuv61yn'"}

PLAY RECAP *********************************************************************
localhost                  : ok=360  changed=29   unreachable=0    failed=1
</code></pre></div>
<p dir="auto">Hello,<br>
I wanted to test ansible-2.0.0.<br>
When I execute the command "ansible all -m ping", I have the following output.</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="ansible 2.0.0
  config file = ansible2/conf/ansible.cfg
  configured module search path = ansible-2.0.0/library
No config file found; using defaults
Loaded callback minimal of type stdout, v2.0
&lt;ï»¿GUEST01&gt; ESTABLISH SSH CONNECTION FOR USER: None
An exception occurred during task execution. The full traceback is:
Traceback (most recent call last):
  File &quot;ansible2/lib/ansible/executor/process/worker.py&quot;, line 114, in run
    self._shared_loader_obj,
  File &quot;ansible2/lib/ansible/executor/task_executor.py&quot;, line 119, in run
    res = self._execute()
  File &quot;ansible2/lib/ansible/executor/task_executor.py&quot;, line 401, in _execute
    result = self._handler.run(task_vars=variables)
  File &quot;ansible2/lib/ansible/plugins/action/normal.py&quot;, line 30, in run
    results.update(self._execute_module(tmp=tmp, task_vars=task_vars))
  File &quot;ansible2/lib/ansible/plugins/action/__init__.py&quot;, line 405, in _execute_module
    tmp = self._make_tmp_path()
  File &quot;ansible2/lib/ansible/plugins/action/__init__.py&quot;, line 211, in _make_tmp_path
    result = self._low_level_execute_command(cmd, sudoable=False)
  File &quot;ansible2/lib/ansible/plugins/action/__init__.py&quot;, line 520, in _low_level_execute_command
    rc, stdout, stderr = self._connection.exec_command(cmd, in_data=in_data, sudoable=sudoable)
  File &quot;ansible2/lib/ansible/plugins/connection/ssh.py&quot;, line 603, in exec_command
    raise e
UnicodeEncodeError: 'ascii' codec can't encode character u'\ufeff' in position 309: ordinal not in range(128)
                                                                                                                                                                                     ï»¿
GUEST01| FAILED! =&gt; {
    &quot;failed&quot;: true,
    &quot;stdout&quot;: &quot;&quot;"><pre class="notranslate"><code class="notranslate">ansible 2.0.0
  config file = ansible2/conf/ansible.cfg
  configured module search path = ansible-2.0.0/library
No config file found; using defaults
Loaded callback minimal of type stdout, v2.0
&lt;ï»¿GUEST01&gt; ESTABLISH SSH CONNECTION FOR USER: None
An exception occurred during task execution. The full traceback is:
Traceback (most recent call last):
  File "ansible2/lib/ansible/executor/process/worker.py", line 114, in run
    self._shared_loader_obj,
  File "ansible2/lib/ansible/executor/task_executor.py", line 119, in run
    res = self._execute()
  File "ansible2/lib/ansible/executor/task_executor.py", line 401, in _execute
    result = self._handler.run(task_vars=variables)
  File "ansible2/lib/ansible/plugins/action/normal.py", line 30, in run
    results.update(self._execute_module(tmp=tmp, task_vars=task_vars))
  File "ansible2/lib/ansible/plugins/action/__init__.py", line 405, in _execute_module
    tmp = self._make_tmp_path()
  File "ansible2/lib/ansible/plugins/action/__init__.py", line 211, in _make_tmp_path
    result = self._low_level_execute_command(cmd, sudoable=False)
  File "ansible2/lib/ansible/plugins/action/__init__.py", line 520, in _low_level_execute_command
    rc, stdout, stderr = self._connection.exec_command(cmd, in_data=in_data, sudoable=sudoable)
  File "ansible2/lib/ansible/plugins/connection/ssh.py", line 603, in exec_command
    raise e
UnicodeEncodeError: 'ascii' codec can't encode character u'\ufeff' in position 309: ordinal not in range(128)
                                                                                                                                                                                     ï»¿
GUEST01| FAILED! =&gt; {
    "failed": true,
    "stdout": ""
</code></pre></div>
<p dir="auto">Best regards.</p>