diff --git a/test.yml b/test.yml index c2c5119..a69f745 100644 --- a/test.yml +++ b/test.yml @@ -1,5 +1,12 @@ -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 +--- +- name: win_file module demo + hosts: all + become: false + gather_facts: false + vars: + myfile: 'C:\\Users\\Administrator\\Desktop\\example.txt' + tasks: + - name: Creating an empty file + ansible.windows.win_file: + path: "{{ myfile }}" + state: touch \ No newline at end of file