<p dir="auto">When ansible tries to create temporary directory in<br>
mkdir -p $HOME/.ansible/tmp/ansible-tmp-....<br>
on full disk I got unhandled exception UnicodeDecodeError</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="# ansible server1-testt11.cur.local -o -i hosts.rb -M /etc/ansible/modules -s -u ansible -m user -a &quot;name=lbuild shell=/bin/bash group=users&quot; -vvv
&lt;server1-testt11.cur.local&gt; ESTABLISH CONNECTION FOR USER: ansible
&lt;server1-testt11.cur.local&gt; REMOTE_MODULE user name=lbuild shell=/bin/bash group=users
&lt;server1-testt11.cur.local&gt; EXEC ssh -C -tt -v -o ControlMaster=auto -o ControlPersist=60s -o ControlPath=&quot;/home/ansible/.ansible/cp/ansible-ssh-%h-%p-%r&quot; -o StrictHostKeyChecking=no -o Port=22 -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o ConnectTimeout=10 server1-testt11.cur.local /bin/sh -c 'mkdir -p $HOME/.ansible/tmp/ansible-tmp-1445521612.21-234730712043546 &amp;&amp; chmod a+rx $HOME/.ansible/tmp/ansible-tmp-1445521612.21-234730712043546 &amp;&amp; echo $HOME/.ansible/tmp/ansible-tmp-1445521612.21-234730712043546'
Traceback (most recent call last):
  File &quot;/usr/bin/ansible&quot;, line 197, in &lt;module&gt;
    (runner, results) = cli.run(options, args)
  File &quot;/usr/bin/ansible&quot;, line 171, in run
    results = runner.run()
  File &quot;/usr/lib/pymodules/python2.7/ansible/runner/__init__.py&quot;, line 1498, in run
    results = [ self._executor(h, None) for h in hosts ]
  File &quot;/usr/lib/pymodules/python2.7/ansible/runner/__init__.py&quot;, line 595, in _executor
    self.callbacks.on_unreachable(host, msg)
  File &quot;/usr/lib/pymodules/python2.7/ansible/callbacks.py&quot;, line 396, in on_unreachable
    display(&quot;%s | FAILED =&gt; %s&quot; % (host, res), stderr=True, color='red', runner=self.runner)
UnicodeDecodeError: 'ascii' codec can't decode byte 0xe2 in position 517: ordinal not in range(128)"><pre class="notranslate"><code class="notranslate"># ansible server1-testt11.cur.local -o -i hosts.rb -M /etc/ansible/modules -s -u ansible -m user -a "name=lbuild shell=/bin/bash group=users" -vvv
&lt;server1-testt11.cur.local&gt; ESTABLISH CONNECTION FOR USER: ansible
&lt;server1-testt11.cur.local&gt; REMOTE_MODULE user name=lbuild shell=/bin/bash group=users
&lt;server1-testt11.cur.local&gt; EXEC ssh -C -tt -v -o ControlMaster=auto -o ControlPersist=60s -o ControlPath="/home/ansible/.ansible/cp/ansible-ssh-%h-%p-%r" -o StrictHostKeyChecking=no -o Port=22 -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o ConnectTimeout=10 server1-testt11.cur.local /bin/sh -c 'mkdir -p $HOME/.ansible/tmp/ansible-tmp-1445521612.21-234730712043546 &amp;&amp; chmod a+rx $HOME/.ansible/tmp/ansible-tmp-1445521612.21-234730712043546 &amp;&amp; echo $HOME/.ansible/tmp/ansible-tmp-1445521612.21-234730712043546'
Traceback (most recent call last):
  File "/usr/bin/ansible", line 197, in &lt;module&gt;
    (runner, results) = cli.run(options, args)
  File "/usr/bin/ansible", line 171, in run
    results = runner.run()
  File "/usr/lib/pymodules/python2.7/ansible/runner/__init__.py", line 1498, in run
    results = [ self._executor(h, None) for h in hosts ]
  File "/usr/lib/pymodules/python2.7/ansible/runner/__init__.py", line 595, in _executor
    self.callbacks.on_unreachable(host, msg)
  File "/usr/lib/pymodules/python2.7/ansible/callbacks.py", line 396, in on_unreachable
    display("%s | FAILED =&gt; %s" % (host, res), stderr=True, color='red', runner=self.runner)
UnicodeDecodeError: 'ascii' codec can't decode byte 0xe2 in position 517: ordinal not in range(128)
</code></pre></div>
<p dir="auto">Hi,</p>
<p dir="auto">My target node is Ubuntu 1204 64 bit, and ansible version is 1.7.1.</p>
<p dir="auto">When node disk is full, ansible failed but told useless message.</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="$ ansible target_host -i inventory -m shell -a &quot;pwd&quot;
target_host | FAILED &gt;&gt; {
    &quot;failed&quot;: true,
    &quot;msg&quot;: &quot;&quot;,
    &quot;parsed&quot;: false
}"><pre class="notranslate"><code class="notranslate">$ ansible target_host -i inventory -m shell -a "pwd"
target_host | FAILED &gt;&gt; {
    "failed": true,
    "msg": "",
    "parsed": false
}
</code></pre></div>
<p dir="auto">after we remove $HOME/.ansible/tmp directory, correct error message could be displayed.</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="$ ansible target_host -i inventory -m shell -a &quot;pwd&quot;
target_host | FAILED =&gt; Authentication or permission failure.  In some cases, you may have been able to authenticate and did not have permissions on the remote directory. Consider changing the remote temp path in ansible.cfg to a path rooted in &quot;/tmp&quot;. Failed command was: mkdir -p $HOME/.ansible/tmp/ansible-tmp-1433819395.41-82744649514542 &amp;&amp; chmod a+rx $HOME/.ansible/tmp/ansible-tmp-1433819395.41-82744649514542 &amp;&amp; echo $HOME/.ansible/tmp/ansible-tmp-1433819395.41-82744649514542, exited with result 1: mkdir: cannot create directory `/home/yunba/.ansible/tmp': No space left on device"><pre class="notranslate"><code class="notranslate">$ ansible target_host -i inventory -m shell -a "pwd"
target_host | FAILED =&gt; Authentication or permission failure.  In some cases, you may have been able to authenticate and did not have permissions on the remote directory. Consider changing the remote temp path in ansible.cfg to a path rooted in "/tmp". Failed command was: mkdir -p $HOME/.ansible/tmp/ansible-tmp-1433819395.41-82744649514542 &amp;&amp; chmod a+rx $HOME/.ansible/tmp/ansible-tmp-1433819395.41-82744649514542 &amp;&amp; echo $HOME/.ansible/tmp/ansible-tmp-1433819395.41-82744649514542, exited with result 1: mkdir: cannot create directory `/home/yunba/.ansible/tmp': No space left on device
</code></pre></div>