gpt4 book ai didi

ansible - .ansible/tmp/ansible-tmp-* 权限被拒绝

转载 作者:行者123 更新时间:2023-12-03 14:42:36 24 4
gpt4 key购买 nike

尽管用户是 sudo 用户,但远程主机在运行 Ansible playbook 时仍会引发错误。

"/usr/bin/python: can't open file '/home/ludd/.ansible/tmp/ansible-tmp-1466162346.37-16304304631529/zypper'

最佳答案

对我有用的修复方法是更改​​ ansibles 的路径 remote_tmp目录,在 ansibles 的配置文件中,例如

# /etc/ansible/ansible.cfg
remote_tmp = /tmp/${USER}/ansible

数据化信息可查阅 here .

注意 :Ansible Configuration Settings 可以在一个配置文件中进行设置和使用,该文件将按以下顺序搜索:
  • ANSIBLE_CONFIG (如果设置了环境变量)
  • ansible.cfg (在当前目录中)
  • ~/.ansible.cfg (在主目录中)
  • /etc/ansible/ansible.cfg

  • https://docs.ansible.com/ansible/latest/reference_appendices/config.html#the-configuration-file

    关于ansible - .ansible/tmp/ansible-tmp-* 权限被拒绝,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/37880491/

    24 4 0
    Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
    广告合作:1813099741@qq.com 6ren.com