Upgrade to Foreman 1.17 converts YAML to JSON Hash
We have Puppet parameters with the type hash and a YAML hash as content (this is valid per Foreman documentation).
After the run of db:migrate the content gets migrated to a JSON hash.
If I extract an example value from the DB:
--- frequency: daily
I see two solutions:
1. Change the db:migrate task that migrates valid YAML hashes to JSON hashes.
2. Update the documentation that YAML hashes are no longer valid.
#2 Updated by Frederik Weber 4 months ago
#9 Updated by Thomas BAERT about 1 month ago
parameter.value is a ruby Hash when Lookup_value type is Yaml/Hash in Foreman.
You convert it in String with to.s.
But you don't convert this String in Hash before update_attribute.
So YAML content is replaced by the String 'ruby Hash'.
Same problem with Array in Foreman (it's a ruby Array).
And same problem for LookupKey.default_value (https://github.com/theforeman/foreman/blob/1.17-stable/db/migrate/20170112175131_migrate_template_to_parameters_macros.rb#L25).