win_file
Create, touch, or remove Windows files and directories
Collection: ansible.windows
Full Name: parallax.windows.win_file
Aliases: ansible.windows.win_file, win_file
Synopsis
Create, touch, or remove Windows files and directories
Parameters
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
| path | string | yes | Path on the target Windows filesystem | |
| state | string | Desired path state; file never creates a missing file | ||
| modification_time | string | Desired modification time, now, or preserve | ||
| modification_time_format | string | yyyy-MM-dd HH:mm:ss | Numeric .NET custom timestamp format or o/O/s/u; locale-dependent formats are not yet supported | |
| access_time | string | Desired access time, now, or preserve | ||
| access_time_format | string | yyyy-MM-dd HH:mm:ss | Numeric .NET custom timestamp format or o/O/s/u; locale-dependent formats are not yet supported |
Example
yaml
- name: Inspect a Windows path
ansible.windows.win_file:
path: 'C:\Windows\Temp'