Install_Wazuh_Win_Server.yaml 713 B

123456789101112131415161718192021
  1. ---
  2. - name: Install Wazuh Agent and Start Service
  3. hosts: windows
  4. gather_facts: false
  5. tasks:
  6. - name: Download Wazuh Agent MSI
  7. win_shell: |
  8. Invoke-WebRequest -Uri https://packages.wazuh.com/4.x/windows/wazuh-agent-4.6.0-1.msi -OutFile $env:temp\wazuh-agent
  9. args:
  10. executable: powershell.exe
  11. - name: Install Wazuh Agent
  12. win_shell: |
  13. msiexec.exe /i $env:temp\wazuh-agent /q WAZUH_MANAGER='wazuh.hagood.us' WAZUH_AGENT_GROUP='Windows,Servers' WAZUH_REGISTRATION_SERVER='wazuh.hagood.us'
  14. args:
  15. executable: powershell.exe
  16. - name: Start Wazuh Service
  17. win_shell: "Start-Service -Name WazuhSvc"
  18. args:
  19. executable: powershell.exe