tl;dr
= OS X用户如何建议解决此权限错误?
我在OS X 10.10.1上,最近安装了运行以下命令的Ansible:
sudo pip install ansible --quiet
sudo pip install ansible --upgrade
我想从一个银河角色开始安装自制软件,然后运行此错误并出现以下错误:
$ ansible-galaxy install geerlingguy.homebrew
- downloading role 'homebrew', owned by geerlingguy
- downloading role from https://github.com/geerlingguy/ansible-role-homebrew/archive/1.0.1.tar.gz
- extracting geerlingguy.homebrew to /etc/ansible/roles/geerlingguy.homebrew
- error: you do not have permission to modify files in /etc/ansible/roles/geerlingguy.homebrew
- geerlingguy.homebrew was NOT installed successfully.
- you can use --ignore-errors to skip failed roles.
虽然我看到我/etc
是root用户,但是我在文档中看不到任何说明我应该做的chmod
事情。
以供参考:
$ ansible --version
ansible 1.8.2
configured module search path = None
这是预期的还是我的安装存在某种错误?
角色的默认位置是/etc/ansible/roles
(对于版本<= 2.3。从v2.4开始,默认位置已更改为~/.ansible/roles/
,引发了问题)。使用--roles-path
时需要指定ansible-galaxy
。内容如下ansible-galaxy install --help
:
-p ROLES_PATH, --roles-path=ROLES_PATH
The path to the directory containing your roles. The
default is the roles_path configured in your
ansible.cfg file (/etc/ansible/roles if not
configured)
您还可以设置roles_path
在ansible.cfg
; 有关详细信息,请参见文档。
本文收集自互联网,转载请注明来源。
如有侵权,请联系[email protected] 删除。
我来说两句