Skip to content
This repository has been archived by the owner on Oct 16, 2019. It is now read-only.

Commit

Permalink
Merge branch 'miketedesco-master'
Browse files Browse the repository at this point in the history
  • Loading branch information
deanwilson committed Apr 10, 2016
2 parents 834a8bf + e6fc836 commit 7bc2b49
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion puppet-ls
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,13 @@ else
lister="ls -d1 $target/*"
fi

# Tests if puppet enterprise is used.
if [ -d /var/opt/lib/pe-puppet ]; then
vardir='/var/opt/lib/pe-puppet'
else
vardir='/var/lib/puppet'
fi

catalog_filelist=$(mktemp -q /tmp/$appname.XXXXXX)
lister_filelist=$(mktemp -q /tmp/$appname.XXXXXX)

Expand All @@ -73,7 +80,7 @@ trap "rm -f $catalog_filelist $lister_filelist" 0 1 2 15

# get files puppet knows about - you might not need both of these.
(
grep -h "title: /" /var/lib/puppet/state/last_run_report.yaml | awk '{ print $NF }' ;
grep -h "title: /" "$vardir/state/last_run_report.yaml" | awk '{ print $NF }' ;
sed -e '/File\[/!d' -e 's/File\[//' -e 's/\]://' -e 's/ //g' < /var/lib/puppet/state/state.yaml
) | sort > $catalog_filelist

Expand Down

0 comments on commit 7bc2b49

Please sign in to comment.