From 88238aa357e0115452b290d9b9e854e15dfcaaf6 Mon Sep 17 00:00:00 2001 From: Jan Chaloupka Date: Tue, 25 Jul 2017 14:50:53 +0200 Subject: move common tasks to a single file included by both systemd_units.yml --- .../tasks/config/configure-proxy-settings.yml | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 roles/openshift_node/tasks/config/configure-proxy-settings.yml (limited to 'roles/openshift_node/tasks/config/configure-proxy-settings.yml') diff --git a/roles/openshift_node/tasks/config/configure-proxy-settings.yml b/roles/openshift_node/tasks/config/configure-proxy-settings.yml new file mode 100644 index 000000000..d60794305 --- /dev/null +++ b/roles/openshift_node/tasks/config/configure-proxy-settings.yml @@ -0,0 +1,17 @@ +--- +- name: Configure Proxy Settings + lineinfile: + dest: /etc/sysconfig/{{ openshift.common.service_type }}-node + regexp: "{{ item.regex }}" + line: "{{ item.line }}" + create: true + with_items: + - regex: '^HTTP_PROXY=' + line: "HTTP_PROXY={{ openshift.common.http_proxy | default('') }}" + - regex: '^HTTPS_PROXY=' + line: "HTTPS_PROXY={{ openshift.common.https_proxy | default('') }}" + - regex: '^NO_PROXY=' + line: "NO_PROXY={{ openshift.common.no_proxy | default([]) }},{{ openshift.common.portal_net }},{{ hostvars[groups.oo_first_master.0].openshift.master.sdn_cluster_network_cidr }}" + when: ('http_proxy' in openshift.common and openshift.common.http_proxy != '') + notify: + - restart node -- cgit v1.2.1