southalc / podman

Puppet module for podman
Apache License 2.0
13 stars 30 forks source link

Shell extras #21

Closed Kotty666 closed 3 years ago

Kotty666 commented 3 years ago

In some environments it is necessary to add some special tags for the Podman Image download. In our Case we've to set a specail Proxy Enviornment Variable. This Patch adds the possibilty to add this For example: podman::image { 'image': image => image, flags => { authfile => '/root/auth.json', }, exec_extras => { environment => [ "HTTP_PROXY=http://${proxy_fqdn}:3128", "HTTPS_PROXY=http://${proxy_fqdn}:3128", ], }, }

southalc commented 3 years ago

Thanks for submitting this feature update. I think that merging the new exec_extras hash this way could interfere with the values that are needed when running as a non-root user. I was wondering if you needed to add exec parameters other than 'environment'? If not, maybe we just add 'extra_env' as a parameter and merge it when setting 'exec_defaults'? This should allow using a proxy without impacting the rootless container use case.

southalc commented 3 years ago

'extra_env' has been added as a parameter to the "podman::image" class to enable setting a proxy for image pulls.

Kotty666 commented 3 years ago

@southalc thanks for that and sorry for the delay was to bussy so i've not seen your Question.