使用 ansible tower 載入附加模組

使用 ansible tower 載入附加模組

我正在嘗試在 ansible tower 上運行劇本,但在加載額外模組時遇到問題。我檢查了劇本配置正確,但仍然失敗並顯示以下訊息...

[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

我可能是瞎子,但如何讓 ansible tower 加載這些模組?我不確定它是否是我錯過的設置或劇本本身需要的額外配置......任何幫助將不勝感激。我將在下面彈出我的劇本。

---
- hosts: all

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

答案1

您正在執行 Ansible 2.9,它在很大程度上沒有採用 2.10 及更高版本中的新模組/模組集合命名方案。由於這些造成了許多混亂和一些損壞,Red Hat 決定此時不再更新 Ansible 2.9 以上,因此 Ansible Tower 也保留在 2.9 上。

如果您檢查文件,您將看到 2.9 尚未對ansible.windows集合執行此操作,因此您應該繼續使用舊名稱win_package

相關內容