puppetlabs-inifile
                                
                                 puppetlabs-inifile copied to clipboard
                                
                                    puppetlabs-inifile copied to clipboard
                            
                            
                            
                        Can't set the same key twice
If I want the same key twice in an ini file (which is not, I think, a general property of ini files, but one that Openstack nevertheless uses for certain types), I can't. Can I suggest we use something of the form: value => ['a', 'b', 'c'] ?
(reported via Dan a few weeks ago, but it's not a bug here, so I'm being tidy)
I have misgivings about this one. I'm thrilled that this module has come in handy for openstack, but it's intended to be a really general-purpose module, and I feel a little weird about the idea of adding a feature that explicitly breaks the most-generally-agreed-upon definition of what is and isn't legal in an INI file. I also think that the implementation of this is likely to be fairly ugly. I thought that I'd convinced @bodepd that this didn't seem like a great idea :)
He neglected to inform me of that.
The nice thing about it as suggested is its backward compatible but I sympathise with making the code icky.
Yeah, and to be clear I'm not saying "there is no way we should consider this"... just that my initial instinct is against it.
Hi, I'm currently trying to implement this feature as OpenStack's Ceilometer requires such a config value. I'll propose the eventual implementation here as soon as I have something working and not breaking the current features.
@fcharlier did you ever get a patch working for this?
@bodepd unfortunately I didn't manage to get something to work properly and not break compatibility.
@fcharlier how does the thing that breaks compatibility look like?
@igalic I had at the time managed to get/set keys with multiple values where values were arrays, but I didn't manage to have keys having values using strings & keys having multipe values using arrays.
I also had some problems removing values from multiple-valued keys ...
Hello! We are doing some house keeping and noticed that this issue has been open for a long time.
We're going to close it but please do raise another issue if the issue still persists. 😄
This still persists and would be nice to have. Please reopen, @chelnak.
For example, git's style of ini files allows multiple entries with the same key, so you can't use this module to manage them, have to use exec workarounds.
Same bug report: https://tickets.puppetlabs.com/browse/MODULES-5012
Hello! 👋
This issue has been open for a while and has had no recent activity. We've labelled it with attention-needed so that we can get a clear view of which issues need our attention.
If you are waiting on a response from us we will try and address your comments on a future Community Day.
Alternatively, if it is no longer relevant to you please close the issue with a comment.
reopen
Note: https://github.com/puppetlabs/puppetlabs-inifile/pull/481 seems to be a potential fix for this issue. However, lack of engagement might result in the ticket being closed. Posting link here for future reference, just in case.
would be great to have that feature
I have the same problem. :( In my case I must set something like:
[foo]
bar = 1
bar = 2
Sample application, that need this: https://docs.posit.co/connect/admin/python/#enabling-python-support