diff --git a/salt/idstools/init.sls b/salt/idstools/init.sls index 2d3128797..f65f93a7a 100644 --- a/salt/idstools/init.sls +++ b/salt/idstools/init.sls @@ -19,6 +19,7 @@ {% set IMAGEREPO = salt['pillar.get']('global:imagerepo') %} {% set MANAGER = salt['grains.get']('master') %} {% set ENGINE = salt['pillar.get']('global:mdengine', '') %} +{% set proxy = salt['pillar.get']('manager:proxy') %} # IDSTools Setup idstoolsdir: file.directory: @@ -71,6 +72,12 @@ so-idstools: - image: {{ MANAGER }}:5000/{{ IMAGEREPO }}/so-idstools:{{ VERSION }} - hostname: so-idstools - user: socore + {% if proxy is not none %} + - environment: + - http_proxy={{ proxy }} + - https_proxy={{ proxy }} + - no_proxy={{ salt['pillar.get']('manager:no_proxy') }} + {% endif %} - binds: - /opt/so/conf/idstools/etc:/opt/so/idstools/etc:ro - /opt/so/rules/nids:/opt/so/rules/nids:rw diff --git a/setup/so-functions b/setup/so-functions index 8057500be..54f22cc44 100755 --- a/setup/so-functions +++ b/setup/so-functions @@ -1482,6 +1482,7 @@ manager_pillar() { " mainip: '$MAINIP'"\ " mainint: '$MNIC'"\ " proxy: '$so_proxy'"\ + " no_proxy: '$no_proxy_string'"\ " esheap: '$ES_HEAP_SIZE'"\ " esclustername: '{{ grains.host }}'"\ " freq: 0"\ @@ -2252,7 +2253,7 @@ set_path() { set_proxy() { # Don't proxy localhost, local ip, and management ip - local no_proxy_string="localhost, 127.0.0.1, ${MAINIP}, ${HOSTNAME}" + no_proxy_string="localhost, 127.0.0.1, ${MAINIP}, ${HOSTNAME}" # Set proxy environment variables used by curl, wget, docker, and others {