Project

General

Profile

Actions

Bug #16107

closed

Cannot render snippet due to .join call

Added by Daniel Lobato Garcia over 8 years ago. Updated over 6 years ago.

Status:
Closed
Priority:
Normal
Category:
Foreman
Target version:
Fixed in Releases:
Found in Releases:

Description

Currently Foreman is failing to render the REX snippet with this error: "The snippet 'remote_execution_ssh_keys' threw an error: undefined method `join' for #<String:0x007f4775c597e8>"

From what I see https://github.com/theforeman/community-templates/blob/develop/snippets/remote_execution_ssh_keys.erb#L30 , the parameter is expected to be an array or similar.
The docs say nothing about it - https://theforeman.org/plugins/foreman_remote_execution/0.3/index.html - and there's no way for the user to set the parameter as Array as a global param or a host param.

The 'expected' Array comes from the plugin itself who queries all proxies for the param - https://github.com/theforeman/foreman_remote_execution/blob/0c722f8ecb96a94f6f74db30e0305d3f37fde7cf/app/models/concerns/foreman_remote_execution/host_extensions.rb

I propose making the method in REX return a string so that we can: * remove the `join` call from the template * allow people to set their own SSH keys via global params

Actions

Also available in: Atom PDF