Groups keyboard shortcuts have been updated
Dismiss
See shortcuts

Running Rundeck ansible task on windows

53 views
Skip to first unread message

Neodym

unread,
Dec 18, 2024, 4:34:06 PM12/18/24
to rundeck-discuss
I try to run an Ansible task via rundeck on windows.
The following error is occuring:
"UNREACHABLE! => {"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-1734505545.0886757-9922-188699859556892 `\" && echo ansible-tmp-1734505545.0886757-9922-188699859556892=\"` echo ~/.ansible/tmp/ansible-tmp-1734505545.0886757-9922-188699859556892 `\" ), exited with result 1", "unreachable": true}"

If i ran the same ansible job via Bash, everything runs fine. Also the discovery of the node in Rundeck works fine, no error.

How can i fix this issue?

rac...@rundeck.com

unread,
Dec 18, 2024, 5:07:53 PM12/18/24
to rundeck-discuss

Hi,

Can you test defining the Windows vars like this post in your inventory and reference that inventory in your model source? 

It seems that your Ansible model source "Thinks" that the remote machine is a Linux-based node.

Regards.

Message has been deleted

Neodym

unread,
Dec 19, 2024, 2:10:50 AM12/19/24
to rundeck-discuss
Hello,

here is my inventory file:
all:
  hosts:
    server1:
      ansible_host: 10.0.0.200
      ansible_shell_type: powershell
      ansible_user: ansible
      ansible_pipelining: true
      ansible_remote_tmp: C:\Temp
    ServerLinux:
      ansible_host: 10.1.10.222
      ansible_user: ansible

Everything in Nodes will be discovered without any issue.

Neodym

unread,
Dec 19, 2024, 8:15:55 AM12/19/24
to rundeck-discuss
The connection to the windows Server will be done via SSH not with WinRM. Is this maybe the issue?

rac...@rundeck.com

unread,
Jan 6, 2025, 8:30:28 AMJan 6
to rundeck-discuss
Hi,

What about your node executor and file copier? Are they configured with "Ansible Ad-Hoc Node Executor" / "Ansible File Copier"?

Regards.
Reply all
Reply to author
Forward
0 new messages