puppet-property_list_key icon indicating copy to clipboard operation
puppet-property_list_key copied to clipboard

Nested values can't be set individually

Open glarizza opened this issue 13 years ago • 11 comments

Basically, consider a value property like this:

value => {
           [
             {
                'one_key' => 'one_value'
             }
             {
                'two_key' => 'two_value'
             }
             {
                'three_key' => 'three_value'
             }
           [
         }            

If you wanted to manage just ONE of those nested dictionaries, you would have to manage the ENTIRE array of dictionaries or else the provider would clobber the entire file. We need to decide whether we want to just manage individual pieces of a value (probably, yes) or THE ENTIRE VALUE (most likely no). If you managed the entire value, then, in essence, you would have a key/value for the entire file...and plists are long mmmkay.

glarizza avatar Sep 06 '12 00:09 glarizza

I'm having this same problem with persistent-others or persistent-apps. Having the ability to say add a shortcut to my dock would be nice. But this means I'd need to maintain the entire key or if I use something like array-add it would just continuously add the shortcuts on each run.

cdenneen avatar Apr 04 '13 01:04 cdenneen

As an aside - If I recall correctly, I think I remember seeing @jhaals with a solution in Boxen for setting dock items in a specific order (but, of course, I can't find it now)

glarizza avatar Apr 04 '13 01:04 glarizza

I actually gave up trying to do this and started manage the whole dock plist with boxen. It would be awesome to actually do it properly

jhaals avatar Apr 04 '13 05:04 jhaals

I made this - it uses dockutil, so obviously not useful more generally.

grahamgilbert avatar Apr 04 '13 05:04 grahamgilbert

Sweet. Just one thing. action => "add", could this be ensure => present instead? Would be nice to keep it the puppet way.

jhaals avatar Apr 04 '13 07:04 jhaals

Yes, have moved this into it's own issue

grahamgilbert avatar Apr 04 '13 07:04 grahamgilbert

Thanks @grahamgilbert - that's the thing I was thinking of!

glarizza avatar Apr 04 '13 18:04 glarizza

Thanks guys… yeah actually grabbed dockutil last night. Graham is there support for the After or Before part vs the Position?

https://github.com/kcrawford/dockutil

On Apr 4, 2013, at 2:05 PM, Gary Larizza [email protected] wrote:

Thanks @grahamgilbert - that's the thing I was thinking of!

— Reply to this email directly or view it on GitHub.

cdenneen avatar Apr 04 '13 21:04 cdenneen

Not yet, but file an issue on the repo and I'll see what I can do.

On 4 Apr 2013, at 10:57 PM, cdenneen [email protected] wrote:

Thanks guys… yeah actually grabbed dockutil last night. Graham is there support for the After or Before part vs the Position?

https://github.com/kcrawford/dockutil

On Apr 4, 2013, at 2:05 PM, Gary Larizza [email protected] wrote:

Thanks @grahamgilbert - that's the thing I was thinking of!

— Reply to this email directly or view it on GitHub.

— Reply to this email directly or view it on GitHubhttps://github.com/glarizza/puppet-property_list_key/issues/4#issuecomment-15926633 .

grahamgilbert avatar Apr 05 '13 05:04 grahamgilbert

I'd also like to add my vote for being able to manage nested values individually.

ahrenstein avatar Dec 11 '14 21:12 ahrenstein

Yeah, this is pretty important for me as well.

jantman avatar Sep 14 '15 15:09 jantman