-
Notifications
You must be signed in to change notification settings - Fork 23.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
win_find module failing to find files when it cannot access a single file in a Dicrectory #31898
Comments
This looks like it is related to #26885, are you able to run the module with We should have a better error message but this should solve your issue for now. |
So, i added (get_checksum: False) but it fails with the same error above
|
That's weird I'm going to write a patch to the module though to skip files it fails to access as that is more in line with the find module which should help in your case. |
Tried again same error |
@vamsifeb27 are you able to test out the changes I've made at #32105? It should hopefully solve your issues and make win_find just skip the files it does not have access to. |
Can you please send me the link of updated module |
I am using this module in library https://github.com/jborean93/ansible/blob/22c7e08e1f27e63a55001ba88085f74d071f012c/lib/ansible/modules/windows/win_find.ps1 |
If you are on Ansible 2.3, you will need to change the line near the top of the file
to
The |
Changes have been merged into devel and cherry-picked to 2.4. Will be available in 2.4.2 rc1 6a73339 |
I encountered the same issue when I use the following scripts. My ansible version is 2.5.0, any suggestions? @jborean93 Thanks.
|
TASK [Collect RPT logs info] *************************************************** |
ISSUE TYPE
COMPONENT NAME
win_find
ANSIBLE VERSION
CONFIGURATION
OS / ENVIRONMENT
Running ansible from: Linux VM-TOWERFF1.iam.sungard.prod 3.10.0-514.6.1.el7.x86_64 #1 SMP Sat Dec 10 11:15:38 EST 2016 x86_64 x86_64 x86_64 GNU/Linux
managing: windows server 2008 R2 Enterprise
SUMMARY
I was trying to find all files from c:\windows\Temp with win_find module and trying to delete them with win_file module but win_find module failing with the following error
But win_find module is working fine with all dir so what i found was, in Temp dir there are some files which ansible user cannot access (delete/move/copy etc) so i think this problem is because of these files but i dont want to touch those files as i want to run win_find on 250 servers. So i just want win_find module to skip the files which it cannot access and find remaining instead of failing whole playbook
STEPS TO REPRODUCE
EXPECTED RESULTS
Finding all files under Temp dir and registering in regi_windir and deleting the files which were registered
ACTUAL RESULTS
The text was updated successfully, but these errors were encountered: