Ansible 离线安装集合

Ansible install collection offline

我正在尝试安装 来自 tar 文件的 Ansible,但我似乎面临与此相关的问题:

ansible-galaxy collection install azure-azcollection-1.10.0.tar.gz 

Ansible version is 2.10
00:03:08.902  [0mansible-galaxy 2.10.15
00:03:08.902    config file = None
00:03:08.902    configured module search path = ['/plugins/modules', '/ansible/library']
00:03:08.902    ansible python module location = /usr/local/lib/python3.6/site-packages/ansible
00:03:08.902    executable location = /usr/local/bin/ansible-galaxy
00:03:08.902    python version = 3.6.8 (default, Aug 13 2020, 07:46:32) [GCC 4.8.5 20150623 (Red Hat 4.8.5-39)]

我得到的错误是:

0:03:25.896  [91m[0;31mERROR! Invalid collection name 'azure-azcollection-1.10.0.tar.gz', name must be in the format <namespace>.<collection>.

我遵循了这个指南:https://www.redhat.com/sysadmin/install-ansible-disconnected-node

有什么建议吗?

如果您指定了一个不存在的文件,您将收到此错误。

ec2-user@honest-nyoijizai ~ $ ansible-galaxy --version
ansible-galaxy 2.10.15
  config file = None
  configured module search path = ['/home/ec2-user/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
  ansible python module location = /home/ec2-user/.local/lib/python3.7/site-packages/ansible
  executable location = /home/ec2-user/.local/bin/ansible-galaxy
  python version = 3.7.10 (default, Jun  3 2021, 00:02:01) [GCC 7.3.1 20180712 (Red Hat 7.3.1-13)]
ec2-user@honest-nyoijizai ~ $ ansible-galaxy collection install azure-azcollection-1.10.1.tar.gz                                                                
Starting galaxy collection install process
Process install dependency map
ERROR! Invalid collection name 'azure-azcollection-1.10.1.tar.gz', name must be in the format <namespace>.<collection>. 
Please make sure namespace and collection name contains characters from [a-zA-Z0-9_] only.
ec2-user@honest-nyoijizai ~ $ ansible-galaxy collection install azure-azcollection-1.10.0.tar.gz 
Starting galaxy collection install process
Process install dependency map
Starting collection install process
Installing 'azure.azcollection:1.10.0' to '/home/ec2-user/.ansible/collections/ansible_collections/azure/azcollection'
azure.azcollection (1.10.0) was installed successfully