summaryrefslogtreecommitdiffstats
path: root/ansible/roles/docker/templates
diff options
context:
space:
mode:
Diffstat (limited to 'ansible/roles/docker/templates')
-rw-r--r--ansible/roles/docker/templates/RedHat-repos.j27
-rw-r--r--ansible/roles/docker/templates/http-proxy-conf.j22
2 files changed, 9 insertions, 0 deletions
diff --git a/ansible/roles/docker/templates/RedHat-repos.j2 b/ansible/roles/docker/templates/RedHat-repos.j2
new file mode 100644
index 000000000..6d367408c
--- /dev/null
+++ b/ansible/roles/docker/templates/RedHat-repos.j2
@@ -0,0 +1,7 @@
+[dockerrepo]
+name=Docker Repository
+# $releasever for RHEL 7 is '7Server' so we can't use $releasever
+baseurl={{ docker_project_url }}/repo/main/{{ ansible_distribution|lower|regex_replace('redhat', 'centos') }}/{{ ansible_distribution_major_version }}/
+enabled=1
+gpgcheck=1
+gpgkey={{ docker_project_url }}/gpg
diff --git a/ansible/roles/docker/templates/http-proxy-conf.j2 b/ansible/roles/docker/templates/http-proxy-conf.j2
new file mode 100644
index 000000000..854ddfe09
--- /dev/null
+++ b/ansible/roles/docker/templates/http-proxy-conf.j2
@@ -0,0 +1,2 @@
+[Service]
+Environment={% if "http_proxy" in proxy_env %}"HTTP_PROXY={{ proxy_env.http_proxy }}" {% endif %} {% if "https_proxy" in proxy_env %} "HTTPS_PROXY={{ proxy_env.https_proxy }}" {% endif %} {% if "http_proxy" in proxy_env or "https_proxy" in proxy_env %} "NO_PROXY=localhost,127.0.0.0/8" {% endif %}