linux - Ansible copr 模块违规行
问题描述
我正在尝试对我整理的一个小测试脚本进行试运行,ansible
但我遇到了一个错误。
脚本是这样的:
---
- hosts: localhost
connection: local
tasks:
- name: Enable peterwu/iosevka
community.general.copr:
state: enabled
name: peterwu/iosevka
- name: Enable taw/element
community.general.copr:
host: copr.fedoraincloud.org
state: enabled
name: taw/element
但是,当我运行命令时ansible-playbook ~/Documents/Ansible/enable_repos.yml --check
,我得到以下输出:
ERROR! couldn't resolve module/action 'community.general.copr'. This often indicates a misspelling, missing collection, or incorrect module path.
The error appears to be in '/[REDACTED]/Documents/Ansible/enable_repos.yml': line 5, column 7, but may
be elsewhere in the file depending on the exact syntax problem.
The offending line appears to be:
tasks:
- name: Enable peterwu/iosevka
^ here
我已按照此处的所有说明进行操作。谢谢您的帮助。
编辑:ansible
并且ansible-galaxy
都是版本2.9.21
;两者都是从官方的 fedora 存储库安装的。我使用ansible-galaxy collection install community.general
并重新运行后一个命令会产生以下输出:
Process install dependency map
Starting collection install process
Skipping 'community.general' as it is already installed
ansible-galaxy
除了安装它,我没有做任何其他事情。也许问题在那里?
解决方案
Using the command ansible-galaxy collection install community.general
did not work for me, as it did not allow me to use the various modules.
What worked for me was to install the ansible-collection-community-general
from the official repos.
推荐阅读
- javascript - 如何在没有装饰器语法的情况下使用 mobx-react 'observer'?
- google-maps - The Google Maps Platform server rejected your request. Invalid request. Invalid 'size' parameter
- r - 根据R中其他列中的条件将数字附加到列中的字符串
- html - 警告框未正确显示
- swift - 将视频掩码为形状并在另一个视频上进行合成 (AVComposition)
- javascript - Vue:将点击事件绑定到动态插入的内容
- python - 每次我退出时 Python/Flask 应用程序都会重新启动
- google-api-php-client - 从 Google+ 登录迁移到 Google 登录
- javascript - javascript将日期转换为这种格式'2019-01-19T19:11:00'
- javascript - 有没有办法将对象数组作为可转移对象传递给网络工作者?