0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

【ansible】Failed to set permissions on the temporary files Ansible needs to create when becoming an unprivileged user

Posted at

エラー

ssh ユーザーと実行ユーザーを変更して ansible playbook を実行したら、一時ファイルの権限エラーが発生してしまった

hosts.ini
ansible_ssh_user=my_ssh_user
ansible_user=execute_user
ansible_become_user=execute_user
ansible_become_pass=execute_user_pass
app_env=dokka
error.
Failed to set permissions on the temporary files Ansible needs to create when becoming an unprivileged user

解決

ansible.cfg の pipelining を True に設定することで解決した

ansible.cfg
[defaults]
...
pipelining = True ;こいつ追加

pipeliningTrue に設定すると、サーバーにファイル転送を行わず実行するようになるため、一時ファイルの権限エラーを回避できる。また、ファイル転送がなくなるため、パフォーマンスが大幅に向上するらしい。しかし、サーバーの設定によっては使えないようなので要確認。

参考

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?