问题原文
原帖链接 · Federico Nafria · CC BY-SA 3.0
I'm having problems instaling plugins with ansible-galaxy.
I've tried 3 things:
Instaling without sudo:
ansible-galaxy install sfromm.epel
[WARNING]: - sfromm.epel was NOT installed successfully: Could not update files in /etc/ansible/roles/sfromm.epel: [Errno 13] Permission denied: '/etc/ansible/roles/sfromm.epel'
Nothing weird here, obviously my user can't write in that folder.
Instaling with sudo su:
$ sudo su
root@notebook# ansible-galaxy install sfromm.epel
- ...
- sfromm.epel was installed successfully
As you can see I'm able to install the plugin this way.
Instaling with sudo:
Here is where I don't understand what is happening.
$ sudo ansible-galaxy install sfromm.epel
[WARNING]: - sfromm.epel was NOT installed successfully: The API server (https://galaxy.ansible.com/api/) is not responding, please try again later
sudo curl https://galaxy.ansible.com/api/ responds OK. I'm not behind a proxy.
Could it be a problem with certificates since the API is https? How can I know where does ansible pick those from?
已采纳解答
原帖链接 · David · CC BY-SA 3.0
I'm seeing the same thing. I worked around it by setting ansible_roles=~/.ansible/roles in my ~/.ansible.cfg file and installing the roles without the need for sudo. Does installing them in a system-wide even make sense in most cases? Still, it's annoying and worked in previous versions of ansible (I'm using 2.1.0.0).
摘自公开归档,保留原文语言,版式经整理,外部媒体与邮箱地址已移除。
