繁体   English   中英

Ansible AWX 使用 collections

[英]Ansible AWX use collections

在 AWX 中启动模板时,我的 ansible 剧本失败。

ansible-playbook [core 2.11.0b4] 
  config file = None
  configured module search path = ['/home/runner/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
  ansible python module location = /usr/local/lib/python3.8/site-packages/ansible
  ansible collection location = /runner/requirements_collections:/home/runner/.ansible/collections:/usr/share/ansible/collections
  executable location = /usr/local/bin/ansible-playbook
  python version = 3.8.3 (default, Aug 31 2020, 16:03:14) [GCC 8.3.1 20191121 (Red Hat 8.3.1-5)]
  jinja version = 2.10.3
  libyaml = True
No config file found; using defaults
SSH password: 
BECOME password[defaults to SSH password]: 
ERROR! couldn't resolve module/action 'community.general.archive'. This often indicates a misspelling, missing collection, or incorrect module path.

在项目文件夹中有一个角色/要求。yaml 并在我同步项目后安装:

Starting galaxy role install process
- extracting community.general to /var/lib/awx/projects/.__awx_cache/_8__gitlab/stage/requirements_roles/community.general
- community.general (main) was installed successfully 

这是我的剧本:

---
- name: Backup Folder
  hosts: all
  tasks:
  - name: zipping folder
    become: yes
    community.general.archive:
      path: /home/backup/{{name}}
      dest: /home/backup/{{name}}.zip
      format: zip

我把事情搞混了。 我试图安装一个集合作为一个卷。 我通过将“角色”文件夹重命名为“集合”(带有 requirements.yml 的文件夹)并更改了一些语法来修复它。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM