- name: Configure multiple settings hosts: windows gather_facts: false tasks: - name: Configure application settings community.windows.win_lineinfile: path: C:\apps\conf\app.conf regexp: "^{{ item.key }}=" line: "{{ item.key }}={{ item.value }}" create: true loop: - { key: "app_name", value: "DemoApp" } - { key: "log_level", value: "warning" } - { key: "max_clients", value: "200" }