You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I want to exclude some files from deleting in windows using win_file module.
Unfortunately exclude option is there only for Linux module file, I believe.
I am getting updated application code from developer. I need to keep some files without any change in the windows application like "web.config". In that case I only need to exclude one or two files and I can replace all other files.
Other option I have is, I need to copy original "web.config" in my src folder and idempotent will work.
Unfortunately this isn't possible and not something I think we are interested in looking at adding. Ultimately you will have to provide your own delete logic and use a win_shell or win_powershell task to implement it.
From @dhikrahashim on Aug 11, 2020 04:06
SUMMARY
ISSUE TYPE
I want to exclude some files from deleting in windows using win_file module.
Unfortunately exclude option is there only for Linux module file, I believe.
I am getting updated application code from developer. I need to keep some files without any change in the windows application like "web.config". In that case I only need to exclude one or two files and I can replace all other files.
Other option I have is, I need to copy original "web.config" in my src folder and idempotent will work.
COMPONENT NAME
ANSIBLE VERSION
CONFIGURATION
OS / ENVIRONMENT
Windows
ADDITIONAL INFORMATION
Tried all two types plays, nothing works
Copied from original issue: ansible/ansible#71196
The text was updated successfully, but these errors were encountered: