viasite-ansible / ansible-role-zsh

Setup antigen with oh-my-zsh, powerlevel10k theme, fzf, autosuggestions, syntax-highlighting
https://habrahabr.ru/post/323496/
MIT License
347 stars 85 forks source link

Installer for user fails: Permission denied #19

Closed popstas closed 4 years ago

popstas commented 7 years ago

While provision role for root ansible creates directory in user directory with owner root. Then provision from user fails:

TASK [viasite-ansible.zsh : Clone antigen master] ******************************
fatal: [localhost]: FAILED! => {"changed": false, "cmd": "/usr/bin/git clone --origin origin https://github.com/zsh-users/antigen.git /home/popstas/.antigen/antigen", "failed": true, "msg": "fatal: could not create work tree dir '/home/popstas/.antigen/antigen': Permission denied", "rc": 128, "stderr": "fatal: could not create work tree dir '/home/popstas/.antigen/antigen': Permission denied\n", "stderr_lines": ["fatal: could not create work tree dir '/home/popstas/.antigen/antigen': Permission denied"], "stdout": "", "stdout_lines": []}
        to retry, use: --limit @/tmp/zsh.retry
popstas commented 7 years ago

Quick fix:

$ sudo chown -R popstas:popstas .ansible .ansible_galaxy .antigen .antigen_plugin_lastupdate .antigen_system_lastupdate .bookmarks .cache
popstas commented 4 years ago

Fixed in #29 ?