diff --git a/test.yml b/test.yml index 2d44365..def4137 100644 --- a/test.yml +++ b/test.yml @@ -3,6 +3,8 @@ hosts: all tasks: - name: Creating an empty file - ansible.windows.win_file: - path: 'C:\Users\Administrator\Desktop\example.txt' - state: touch \ No newline at end of file + win_shell: | + $value = Test-Path -Path C:\windows\temp + if ($value) { + New-Item C:\windows\temp\test.txt -ItemType File + } \ No newline at end of file