Closed Kotty666 closed 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.
'extra_env' has been added as a parameter to the "podman::image" class to enable setting a proxy for image pulls.
@southalc thanks for that and sorry for the delay was to bussy so i've not seen your Question.
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", ], }, }