Need to have Ansible Playbook to deploy Automox agent based on OS - Linux, windows or MacOS

  • 28 February 2024
  • 1 reply
  • 25 views

Badge

Need to have Ansible Playbook to deploy Automox agent based on OS - Linux, windows or MacOS

 


1 reply

Userlevel 5
Badge +1

Have you tried deploying scripts? https://docs.ansible.com/ansible/latest/collections/ansible/builtin/script_module.html

 

Both Linux and Mac Agent install are one-liners. Windows is a bit more, here is what I’ve used:

 

Invoke-WebRequest -Uri 'https://console.automox.com/installers/Automox_Installer-latest.msi' -OutFile C:\windows\temp\automox.msi
Start-Process msiexec -ArgumentList '/I C:\windows\temp\automox.msi ACCESSKEY=XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX /quiet /qn' -wait
$agentPath = "C:\Program Files (x86)\Automox\amagent.exe"
Start-Process -FilePath $agentPath -ArgumentList "--deregister" | Out-Null
& "C:\Program Files (x86)\Automox\amagent.exe" --setgrp "Default Group/MyGroup"

 

 

Reply