]> 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:14 +0000 (11:32 -0400)
commit8f175eb60c6fad0678297114630e7b0e99a400ec
tree3499a1204ddd9050c2b10a8497d838f18a5800bf
parent95a073cb3b54022db46da662d92f48250ba50507
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