summaryrefslogtreecommitdiffstats
path: root/roles/openshift_facts/tasks
diff options
context:
space:
mode:
authorScott Dodson <sdodson@redhat.com>2016-02-11 11:42:59 -0500
committerScott Dodson <sdodson@redhat.com>2016-04-22 15:28:53 -0400
commit1d467d5a34f446459dc5035b1ec7210fecce9931 (patch)
tree2f7bcea8ef45bee7dc6a96e43fb286e2903d5dad /roles/openshift_facts/tasks
parent7cb05911b4214bfb75abf65dd19a55f73fe09982 (diff)
downloadopenshift-1d467d5a34f446459dc5035b1ec7210fecce9931.tar.gz
openshift-1d467d5a34f446459dc5035b1ec7210fecce9931.tar.bz2
openshift-1d467d5a34f446459dc5035b1ec7210fecce9931.tar.xz
openshift-1d467d5a34f446459dc5035b1ec7210fecce9931.zip
Add global proxy configuration
Configures HTTP_PROXY, HTTPS_PROXY, NO_PROXY for master and docker services. Configugres BuildDefaults Admission controller for master to automatically insert proxy environment configuration into build environments. To use set at least these variables - openshift_http_proxy - openshift_https_proxy NO_PROXY entries will automatically be configured for hostnames of all openshift hosts. You may specify additional NO_PROXY hosts or patterns by setting `openshift_no_proxy` If you wish to disable automatic generation of NO_PROXY hosts you may set `openshift_generate_no_proxy_hosts` to False. If you wish to have different builddefaults proxy configuration than baseline proxy configuration set these variables - openshift_builddefaults_http_proxy - openshift_builddefaults_https_proxy - openshift_builddefaults_no_proxy - openshift_builddefaults_git_http_proxy - openshift_builddefaults_git_https_proxy
Diffstat (limited to 'roles/openshift_facts/tasks')
-rw-r--r--roles/openshift_facts/tasks/main.yml15
1 files changed, 15 insertions, 0 deletions
diff --git a/roles/openshift_facts/tasks/main.yml b/roles/openshift_facts/tasks/main.yml
index 36def57c8..7510e4e39 100644
--- a/roles/openshift_facts/tasks/main.yml
+++ b/roles/openshift_facts/tasks/main.yml
@@ -33,3 +33,18 @@
is_containerized: "{{ l_is_containerized | default(None) }}"
public_hostname: "{{ openshift_public_hostname | default(None) }}"
public_ip: "{{ openshift_public_ip | default(None) }}"
+
+# had to be done outside of the above because hostname isn't yet set
+- name: Gather hostnames for proxy configuration
+ openshift_facts:
+ role: common
+ local_facts:
+ http_proxy: "{{ openshift_http_proxy | default(None) }}"
+ https_proxy: "{{ openshift_https_proxy | default(None) }}"
+ no_proxy: "{{ openshift_no_proxy | default(None) }}"
+ generate_no_proxy_hosts: "{{ openshift_generate_no_proxy_hosts | default(True) }}"
+ no_proxy_internal_hostnames: "{{ hostvars | oo_select_keys(groups['oo_nodes_to_config']
+ | union(groups['oo_masters_to_config'])
+ | union(groups['oo_etcd_to_config'] | default([])))
+ | oo_collect('openshift.common.hostname') | default([]) | join (',')
+ }}"