Ansible – Loading Additional Modules with Ansible Tower

ansibleansible-playbookansible-tower

I'm trying to run a playbook on ansible tower but I'm having issues loading extra modules. I checked the playbook is configured right but it still fails with the message below…

[WARNING]: Invalid characters were found in group names but not replaced, use
-vvvv to see details
ERROR! couldn't resolve module/action 'ansible.windows.win_package'. This often indicates a misspelling, missing collection, or incorrect module path.
The error appears to be in '/tmp/bwrap_371_vfy0csh9/awx_371_vu6g6dfa/project/windows-playbook.yml': line 5, column 7, but may
be elsewhere in the file depending on the exact syntax problem.
The offending line appears to be:
    - name: Test Install
      ^ here

I might be blind but how do I get ansible tower to load these modules? I'm not sure if its a setting I've missed or extra config required in the playbook itself… Any help would really be appreciated. I'll pop in my playbook below.

---
- hosts: all

  tasks:
    - name: Test Install
      ansible.windows.win_package:
        path: \\FILESHARE\data\Software\Installer.msi
        arguments: '/q /norestart'
        state: present

Best Answer

You're running Ansible 2.9, which for the most part has not adopted the new module/module collection naming scheme from 2.10 and later versions. Because these have caused a lot of confusion and some breakage, Red Hat has decided not to update Ansible past 2.9 at this time, and thus Ansible Tower also remains on 2.9.

If you check the docs, you will see that 2.9 has not done so for the ansible.windows collection, thus you should continue using the old name, win_package.

Related Topic