我的服务器上有一个ansible 2.1.0,我通过vagrant和PC 进行部署."部署"角色具有:
- name: upload code
become: true
become_user: www-data
git: repo=git@bitbucket.org:****.git
dest=/var/www/main
key_file=/var/www/.ssh/id_rsa
accept_hostkey=true
update=yes
force=yes
register: fresh_code
notify: restart php-fpm
tags: fresh_code
Run Code Online (Sandbox Code Playgroud)
在这种情况下使用ansible 2.1.0我收到一个错误:
fatal: [default]: FAILED! => {"failed": true, "msg": "Failed to set permissions on the temporary files Ansible needs to create when becoming an unprivileged user. For information on working around this, see https://docs.ansible.com/ansible/become.html#becoming-an-unprivileged-user"}
Run Code Online (Sandbox Code Playgroud)
我在我的电脑上使用它的2.0.1.0,通常都是 - 文件夹/ var/www /有文件夹主要与所有者和组www-data
如果我只使用become_user:www-data,如果我使用become_method:sudo with become_user:www-data - 我得到了同样的错误
需要做些什么来解决这个问题?
我在 centos7 x64 上安装 mitmproxy 时遇到问题。我已经在我的操作系统上安装了:
错误是:
[root@localhost ~]# pip install mitmproxy
Failed building wheel for Pillow
Failed to build Pillow
Installing collected packages: Pillow, construct, html2text, mitmproxy
Running setup.py install for Pillow
Complete output from command /usr/local/bin/python -c "import setuptools, tokenize;__file__='/tmp/pip-build-JmmUK9/Pillow/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-sQcNE2-record/install-record.txt --single-version-externally-managed --compile: …Run Code Online (Sandbox Code Playgroud)