diff options
author | Gan Huang <ghuang@redhat.com> | 2017-09-28 13:46:53 +0800 |
---|---|---|
committer | Tim Bielawa <tbielawa@redhat.com> | 2017-10-19 11:17:02 -0400 |
commit | 2a8af5f9f853dfc7cc0058e9a29d2149d5277d95 (patch) | |
tree | 21b6c33f4997ff41632d47711f7376bfa7808763 /playbooks/common/openshift-cluster | |
parent | 70d7173aef356f834c1d4c7cd533170f13f9f665 (diff) | |
download | openshift-2a8af5f9f853dfc7cc0058e9a29d2149d5277d95.tar.gz openshift-2a8af5f9f853dfc7cc0058e9a29d2149d5277d95.tar.bz2 openshift-2a8af5f9f853dfc7cc0058e9a29d2149d5277d95.tar.xz openshift-2a8af5f9f853dfc7cc0058e9a29d2149d5277d95.zip |
Generate all internal hostnames of no_proxy
Diffstat (limited to 'playbooks/common/openshift-cluster')
-rw-r--r-- | playbooks/common/openshift-cluster/initialize_facts.yml | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/playbooks/common/openshift-cluster/initialize_facts.yml b/playbooks/common/openshift-cluster/initialize_facts.yml index be2f8b5f4..0f563adb7 100644 --- a/playbooks/common/openshift-cluster/initialize_facts.yml +++ b/playbooks/common/openshift-cluster/initialize_facts.yml @@ -145,7 +145,19 @@ 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: "{{ openshift_no_proxy_internal_hostnames | default(None) }}" + + - name: Set fact of no_proxy_internal_hostnames + openshift_facts: + role: common + local_facts: + 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 (',') + }}" + when: + - openshift_http_proxy is defined or openshift_https_proxy is defined + - openshift_generate_no_proxy_hosts | default(True) | bool - name: initialize_facts set_fact repoquery command set_fact: |