Skip to content

Commit

Permalink
Merge pull request #124 from n-rodriguez/fix/salt_version_check
Browse files Browse the repository at this point in the history
Fix Salt version comparison on Salt install
  • Loading branch information
gtmanfred authored Aug 2, 2017
2 parents b361a72 + 56e656a commit 74afa16
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions lib/kitchen/provisioner/install.erb
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,14 @@ fi
# check again, now that an install of some form should have happened
command -v salt-call >/dev/null 2>&1 && SALT_VERSION=$(salt-call --version|cut -d " " -f 2)

# extract short format of Salt version
if [ ! -z "${SALT_VERSION}" ]
then
YEAR=$(echo "$SALT_VERSION" | cut -d "." -f1)
MONTH=$(echo "$SALT_VERSION" | cut -d "." -f2)
SALT_VERSION="${YEAR}.${MONTH}"
fi

if [ -z "${SALT_VERSION}" ]
then
echo "No salt-minion installed, install must have failed!!"
Expand Down

0 comments on commit 74afa16

Please sign in to comment.