Rundeck无法执行ansible命令/ playbooks

时间:2017-03-25 02:22:35

标签: ansible rundeck

我有一个ansible playbook,可以从快照中恢复MySQL RDS。如果从命令行手动运行,则playbook运行良好并执行任务。但是当通过rundeck的Web界面运行时,遇到以下错误,

fatal: [localhost]: UNREACHABLE! => {"changed": false, "msg": "Authentication or permission failure. In some cases, you may have been able to authenticate and did not have permissions on the remote directory. Consider changing the remote temp path in ansible.cfg to a path rooted in \"/tmp\". Failed command was: ( umask 77 && mkdir -p \"` echo $HOME/.ansible/tmp/ansible-tmp-1491222004.1-29099027555878 `\" && echo ansible-tmp-1491222004.1-29099027555878=\"` echo $HOME/.ansible/tmp/ansible-tmp-1491222004.1-29099027555878 `\" ), exited with result 1", "unreachable": true}

我在同一Ansible服务器上的Rundeck服务器

我尝试在ansible.cfg

中添加以下行
remote_tmp = $HOME/.ansible/tmp
local_tmp = $HOME/.ansible/tmp

我已经为$ HOME / .ansible / tmp设置了特权1777,但它并没有解决我的问题。 能否请你帮忙? 感谢!!!

1 个答案:

答案 0 :(得分:0)

在ansible.cfg中设置它们:

local s=[[
    pza=A1
    pzb=B2
    pzc=D3
]]

local t= {}
for k,v in s:gmatch('(%w+)=(%w+)') do
  t[k]=v
  print(k,t[k])
end

Ansible issue #21339

相关问题