Skip to content

Commit

Permalink
fix the puppet/facter issue for #45
Browse files Browse the repository at this point in the history
  • Loading branch information
ozbillwang committed Apr 21, 2015
1 parent b4bc451 commit 88c85e8
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions files/rundeck_version
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
# Ask puppet what version of rundeck is installed.
# Will return the version or if not available: "absent".
puppet resource package rundeck | grep ensure | awk '{print $NF}' | sed "s/'//g;s/,//g"
#!/bin/env bash

if [ -x /usr/bin/dpkg ]; then
VERSION=`dpkg -l | grep rundeck | awk '{ print $3}'`
echo "rundeck_version=$VERSION"
fi

if [ -x /usr/bin/yum ]; then
VERSION=`yum list installed|awk '/rundeck\./{print $2}'`
echo "rundeck_version=$VERSION"
fi

0 comments on commit 88c85e8

Please sign in to comment.