Bug #15111
closed
"!ruby/string:HighLine::String" in answers when using interactive mode
Description
I'm in the process of migrating to Puppet4, so after installing puppet-agent, I deleted my old answers file, ran "foreman-installer -i", edited some values and ran the installer. It failed because some edited values had a "!ruby/string:HighLine::String " prefix, see:
/etc/foreman-installer/scenarios.d/foreman-answers.yaml:
db_host: !ruby/string:HighLine::String marduk.kvedulv.de db_password: !ruby/string:HighLine::String xxx
Updated by Dominic Cleal almost 9 years ago
- Status changed from New to Assigned
- Assignee set to Dominic Cleal
Updated by Dominic Cleal almost 9 years ago
Which version of HighLine do you have installed? I can't reproduce it under 1.7.8.
Updated by Anonymous almost 9 years ago
1.6.21 from Debian/jessie. I think at least on one string I did use the backspace key, maybe that's a problem?
Updated by Dominic Cleal almost 9 years ago
Thanks, I can reproduce it now on that version and have a simple fix for it. I am seeing an issue with the YAML file where these strings are being base64-encoded, but not decoded - are your strings encoded too?
e.g.
2.0.0-p247 :021 > YAML.load([HighLine::String.new("test")].to_yaml) => ["dGVzdA=="]
$ cat config/answers.yaml --- test2: foo: !ruby/string:HighLine::String |- ZXhhbXBsZQ==
Updated by Anonymous almost 9 years ago
I don't think so... the two lines in my example were pasted straight from the answers file.
Updated by The Foreman Bot almost 9 years ago
- Status changed from Assigned to Ready For Testing
- Pull request https://github.com/theforeman/kafo/pull/156 added
Updated by Dominic Cleal almost 9 years ago
I switched from Ruby 2.0.0-p247 to 2.1.5 and the Base64 issue went away, so must be some interaction between Ruby/HighLine versions, so some separate issue (which updating Ruby or HighLine fixes).
Updated by Dominic Cleal almost 9 years ago
- Status changed from Ready For Testing to Closed
- % Done changed from 0 to 100
Applied in changeset 7be4cacac2a7cc9c76d5132c37c8bd3ca82b3df5.
Updated by Dominic Cleal over 8 years ago
- Related to Bug #16830: HighLine::String inside arrays not replaced in parameter values added