Ansible
來自 tarball 的 Ansible-Galaxy 安裝卡在建立與galaxy.ansible.com 的連接時
我正在嘗試通過 ansible-galaxy 安裝 ansible 集合。但是,程序在初始連接到galaxy_server的步驟中卡住了:https ://galaxy.ansible.com ,我不知道問題可能是什麼。考慮到與伺服器的連接可能存在問題,我手動下載了該集合併將其作為 tarball 提供。但是,這不會改變任何事情。有什麼想法我可能會錯過嗎?
ansible-galaxy collection install ~/Download/ansible.posix-1.3.0.tar.gz -vvvv ansible-galaxy 2.5.1 config file = /home/philipp/.ansible.cfg configured module search path = [u'/home/philipp/.ansible/plugins/modules', u'/usr/share/ansible/plugins/modules'] ansible python module location = /usr/lib/python2.7/dist-packages/ansible executable location = /usr/bin/ansible-galaxy python version = 2.7.17 (default, Feb 27 2021, 15:10:58) [GCC 7.5.0] Using /home/philipp/.ansible.cfg as config file Opened /home/philipp/.ansible_galaxy Processing role collection Opened /home/philipp/.ansible_galaxy Initial connection to galaxy_server: https://galaxy.ansible.com
更新
顯然,它沒有卡住,但超級慢。在輸入問題時,程序繼續。
ansible-galaxy 2.5.1 config file = /home/philipp/.ansible.cfg configured module search path = [u'/home/philipp/.ansible/plugins/modules', u'/usr/share/ansible/plugins/modules'] ansible python module location = /usr/lib/python2.7/dist-packages/ansible executable location = /usr/bin/ansible-galaxy python version = 2.7.17 (default, Feb 27 2021, 15:10:58) [GCC 7.5.0] Using /home/philipp/.ansible.cfg as config file Opened /home/philipp/.ansible_galaxy Processing role collection Opened /home/philipp/.ansible_galaxy Initial connection to galaxy_server: https://galaxy.ansible.com Base API: https://galaxy.ansible.com/api/v1 - downloading role 'collection', owned by https://galaxy.ansible.com/api/v1/roles/?owner__username=&name=collection [WARNING]: - collection was NOT installed successfully: Content has no field named 'owner' ERROR! - you can use --ignore-errors to skip failed roles and finish processing the list.
**解決方案:**將 Ansible 更新為
2.9.26
搜尋警告後,我發現我的 ansible 版本太舊了。在將 ansible 更新為版本後
2.9.26
,安裝 viaansible-galaxy collection install ansible.posix
似乎正在工作。