installing_collections_file

Ansible can also install from a source directory in several ways:

collections:
  # directory containing the collection
  - name: ./my_namespace/my_collection/
    type: dir

  # directory containing a namespace, with collections as subdirectories
  - name: ./my_namespace/
    type: subdirs

Ansible can also install a collection collected with ansible-galaxy collection build or downloaded from Galaxy for offline use by specifying the output file directly:

collections:
  - name: /tmp/my_namespace-my_collection-1.0.0.tar.gz
    type: file

[!NOTE] Relative paths are calculated from the current working directory (where you are invoking ansible-galaxy install -r from). They are not taken relative to the requirements.yml file.


版本号 #2
由 壳壳虫 创建于 2026-10-31 14:45:23 UTC
由 壳壳虫 更新于 2026-10-31 14:45:24 UTC