From ba71b2fbc81abc60bb47883ea2a0062201563330 Mon Sep 17 00:00:00 2001 From: William Wernert Date: Mon, 8 Mar 2021 17:36:34 -0500 Subject: [PATCH] Change proxy Jinja logic (none and empty string are falsy) --- salt/idstools/init.sls | 2 +- salt/yum/etc/yum.conf.jinja | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/salt/idstools/init.sls b/salt/idstools/init.sls index eaf91bd58..725520928 100644 --- a/salt/idstools/init.sls +++ b/salt/idstools/init.sls @@ -72,7 +72,7 @@ so-idstools: - image: {{ MANAGER }}:5000/{{ IMAGEREPO }}/so-idstools:{{ VERSION }} - hostname: so-idstools - user: socore - {% if proxy != '' and proxy is not none %} + {% if proxy %} - environment: - http_proxy={{ proxy }} - https_proxy={{ proxy }} diff --git a/salt/yum/etc/yum.conf.jinja b/salt/yum/etc/yum.conf.jinja index d381f120f..506036421 100644 --- a/salt/yum/etc/yum.conf.jinja +++ b/salt/yum/etc/yum.conf.jinja @@ -14,6 +14,6 @@ distroverpkg=centos-release clean_requirements_on_remove=1 {% if (grains['role'] not in ['so-eval','so-managersearch', 'so-manager', 'so-standalone']) and salt['pillar.get']('global:managerupdate', '0') -%} proxy=http://{{ salt['pillar.get']('yum:config:proxy', salt['config.get']('master')) }}:3142 -{% elif proxy != '' and proxy is not none -%} +{% elif proxy -%} proxy={{ proxy }} {% endif %}