@ -3,6 +3,8 @@
hosts: all
tasks:
- name: Creating an empty file
ansible.windows.win_file:
win_shell: |
path: 'C:\Users\Administrator\Desktop\example.txt'
$value = Test-Path -Path C:\windows\temp
state: touch
if ($value) {
New-Item C:\windows\temp\test.txt -ItemType File
}