13

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.

root が所有していることがわかり/etcますが、ドキュメンテーションには何もすべきであるというメモはありませんchmod

参考のため:

$ ansible --version
ansible 1.8.2
  configured module search path = None

これは予想どおりですか、それとも私のインストールが何らかの形で間違っていますか?

4

3 に答える 3

17

ロールのデフォルトの場所は/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ます。詳細については、ドキュメントを参照してください

于 2014-12-29T00:57:00.547 に答える
2

「sudo」を使用して Ansible をインストールしたのを見たので、「sudo」を使用して ansible-galaxy をインストールしても問題ないと思います。そして、それが私がやったことです。

于 2015-06-10T07:58:28.380 に答える