From d97e13b473a41b998705e62842dfcda2c2577dfe Mon Sep 17 00:00:00 2001 From: m0duspwnens Date: Wed, 16 Nov 2022 14:47:40 -0500 Subject: [PATCH] add /24 back to default bip, rever daemon.json --- salt/common/files/daemon.json | 13 ++++++++++++- setup/so-functions | 4 ++-- 2 files changed, 14 insertions(+), 3 deletions(-) diff --git a/salt/common/files/daemon.json b/salt/common/files/daemon.json index c2a2bfedb..ff6f930bf 100644 --- a/salt/common/files/daemon.json +++ b/salt/common/files/daemon.json @@ -1,3 +1,14 @@ +{%- 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" ] + "registry-mirrors": [ + "https://:5000" + ], + "bip": "{{ DOCKERBIND }}", + "default-address-pools": [ + { + "base": "{{ DOCKERRANGE }}", + "size": 24 + } + ] } diff --git a/setup/so-functions b/setup/so-functions index 98aee00ea..e3307bade 100755 --- a/setup/so-functions +++ b/setup/so-functions @@ -1385,10 +1385,10 @@ create_global() { if [ -z "$DOCKERNET" ]; then DOCKERNET=172.17.0.0 DOCKERNET2=172.17.1.0 - DOCKERBIP=$(echo $DOCKERNET | awk -F'.' '{print $1,$2,$3,1}' OFS='.') + DOCKERBIP=$(echo $DOCKERNET | awk -F'.' '{print $1,$2,$3,1}' OFS='.')/24 DOCKER2BIP=$(echo $DOCKERNET2 | awk -F'.' '{print $1,$2,$3,1}' OFS='.') else - DOCKERBIP=$(echo $DOCKERNET | awk -F'.' '{print $1,$2,$3,1}' OFS='.') + DOCKERBIP=$(echo $DOCKERNET | awk -F'.' '{print $1,$2,$3,1}' OFS='.')/24 DOCKER2BIP=$(echo $DOCKERNET2 | awk -F'.' '{print $1,$2,$3,1}' OFS='.') fi