<h5 dir="auto">Issue Type:</h5>
<p dir="auto">Bug Report</p>
<h5 dir="auto">Ansible Version:</h5>
<p dir="auto">2.0.0.1</p>
<h5 dir="auto">Ansible Configuration:</h5>
<p dir="auto">[defaults]<br>
host_key_checking = False<br>
hostfile = inventory/test<br>
pipelining = True</p>
<h5 dir="auto">Environment:</h5>
<p dir="auto">From Ubuntu 14.04 to sles12</p>
<h5 dir="auto">Summary:</h5>
<p dir="auto">After Running the <code class="notranslate">unarchive</code> module the <code class="notranslate">$HOME/.ansible</code> is not cleaned up</p>
<h5 dir="auto">Steps To Reproduce:</h5>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="- name: extract large file
  unarchive:
  src=large_file.tar.gz
  dest=/tmp"><pre class="notranslate"><code class="notranslate">- name: extract large file
  unarchive:
  src=large_file.tar.gz
  dest=/tmp
</code></pre></div>
<h5 dir="auto">Expected Results:</h5>
<p dir="auto"><code class="notranslate">$HOME/.ansible</code> on target machine is small after playbook has finished</p>
<h5 dir="auto">Actual Results:</h5>
<p dir="auto"><code class="notranslate">$HOME/.ansible</code> is about the size of the archive extracted</p>
<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.2 (ubuntu 14.04 : *ppa:ansible/ansible*)"><pre class="notranslate"><code class="notranslate">ansible 2.0.0.2 (ubuntu 14.04 : *ppa:ansible/ansible*)
</code></pre></div>
<h5 dir="auto">Ansible Configuration:</h5>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="[defaults]
host_key_checking = False
fact_caching   = memory
gathering      = smart
remote_user    = root
hostfile       = /etc/ansible/hosts
library        = /usr/share/ansible
remote_tmp     = $HOME/.ansible/tmp
pattern        = *
forks          = 5
poll_interval  = 15
transport      = smart
remote_port    = 22
nocows         = 1
log_path       = /var/log/ansible.log
roles_path     = /etc/ansible/roles
ansible_managed = Ansible managed: {file} @ %Y-%m-%d %H:%M:%S (%Z)
retry_files_enabled = False
no_log = True
no_target_syslog = True
[ssh_connection]
pipelining      = True
ssh_args        = -o ForwardAgent=yes"><pre class="notranslate"><code class="notranslate">[defaults]
host_key_checking = False
fact_caching   = memory
gathering      = smart
remote_user    = root
hostfile       = /etc/ansible/hosts
library        = /usr/share/ansible
remote_tmp     = $HOME/.ansible/tmp
pattern        = *
forks          = 5
poll_interval  = 15
transport      = smart
remote_port    = 22
nocows         = 1
log_path       = /var/log/ansible.log
roles_path     = /etc/ansible/roles
ansible_managed = Ansible managed: {file} @ %Y-%m-%d %H:%M:%S (%Z)
retry_files_enabled = False
no_log = True
no_target_syslog = True
[ssh_connection]
pipelining      = True
ssh_args        = -o ForwardAgent=yes
</code></pre></div>
<h5 dir="auto">Environment:</h5>
<p dir="auto">Ubuntu LTS (trusty)</p>
<h5 dir="auto">Summary:</h5>
<p dir="auto">I have many servers which run ansible (like ansible-pull ) on themselves. (they often don't even have internet). Anyway they run ansible from cron at regular times.</p>
<p dir="auto">Today I was alerted when to the disk usage on my dev servers (dev run ansible on localhost much more frequently than production).</p>
<p dir="auto">There was over 8Gb of disk being used under <em>$HOME/.ansible/tmp</em></p>
<p dir="auto">A quick examination of dpkg logs and the timestamps (on 3 hosts) confirms that this started immediately after leaving ansible 1.9</p>
<h5 dir="auto">Steps To Reproduce:</h5>
<p dir="auto">I just run ansible and it drops lots of files. I'm afraid that its a massive codebase but I'll try to isolate if its a specific module when I find time.</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="root hostname ~/.ansible/tmp # ls -ld *| wc -l
28877
root hostname ~/.ansible/tmp # du -sh ./
334M  ./
root hostname ~/.ansible/tmp # ls -ltr | head
total 0
drwxr-xr-x 2 root root 20 Jan  7 16:35 ansible-tmp-1452184545.57-4067534433910
drwxr-xr-x 2 root root 29 Jan 14 14:34 ansible-tmp-1452782097.64-275060088292169
drwxr-xr-x 2 root root  6 Feb 15 18:05 ansible-tmp-1455559507.68-75405176251432
drwxr-xr-x 2 root root  6 Feb 15 18:05 ansible-tmp-1455559510.74-196306534308392
drwxr-xr-x 2 root root  6 Feb 15 18:05 ansible-tmp-1455559511.03-274782368435943
drwxr-xr-x 2 root root  6 Feb 15 18:05 ansible-tmp-1455559511.35-176576225059611
drwxr-xr-x 2 root root  6 Feb 15 18:05 ansible-tmp-1455559511.49-191884790350210
drwxr-xr-x 2 root root  6 Feb 15 18:05 ansible-tmp-1455559511.58-19466108554057
drwxr-xr-x 2 root root  6 Feb 15 18:05 ansible-tmp-1455559511.63-28439722806966
root hostname ~/.ansible/tmp # grep ansible /var/log/dpkg.log* | sort -n
/var/log/dpkg.log.1:2016-02-15 17:17:44 status half-configured ansible:all 1.9.4-1ppa~trusty
/var/log/dpkg.log.1:2016-02-15 17:17:44 status half-installed ansible:all 1.9.4-1ppa~trusty
/var/log/dpkg.log.1:2016-02-15 17:17:44 status unpacked ansible:all 1.9.4-1ppa~trusty
/var/log/dpkg.log.1:2016-02-15 17:17:44 upgrade ansible:all 1.9.4-1ppa~trusty 2.0.0.2-1ppa~trusty
/var/log/dpkg.log.1:2016-02-15 17:17:45 status half-installed ansible:all 1.9.4-1ppa~trusty
/var/log/dpkg.log.1:2016-02-15 17:17:45 status unpacked ansible:all 2.0.0.2-1ppa~trusty
/var/log/dpkg.log.1:2016-02-15 17:17:45 status unpacked ansible:all 2.0.0.2-1ppa~trusty
/var/log/dpkg.log.1:2016-02-15 17:17:55 conffile /etc/ansible/ansible.cfg keep
/var/log/dpkg.log.1:2016-02-15 17:17:55 conffile /etc/ansible/hosts keep
/var/log/dpkg.log.1:2016-02-15 17:17:55 configure ansible:all 2.0.0.2-1ppa~trusty &lt;none&gt;
/var/log/dpkg.log.1:2016-02-15 17:17:55 status half-configured ansible:all 2.0.0.2-1ppa~trusty
/var/log/dpkg.log.1:2016-02-15 17:17:55 status installed ansible:all 2.0.0.2-1ppa~trusty
/var/log/dpkg.log.1:2016-02-15 17:17:55 status unpacked ansible:all 2.0.0.2-1ppa~trusty
/var/log/dpkg.log.1:2016-02-15 17:17:55 status unpacked ansible:all 2.0.0.2-1ppa~trusty
/var/log/dpkg.log.1:2016-02-15 17:17:55 status unpacked ansible:all 2.0.0.2-1ppa~trusty
"><pre class="notranslate"><code class="notranslate">root hostname ~/.ansible/tmp # ls -ld *| wc -l
28877
root hostname ~/.ansible/tmp # du -sh ./
334M  ./
root hostname ~/.ansible/tmp # ls -ltr | head
total 0
drwxr-xr-x 2 root root 20 Jan  7 16:35 ansible-tmp-1452184545.57-4067534433910
drwxr-xr-x 2 root root 29 Jan 14 14:34 ansible-tmp-1452782097.64-275060088292169
drwxr-xr-x 2 root root  6 Feb 15 18:05 ansible-tmp-1455559507.68-75405176251432
drwxr-xr-x 2 root root  6 Feb 15 18:05 ansible-tmp-1455559510.74-196306534308392
drwxr-xr-x 2 root root  6 Feb 15 18:05 ansible-tmp-1455559511.03-274782368435943
drwxr-xr-x 2 root root  6 Feb 15 18:05 ansible-tmp-1455559511.35-176576225059611
drwxr-xr-x 2 root root  6 Feb 15 18:05 ansible-tmp-1455559511.49-191884790350210
drwxr-xr-x 2 root root  6 Feb 15 18:05 ansible-tmp-1455559511.58-19466108554057
drwxr-xr-x 2 root root  6 Feb 15 18:05 ansible-tmp-1455559511.63-28439722806966
root hostname ~/.ansible/tmp # grep ansible /var/log/dpkg.log* | sort -n
/var/log/dpkg.log.1:2016-02-15 17:17:44 status half-configured ansible:all 1.9.4-1ppa~trusty
/var/log/dpkg.log.1:2016-02-15 17:17:44 status half-installed ansible:all 1.9.4-1ppa~trusty
/var/log/dpkg.log.1:2016-02-15 17:17:44 status unpacked ansible:all 1.9.4-1ppa~trusty
/var/log/dpkg.log.1:2016-02-15 17:17:44 upgrade ansible:all 1.9.4-1ppa~trusty 2.0.0.2-1ppa~trusty
/var/log/dpkg.log.1:2016-02-15 17:17:45 status half-installed ansible:all 1.9.4-1ppa~trusty
/var/log/dpkg.log.1:2016-02-15 17:17:45 status unpacked ansible:all 2.0.0.2-1ppa~trusty
/var/log/dpkg.log.1:2016-02-15 17:17:45 status unpacked ansible:all 2.0.0.2-1ppa~trusty
/var/log/dpkg.log.1:2016-02-15 17:17:55 conffile /etc/ansible/ansible.cfg keep
/var/log/dpkg.log.1:2016-02-15 17:17:55 conffile /etc/ansible/hosts keep
/var/log/dpkg.log.1:2016-02-15 17:17:55 configure ansible:all 2.0.0.2-1ppa~trusty &lt;none&gt;
/var/log/dpkg.log.1:2016-02-15 17:17:55 status half-configured ansible:all 2.0.0.2-1ppa~trusty
/var/log/dpkg.log.1:2016-02-15 17:17:55 status installed ansible:all 2.0.0.2-1ppa~trusty
/var/log/dpkg.log.1:2016-02-15 17:17:55 status unpacked ansible:all 2.0.0.2-1ppa~trusty
/var/log/dpkg.log.1:2016-02-15 17:17:55 status unpacked ansible:all 2.0.0.2-1ppa~trusty
/var/log/dpkg.log.1:2016-02-15 17:17:55 status unpacked ansible:all 2.0.0.2-1ppa~trusty

</code></pre></div>