Ansible Tower 找不到集合

问题描述

我是 Ansible 的新手,也是 Ansible Tower 3.7.4 和 Ansbile 2.9.15 的新手。我正在尝试做一个在 Git 存储库中运行 ansible 脚本的基本模板。注意:如果我在带有 python 和 ansible-galaxy 的 linux 机器上安装 ansible,我可以拉取集合并且一切正常。然而,在 Ansible Tower 中,并没有看到我的收藏从 ansible-galaxy 中提取。这是我得到的错误

ERROR! Couldn't resolve module/action 'community.kubernetes.k8s'. This often indicates a misspelling,missing collection,or incorrect module path.

我的 ansible playbook 的主级别的 collections 目录中有一个 requirements.yml 文件。这是它的内容

collections:
- name: community.aws
- name: community.kubernetes

目录结构是

- ansible
  - collections
    - requirements.yml
  - roles
    - openshift
      - tasks
        - main.yml
  - main.yml

这是我在 Ansible Tower 中运行模板时的完整输出

ansible-playbook 2.9.15
  config file = /etc/ansible/ansible.cfg
  configured module search path = [u'/var/lib/awx/.ansible/plugins/modules',u'/usr/share/ansible/plugins/modules']
  ansible python module location = /usr/lib/python2.7/site-packages/ansible
  executable location = /usr/bin/ansible-playbook
  python version = 2.7.5 (default,Aug 13 2020,02:51:10) [GCC 4.8.5 20150623 (Red Hat 4.8.5-39)]
Using /etc/ansible/ansible.cfg as config file
SSH password: 
host_list declined parsing /tmp/awx_66_8ffiwxxz/tmp32f5fpkw as it did not pass its verify_file() method
Parsed /tmp/awx_66_8ffiwxxz/tmp32f5fpkw inventory source with script plugin
ERROR! Couldn't resolve module/action 'community.kubernetes.k8s'. This often indicates a misspelling,or incorrect module path.
The error appears to be in '/tmp/awx_66_8ffiwxxz/project/confluent/ansible/roles/openshift/tasks/main.yml': line 17,column 3,but may
be elsewhere in the file depending on the exact Syntax problem.
The offending line appears to be:
# Ensure namespace is created
- name: Create Confluent namespace / project
  ^ here

知道我做错了什么吗?

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)