- name: Remove configuration entry hosts: windows gather_facts: false tasks: - name: Remove environment setting community.windows.win_lineinfile: path: C:\apps\conf\app.conf regexp: '^environment=' state: absent