I have imported several Puppet modules and am trying to assign default values via hammer. In general this works, but when the parameter-type is a string the committed value is enclosed in square brackets and double quotes. This is passed directly to the Puppet module with unwelcome results. For example:
$ hammer sc-param update --puppet-class krb5_client --name default_realm --parameter-type string --override true --default-value 'EXAMPLE.COM'
$ hammer sc-pammer sc-param list --puppet-class krb5_client
---|---------------|-------------------------------------|----------|-------------
ID | PARAMETER | DEFAULT VALUE | OVERRIDE | PUPPET CLASS
---|---------------|-------------------------------------|----------|-------------
3 | default_realm | ["EXAMPLE.COM"] | true | krb5_client
At this point Puppet happily sets my Kerberos realm to ["EXAMPLE.COM"]
and Kerberos stops working… If I set the same property using the Foreman web interface it looks like this:
$ hammer sc-param list --puppet-class krb5_client
---|---------------|-------------------------------------|----------|-------------
ID | PARAMETER | DEFAULT VALUE | OVERRIDE | PUPPET CLASS
---|---------------|-------------------------------------|----------|-------------
3 | default_realm | EXAMPLE.COM | true | krb5_client
Notice there’s no square brackets and quotes around the value when it’s set from the web interface. Now Puppet sets everything correctly and life is good. I haven’t been able to figure out how to get this set properly with hammer.
foreman and foreman-cli versions are 1.16.0-1