Skip to content

Commit 6c5f226

Browse files
committed
(maint) Allow detection of non-AIO Puppet
When a non-AIO Puppet version is installed (e.g. on FreeBSD where Puppet packages are maintained by the FreeBSD community), Bolt is unable to detect the version of Puppet. If no evidence of the presence of Puppet is found at the AIO locations, check if a `puppet` command is found in the $PATH, and if so, run it with the `--version` parameter to get the version of Puppet.
1 parent 25274cc commit 6c5f226

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

tasks/install_shell.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -133,6 +133,8 @@ fi
133133
# Track to handle puppet5 to puppet6
134134
if [ -f /opt/puppetlabs/puppet/VERSION ]; then
135135
installed_version=`cat /opt/puppetlabs/puppet/VERSION`
136+
elif which puppet >/dev/null 2>&1; then
137+
installed_version=`puppet --version`
136138
else
137139
installed_version=uninstalled
138140
fi

0 commit comments

Comments
 (0)