This message was deleted.
# puppet
s
This message was deleted.
y
I’d manage the whole file instead
m
That file unfortunately also contains auths from docker registries which I cannot overwrite.
Hence I need to make sure to only manage the proxies.
My other idea was to try to build something with Deferred functions, but I guess that won't solve it.
y
I’d move the registry credentials to some other store using
credsStore
JSON option or with credentials helper.. and then I’d manage the whole file 🙂
though.. I’d configure registry creds with Puppet too
I understand your env is different and you have some reasons behind.. but maybe different credentials store can help you
m
I do have registry creds with puppet too. But some users tend to still put their own 😉
y
then I’d go with separate cred store
m
Actually sounds good 🙂
@Yury Bushmelev: In case you wondered. I now solved it with the follwing (seperate cred store did not work due to more "local" settings in the file):
$existing_settings = Deferred('loadjson', ['/opt/jenkins/.docker/config.json', {} ])
$merged_settings = Deferred('deep_merge', [$existing_settings, $settings])
file { '/opt/jenkins/.docker/config.json':
content => Deferred('to_json_pretty', [$merged_settings]),
}
👍🏻 1
I was not aware of the "loadjson" file in stdlib.
y
ah, so you deferred it to the agent side.. nice trick! thank you for sharing!