win_file – Creates, touches or removes files or directories¶
path / required
Path to the file being managed.
aliases: dest, name
- file – Manage files and file properties
The official documentation on the file module.
- win_acl – Set file/directory/registry permissions for a system user or group
The official documentation on the win_acl module.
- win_acl_inheritance – Change ACL inheritance
The official documentation on the win_acl_inheritance module.
- win_owner – Set owner
The official documentation on the win_owner module.
- win_stat – Get information about Windows files
The official documentation on the win_stat module.
- name: Touch a file (creates if not present, updates modification time if present) win_file: path: C:\Temp\foo.conf state: touch - name: Remove a file, if present win_file: path: C:\Temp\foo.conf state: absent - name: Create directory structure win_file: path: C:\Temp\folder\subfolder state: directory - name: Remove directory structure win_file: path: C:\Temp state: absent
This module is guaranteed to have no backward incompatible interface changes going forward. [stableinterface]
This module is maintained by the Ansible Core Team. [core]
Red Hat Support¶
More information about Red Hat’s support of this module is available from this Red Hat Knowledge Base article.