- name: Create empty file hosts: windows gather_facts: false tasks: - name: Create log file ansible.windows.win_file: path: C:\apps\logs\app.log state: touch