From edf75255cf7a4d375ec110dd97e8c7e6909fe040 Mon Sep 17 00:00:00 2001 From: m0duspwnens Date: Wed, 22 Sep 2021 12:01:32 -0400 Subject: [PATCH] ignore manager pillar file for noderoutetype --- salt/common/tools/sbin/soup | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/salt/common/tools/sbin/soup b/salt/common/tools/sbin/soup index 7fb345aa7..49ccc2538 100755 --- a/salt/common/tools/sbin/soup +++ b/salt/common/tools/sbin/soup @@ -644,9 +644,14 @@ up_2.3.5X_to_2.3.80() { sed -i '/ esclustername/d' /opt/so/saltstack/local/pillar/global.sls for file in /opt/so/saltstack/local/pillar/minions/*.sls; do - noderoutetype=$(grep -w node_route_type $file | awk -F: {'print $2'}) - sed -i "/^elasticsearch:/a \\ config: \n node: \n attr: \n box_type: $noderoutetype" $file - sed -i '/ node_route_type/d' $file + if [[ ${file} != *"manager.sls"* ]]; then + noderoutetype=$(grep -w node_route_type $file | awk -F: {'print $2'}) + if [ -n "$noderoutetype" ]; then + sed -i "/^elasticsearch:/a \\ config: \n node: \n attr: \n box_type: $noderoutetype" $file + sed -i '/ node_route_type/d' $file + noderoutetype='' + fi + fi done fi