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 #1

Updated by Dirk Götz almost 6 years ago

  • Triaged changed from No to Yes
  • Pull request https://github.com/theforeman/foreman-packaging/pull/3816 added

Will be fixed with foreman_remote_execution-1.8.0 hitting the 1.22 repository.

Actions #2

Updated by Dirk Götz almost 6 years ago

  • Status changed from New to Resolved
  • Fixed in Releases foreman-ansible 3.0.3 added

Resolved by now.

Actions #3

Updated by Ralph Passgang almost 6 years ago

I am also hitting this bug in our ubuntu 18.04. foreman installation. I already tried to update foreman_remote_execution manually via gem.

This are all packages installed with "foreman" in it's name:

$ dpkg -l |grep foreman |grep ii
ii foreman 1.21.3-1 amd64 Systems management web interface
ii foreman-cli 1.21.0-1 all metapackage providing hammer CLI for Foreman
ii foreman-debug 1.21.0-1 all provides support utility foreman-debug.
ii foreman-installer 1.21.0-1 all Automated puppet-based installer for The Foreman
ii foreman-libvirt 1.21.3-1 all metapackage providing libvirt dependencies for Foreman
ii foreman-postgresql 1.21.3-1 all metapackage providing PostgreSQL dependencies for Foreman
ii foreman-proxy 1.21.0-1 all RESTful proxies for DNS, DHCP, TFTP, and Puppet
ii ruby-foreman-ansible 2.3.5-1 all Foreman Ansible plugin
ii ruby-foreman-deface 1.3.2-1 all Foreman Deface Plugin Dependency
ii ruby-foreman-remote-execution 1.7.0-1 all Foreman Remote Execution Plugin
ii ruby-foreman-remote-execution-core 1.1.3-1 all Foreman remote execution - core bits
ii ruby-foreman-tasks 0.14.5-2 all Tasks management engine for Foreman.
ii ruby-foreman-tasks-core 0.2.6-1 all Foreman tasks - core bits
ii ruby-hammer-cli-foreman 0.16.0-1 all Foreman commands for Hammer

And here the gems:

$ gem list |grep foreman
foreman-tasks (0.15.6)
foreman-tasks-core (0.2.6)
foreman_remote_execution (1.8.1)
foreman_remote_execution_core (1.1.3)
hammer_cli_foreman (0.16.0)

I also tried removing the deb package for ruby-foreman-remote-execution, so that only the gem version (1.8.1) is available. But it doesn't seem to fix the problem for me.

Any advise how to fix this problem? What can I do to have foreman-ansible working correctly?

Actions #4

Updated by Adam Ruzicka almost 6 years ago

I don't believe what you're describing is the same bug. The original bug was caused by ansible 3.something depending on remote execution 1.8. In 1.21 repos there's only foreman ansible 2.3.5 which should work fine.

It looks like you're missing the ruby-foreman-ansible-core package, could you try installing it, restarting services and try running a job?

Actions #5

Updated by Winter Ramirez almost 4 years ago

An issue of the charge is filed for the optional ambit for the themes. The holder of the custom coursework writing for the ways. The reformist filed for the noticed enduring means for all offers. The personality clash is fit for the problematic issues for the solution.

Actions #6

Updated by Sara Novello about 3 years ago

Mothers are often the glue that keeps the family together. Home is considered by [url=https://chinesebuffetnearmenow.net/sunday-brunch-near-me/]Sunday Brunch Near Me[/url] adult children to be where their mother is, especially if she still lives in the family home. A mom will often feel best when all the family gathers to her own house to observe this special day. However, if this is what the larger family decides to do they must also make a plan to provide everything necessary to offer a tea, a brunch or a dinner?

Actions #7

Updated by Raymond Ackles about 3 years ago

Playing out your own brake work is one of the greatest cash savers for the DIY specialis https://www.mumsports.com/calipers-paint

Actions

Also available in: Atom PDF