Details
-
Task
-
Status: Resolved
-
Normal
-
Resolution: Fixed
-
None
-
None
Description
Right now, when you run `puppet config print server_list`, you get a gross looking array. This should print what you see in `puppet.conf`, a comma separated list of servers. Not the strange ruby array we get now
[1] Melissa@bubba:/Users/Melissa/puppet:(5.5.x)$ be ./bin/puppet config set server_list server_list_1,server_list_2
|
[0] Melissa@bubba:/Users/Melissa/puppet:(5.5.x)$ be ./bin/puppet config print server_list
|
[["server_list_1"], ["server_list_2"]]
|
[0] Melissa@bubba:/Users/Melissa/puppet:(5.5.x)$ cat ~/.puppetlabs/etc/puppet/puppet.conf
|
[main]
|
server = server1
|
server_list = server_list_1,server_list_2
|
It looks like this is a more general problem for settings that derive from `:array`.
All of this is from josh's comment:
https://github.com/puppetlabs/puppet/pull/7384#issuecomment-462976534
to quote him,
I'd expect the `ArraySetting` to implement `print` to join using comma:
def print(value) vals = super(value) vals.join(',') endAnd for `ServerListSetting` to override it so that each host and optional port are first joined with ':', and then that result is comma-joined:
def print(value)vals = munge(value)
super(vals.map { |v| v.join(':') }) end