]> git.apps.os.sepia.ceph.com Git - ceph-ansible.git/commit
container: add optional http(s) proxy option
authorDimitri Savineau <dsavinea@redhat.com>
Tue, 15 Sep 2020 00:13:13 +0000 (20:13 -0400)
committerDimitri Savineau <savineau.dimitri@gmail.com>
Wed, 16 Sep 2020 15:32:24 +0000 (11:32 -0400)
commitfbc375387a3087e76a31488a6d753dd1d16c21bc
treea54555a33e18c7b63c8bada60e6f8c1cdbfe709f
parent13fb83fc938fbe44477112a7d0c2b0c5f7ecb16f
container: add optional http(s) proxy option

When using a http(s) proxy with either docker or podman we can rely on
the HTTP_PROXY, HTTPS_PROXY and NO_PROXY environment variables.
But with ansible, even if those variables are defined in a source file
then they aren't loaded during the container pull/login tasks.
This implements the http(s) proxy support with docker/podman.
Both implementations are different:
  1/ docker doesn't rely en the environment variables with the CLI.
Thos are needed by the docker daemon via systemd.
  2/ podman uses the environment variables so we need to add them to
the login/pull tasks.

Closes: https://bugzilla.redhat.com/show_bug.cgi?id=1876692
Signed-off-by: Dimitri Savineau <dsavinea@redhat.com>
(cherry picked from commit bda3581294c8f29eda598522c331a4c009243884)
group_vars/all.yml.sample
group_vars/rhcs.yml.sample
roles/ceph-container-common/tasks/fetch_image.yml
roles/ceph-container-common/tasks/registry.yml
roles/ceph-container-engine/tasks/pre_requisites/prerequisites.yml
roles/ceph-container-engine/templates/docker-proxy.conf.j2 [new file with mode: 0644]
roles/ceph-defaults/defaults/main.yml