Bug #11170
closed
foreman-rake: setting complex parameters (arrays, hashes) broken?
Added by Robert Rauch over 9 years ago.
Updated over 6 years ago.
Description
Trying to set complex Foreman parameters (i.e. arrays or hashes) using foreman-rake results in various errors, i.e.
[root@foreman ~]# foreman-rake -- config -k trusted_puppetmaster_hosts -v '[ "foo.bar.com", "foo.baz.org" ]'
rake aborted!
A JSON text must at least contain two octets!
Tasks: TOP => config
(See full trace by running task with --trace)
Another variant:
[root@foreman ~]# foreman-rake -- config -k trusted_puppetmaster_hosts -v '["foo.bar.com", "foo.baz.org"]'
rake aborted!
387: unexpected token at 'foo.bar.com,'
Tasks: TOP => config
(See full trace by running task with --trace)
This works on a dev installation, so I'm pretty sure it's a combination of foreman-rake and ruby193-rake, which both use double quoted strings with su etc to pass commands through.
- Status changed from New to Ready For Testing
- Pull request https://github.com/theforeman/foreman/pull/2562 added
- Pull request deleted (
)
I have provided a PR, which should fix it, as far as the foreman-rake wrapper is concerned. The same issue applies to the ruby193-rake wrapper, which apperently is in use on some Systems (like Centos7). I guess the ruby193-rake wrapper is not controlled by the Foreman guys, so this should probably get fixed upstream.
- Related to Bug #11275: hammer ... list --search with spaces in arg fails on SCL OS added
- Status changed from Ready For Testing to Closed
- % Done changed from 0 to 100
- Assignee set to Dominic Cleal
- Translation missing: en.field_release set to 72
- Pull request https://github.com/theforeman/foreman/pull/2586 added
- Pull request deleted (
https://github.com/theforeman/foreman/pull/2562)
Also available in: Atom
PDF