Still same error:
msg: rmtree failed: [Errno 39] Directory not empty

        - name: Removing jenkins folder
          file: path={{ base_dir }}/tomcat7/webapps/jenkins state=absent 
force=yes





On Friday, April 4, 2014 at 11:41:55 PM UTC+5:30, Michael DeHaan wrote:
>
> Perhaps the force is causing extra checking?
>
> If so, maybe it can be removed.
>
>
> On Fri, Apr 4, 2014 at 12:29 PM, Matt Martz <[email protected] <javascript:>
> > wrote:
>
>> I will mention that we use 'file' to recursively delete a directory, but 
>> it does require 'force=yes'
>> -- 
>> Matt Martz
>> [email protected] <javascript:>
>>
>> On April 4, 2014 at 8:48:36 AM, Maxim Odinintsev ([email protected] 
>> <javascript:>) wrote:
>>
>> Hello,
>>
>> When I'm run this job, but on some hosts return output:
>> rmtree failed: [Errno 39] Directory not empty: 
>> '/home/master/www/static.master/images/posters'
>>
>> Sure this directories is not empty, and I'm want remove it recursive. But 
>> why i can't do this with file module ?
>>
>> - name: Cleaner
>>   hosts: all
>>   sudo: yes
>>
>>   tasks:
>>     - name: get cache dirs
>>       shell: ls -1 /var/lib/nginx/cache/
>>       register: cache
>>
>>     - name: Remove cache
>>       file: name=/var/lib/nginx/cache/{{ item }} state=absent recurse=yes
>>       with_items: cache.stdout_lines
>>
>>     - name: get static dirs
>>       shell: ls -1 /home/master/www/static.master/
>>       register: static
>>
>>     - name: Clean static
>>       file: name=/home/master/www/static.master/{{ item }} state=absent 
>> recurse=yes
>>       with_items: static.stdout_lines
>>
>>
>> Thank you
>> --
>> You received this message because you are subscribed to the Google Groups 
>> "Ansible Project" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to [email protected] <javascript:>.
>> To post to this group, send email to [email protected] 
>> <javascript:>.
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/ansible-project/468b6757-2798-4003-ab2a-d9e5e85b6cd4%40googlegroups.com
>>  
>> <https://groups.google.com/d/msgid/ansible-project/468b6757-2798-4003-ab2a-d9e5e85b6cd4%40googlegroups.com?utm_medium=email&utm_source=footer>
>> .
>> For more options, visit https://groups.google.com/d/optout.
>>
>> -- 
>> You received this message because you are subscribed to the Google Groups 
>> "Ansible Project" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to [email protected] <javascript:>.
>> To post to this group, send email to [email protected] 
>> <javascript:>.
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/ansible-project/etPan.533eddee.6b8b4567.f4e6%40mobiletuvix.rackspace.corp
>>  
>> <https://groups.google.com/d/msgid/ansible-project/etPan.533eddee.6b8b4567.f4e6%40mobiletuvix.rackspace.corp?utm_medium=email&utm_source=footer>
>> .
>>
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/5ff29468-2f29-4095-ac96-19990bb47ce1%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to