Joe Conger wrote:
I would be much easier to remotely manage the LsAgent.ini settings if you put those settings in the HKLM registry.
For example I want to force a scan of all the LSAgent hosts.  I have network tools that I can remotely modify the registry and restart services.  So I could clear all the LSAgent hosts LastScan & LastSent settings and then restart the LanSweeper Agent Service.
This is the ansible play (lansweeper-rescan.yml) we use to force a rescan:
---
- hosts: windows
  gather_facts: no
  tasks:
    - name: "Stop LansweeperAgent"
      win_service:
        name: LansweeperAgentService
        state: stopped
    - name: "Remove timestamps from LsAgent.ini"
      win_lineinfile:
        path: C:\Program Files (x86)\LansweeperAgent\LsAgent.ini
        regex: ^Last
        state: absent
    - name: "Start LansweeperAgent"
      win_service:
        name: LansweeperAgentService
        state: started