在 Windows 服务器上运行 rundeck ansible 任务

问题描述 投票:0回答:1

我尝试在 Windows 上运行 Rundeck ansible 任务。发生以下错误:“

{"changed": false, "msg": "Failed to create temporary directory. In some cases, you may have been able to authenticate and did not have permissions on the target directory. Consider changing the remote tmp path in ansible.cfg to a path rooted in \"/tmp\", for more error information use -vvv. Failed command was: ( umask 77 && mkdir -p \"` echo ~/.ansible/tmp `\"&& mkdir \"` echo ~/.ansible/tmp/ansible-tmp-xxxxxxx `\" && echo ansible-tmp-xxxxxxxx=\"` echo ~/.ansible/tmp/ansible-tmp-xxxxx `\" ), exited with result 1", "unreachable": true}

如果我通过 CLI 运行相同的 ansible 代码,一切正常。此外,节点发现在 rundeck 中运行良好。

我与 Windows 服务器的连接是通过 SSH 完成的。我不使用 WinRM。

我该如何解决这个问题?

这是我的“Ansible Playbook 内联工作流程节点步骤”

- name: Example from an Ansible Playbook
  hosts: server1
  tasks:
  - win_ping:

我的 Rundeck 项目配置:

project.ansible-binaries-dir-path=/usr/bin
project.ansible-config-file-path=/etc/ansible/ansible.cfg
project.ansible-generate-inventory=true
project.ansible-ssh-auth-type=privateKey
project.ansible-ssh-key-storage-path=keys/project/TestProject/Ansible_Test
project.ansible-ssh-passphrase-option=option.password
project.ansible-ssh-user=ansible
project.ansible-windows-executable=powershell.exe
project.description=
project.disable.executions=false
project.disable.schedule=false
project.execution.history.cleanup.batch=500
project.execution.history.cleanup.enabled=false
project.execution.history.cleanup.retention.days=60
project.execution.history.cleanup.retention.minimum=50
project.execution.history.cleanup.schedule=0 0 0 1/1 \* ? \*
project.jobs.gui.groupExpandLevel=1
project.keep-alive-max-alive-count=5
project.label=
project.later.executions.disable=false
project.later.executions.enable=false
project.later.schedule.disable=false
project.later.schedule.enable=false
project.name=TestProject
project.nodeCache.enabled=true
project.nodeCache.firstLoadSynch=true
project.output.allowUnsanitized=false
project.retry-counter=3
project.ssh-authentication=privateKey
resources.source.1.config.ansible-gather-facts=true
resources.source.1.config.ansible-ignore-errors=true
resources.source.1.config.ansible-inventory=/etc/rundeck/ansible_repo.yml
resources.source.1.config.ansible-ssh-auth-type=privateKey
resources.source.1.config.ansible-ssh-key-storage-path=keys/project/TestProject/Ansible_Test
resources.source.1.config.ansible-ssh-user=ansible
resources.source.1.type=com.batix.rundeck.plugins.AnsibleResourceModelSourceFactory
resources.source.2.type=local
service.FileCopier.default.provider=sshj-scp
service.NodeExecutor.default.provider=com.batix.rundeck.plugins.AnsibleNodeExecutor
ansible rundeck
1个回答
0
投票

您检查过 Ci 内的配置路径是如何设置的吗?

您是否还尝试创建一个新的 ansible 实例,在其中更改 tmp 路径以反映并匹配 ansible 剧本,就像错误消息提示的那样?

© www.soinside.com 2019 - 2024. All rights reserved.