Project

General

Profile

Actions

Bug #27054

closed

Ansible playbook is executed as shell script via ssh

Added by Dirk Götz almost 6 years ago. Updated about 3 years ago.

Status:
Resolved
Priority:
High
Assignee:
-
Target version:
-
Difficulty:
Triaged:
Yes
Fixed in Releases:
Found in Releases:

Description

After upgrading to Katello 3.12/Foreman 1.22 and with this to foreman_ansible 3.0.3 Ansible playbooks are not executed any longer, instead it seems like it is transferred to the agent and executed as shell script via ssh resulting in a failure like this (Job "Ansible command", command "id").

 1:
/var/tmp/foreman-ssh-cmd-2d025235-2efe-4f85-b0c6-9990bf1b7bf2/script: Zeile 1: ---: Kommando nicht gefunden.
   2:
/var/tmp/foreman-ssh-cmd-2d025235-2efe-4f85-b0c6-9990bf1b7bf2/script: Zeile 2: -: Kommando nicht gefunden.
   3:
/var/tmp/foreman-ssh-cmd-2d025235-2efe-4f85-b0c6-9990bf1b7bf2/script: Zeile 3: tasks:: Kommando nicht gefunden.
   4:
/var/tmp/foreman-ssh-cmd-2d025235-2efe-4f85-b0c6-9990bf1b7bf2/script: Zeile 4: -: Kommando nicht gefunden.
   5:
uid=0(root) gid=0(root) Gruppen=0(root) Kontext=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023
   6:
/var/tmp/foreman-ssh-cmd-2d025235-2efe-4f85-b0c6-9990bf1b7bf2/script: Zeile 6: register:: Kommando nicht gefunden.
   7:
/var/tmp/foreman-ssh-cmd-2d025235-2efe-4f85-b0c6-9990bf1b7bf2/script: Zeile 7: -: Kommando nicht gefunden.
   8:
Exit status: 127

It was a German system, so "Kommando nicht gefunden" translates to "Command not found" and line 5 was the one containing "id" command so it was executed.

I have set the priority to High because it kills the integration of Ansible completely, but feel free to adjust.

Actions

Also available in: Atom PDF