From 1098e4e5e7bfbce51993d36ad26b36fb4d58a9ee Mon Sep 17 00:00:00 2001 From: Pekka Helenius <35750356+Fincer-altego@users.noreply.github.com> Date: Mon, 23 Apr 2018 19:37:29 +0300 Subject: [PATCH] Add Salt Pillar sample shell script --- scripts/salt_pillar_sample.sh | 71 +++++++++++++++++++++++++++++++++++ 1 file changed, 71 insertions(+) create mode 100644 scripts/salt_pillar_sample.sh diff --git a/scripts/salt_pillar_sample.sh b/scripts/salt_pillar_sample.sh new file mode 100644 index 0000000..0529288 --- /dev/null +++ b/scripts/salt_pillar_sample.sh @@ -0,0 +1,71 @@ +#!/bin/sh + +# Author: Pekka Helenius (~Fincer), 2018 +# +# - This script creates two different text strings for two minions: minion_1 & minion_2 +# - This script is meant to be run on Salt master +# +# - This script creates the following files on master: +# /srv/pillar/top.sls +# /srv/pillar/minion-1.sls +# /srv/pillar/minion-2.sls +# /srv/salt/files/pillarfile +# /srv/salt/myfirstpillar.sls + +if [ $(id -u) -eq 0 ]; then + mkdir -p /srv/pillar + +tee /srv/pillar/top.sls <