Fix Docker Settings on new installs

This commit is contained in:
TOoSmOotH
2020-12-17 15:21:29 -05:00
parent 1f523deaea
commit d99596ad06
3 changed files with 9 additions and 3 deletions

View File

@@ -1,5 +1,5 @@
{%- set DOCKERRANGE = salt['pillar.get']('docker:range') %}
{%- set DOCKERBIND = salt['pillar.get']('docker:bip') %}
{%- set DOCKERRANGE = salt['pillar.get']('docker:range'), '172.17.0.0/24' %}
{%- set DOCKERBIND = salt['pillar.get']('docker:bip'), '172.17.0.1/24' %}
{
"registry-mirrors": [ "https://:5000" ],
"bip": "{{ DOCKERBIND }}",

View File

@@ -291,7 +291,7 @@ rc3_to_2.3.0() {
INSTALLEDVERSION=2.3.0
}
2.3.0_to_2.3.20(){
2.3.0_to_2.3.20(){DOCKERSTUFFBIP=$(echo $DOCKERSTUFF | awk -F'.' '{print $1,$2,$3,1}' OFS='.')/24
# Remove PCAP from global
sed '/pcap:/d' /opt/so/saltstack/local/pillar/global.sls
sed '/sensor_checkin_interval_ms:/d' /opt/so/saltstack/local/pillar/global.sls

View File

@@ -1199,6 +1199,9 @@ manager_global() {
if [ -z "$DOCKERNET" ]; then
DOCKERNET=172.17.0.0
DOCKERBIP=$(echo $DOCKERNET | awk -F'.' '{print $1,$2,$3,1}' OFS='.')/24
else
DOCKERBIP=$(echo $DOCKERNET | awk -F'.' '{print $1,$2,$3,1}' OFS='.')/24
fi
# Create a global file for global values
@@ -1346,6 +1349,9 @@ manager_global() {
" playbook:"\
" rulesets:"\
" - windows"\
"docker:"\
" range: '$DOCKERNET/24'"\
" bip: '$DOCKERBIP"
"redis_settings:"\
" redis_maxmemory: 812" >> "$global_pillar"