You need to get all ever logged in users on Windows. There should not be a Public folder in the list.
This design does not work:
- name: TEST find 4 win block: - win_find: paths: C:\Users\ file_type: directory excludes: Public register: win_find_out - debug: msg: "{{ win_find_out.files }}" There is another parameter patterns , but !Public , ?!Public or not (Public) do not work - exhaust disappears altogether.
ansible 2.7.5
exludeat the docks. There is aregexp- a pattern like this would be^.+(?!Public).+$Share your experience with ansibl and Windows ... maybe in a chat :) - Hellseher