Foreman installer + array or hash parameters

I cant' figure out how to use foreman installer options which require array
or hash parameters, like this :

foreman-installer --foreman-user-groups=["puppet","sysadmin"]
–puppet-additional-settings='{stringify_facts => false}'

This is not working at all, relative generated configurations in
foreman-installer-answers.yaml look like this :

user_groups:

  • "[puppet,sysadmin]"

additional_settings:
"{stringify_facts => false}":

and in /etc/puppet/puppet.conf
[main]
{stringify_facts => false} = undef

Help plz :slight_smile:

Hello,

for arrays you have to specify the argument multiple times, e.g.

foreman-installer --foreman-user-groups=puppet --foreman-user-groups=sysadmin

for hashes it's similar, you split the key and value by :, e.g.

foreman-installer --puppet-additional-settings=stringify_facts:false

for more information checkout the documentation of underlying framework Kafo
[1]

[1] https://github.com/theforeman/kafo#argument-types

Hope this helps

··· -- Marek

On Thursday 23 of July 2015 03:31:33 Alexandre Barth wrote:

I cant’ figure out how to use foreman installer options which require array
or hash parameters, like this :

foreman-installer --foreman-user-groups=[“puppet”,“sysadmin”]
–puppet-additional-settings=’{stringify_facts => false}’

This is not working at all, relative generated configurations in
foreman-installer-answers.yaml look like this :

user_groups:

  • “[puppet,sysadmin]”

additional_settings:
"{stringify_facts => false}":

and in /etc/puppet/puppet.conf
[main]
{stringify_facts => false} = undef

Help plz :slight_smile:


Marek

Thank you so much, for sure this helps, this solved my problems :slight_smile: