Installing Dynatrace oneagent on multiple host using dynatrace

192 views Asked by At

Currently have issue installing Dynatrace oneagent to multiple Window VMs/host, I was able to copy the file to a directory but having issue installing the copied file.

NOTE*** I am using a PowerShell script

Copy was okay but can not install

  hosts: windows
  gather_facts: false
  become_method: runas
  become_user: classless
  collections:
    - community.windows

  tasks:
   - name: copy EXE package to windows hosts
     ansible.builtin.win_copy:
      src: dynatrace-oneagent.exe
      dest: C:/Dynatrace-oneagent.exe

   - name: execute install package
     ansible.windows.win_powershell:
         script: |
             'C:/dynatrace-oneagent.exe --set-infra-only=false --set-app-log-content-access=true --set-host-group=“myGroup” --quiet

I could copy with the first part of the script but execute install package is not executing.

0

There are 0 answers