From a691427480c3a8cad60b275d47d7ddbde1c26f64 Mon Sep 17 00:00:00 2001 From: Maciej Skrocki Date: Fri, 1 Sep 2017 15:33:53 -0700 Subject: Introduced ansible playbook to setup NSB. Change-Id: I5865cd50d5fde26e9e9fc265d4385372d668413f Signed-off-by: Maciej Skrocki Signed-off-by: Ross Brattain --- ansible/roles/docker/templates/RedHat-repos.j2 | 7 +++++++ ansible/roles/docker/templates/http-proxy-conf.j2 | 2 ++ 2 files changed, 9 insertions(+) create mode 100644 ansible/roles/docker/templates/RedHat-repos.j2 create mode 100644 ansible/roles/docker/templates/http-proxy-conf.j2 (limited to 'ansible/roles/docker/templates') 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 %} -- cgit 1.2.3-korg