ansible - Ansible Tower 未找到集合
问题描述
我是 Ansible 的新手,对使用 Ansbile 2.9.15 的 Ansible Tower 3.7.4 非常陌生。我正在尝试做一个在 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, missing collection, 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
知道我做错了什么吗?
解决方案
推荐阅读
- google-cloud-firestore - 来自 Postman 的 Cloud Firestore 请求
- python - PyGame 窗口未启动
- javascript - 向 JSX Element 变量添加额外的道具
- apache-spark - Spark:在数组类型列上连接两个数据框
- python - Selenium 和 Python - 用于 Instagram 登录的 Bot 已解决
- r - 我可以在 R 中为此做一个循环/函数吗?(我该怎么做?)
- javascript - 从下拉列表中获取价值。我正在尝试使用 Javascript 获取下拉列表的值。它不断返回第一个选项的值
- ios - authorizationController 委托 didCompleteWithAuthorization 参数授权是什么类型:ASAuthorization?
- javascript - 从点击的元素 Django 中获取数据
- airflow - 春天云数据流和气流