Enabling xpack plugins by default. Fixing a bug that can cause that the desabilitation of plugins wasnt applied at kibana

This commit is contained in:
l
2019-02-07 12:58:59 +01:00
parent 2e3b49dcad
commit a6b7d6ea02
5 changed files with 32 additions and 29 deletions

View File

@@ -68,25 +68,5 @@ curl -XPUT "$el_url/_cluster/settings" -H 'Content-Type: application/json' -d'
}
'
#Disabling xpack features
elasticsearch_config_file="/usr/share/elasticsearch/config/elasticsearch.yml"
if grep -Fq "#xpack features" "$elasticsearch_config_file";
then
declare -A CONFIG_MAP=(
[xpack.ml.enabled]=$XPACK_ML
)
for i in "${!CONFIG_MAP[@]}"
do
if [ "${CONFIG_MAP[$i]}" != "" ]; then
sed -i 's/.'"$i"'.*/'"$i"': '"${CONFIG_MAP[$i]}"'/' $elasticsearch_config_file
fi
done
else
echo "
#xpack features
xpack.ml.enabled: $XPACK_ML
" >> $elasticsearch_config_file
fi
echo "Elasticsearch is ready."