Skip to content

Commit deea897

Browse files
authored
Merge pull request #75 from puppetlabs/GH-71
Fail peadm::pe_install task when installer fails
2 parents 63cfe49 + 09f9622 commit deea897

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

tasks/pe_install.sh

+6
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,9 @@ else
2626
/bin/bash "${tgzdir}/${pedir}/puppet-enterprise-installer" -y
2727
fi
2828

29+
# The exit code of the installer script will be the exit code of the task
30+
exit_code=$?
31+
2932
if [ "$PT_shortcircuit_puppetdb" = "true" ]; then
3033
systemctl stop pe-puppetdb.service
3134
rm /etc/systemd/system/pe-puppetdb.service.d/10-shortcircuit.conf
@@ -35,3 +38,6 @@ fi
3538
if [ "$PT_puppet_service_ensure" = "stopped" ]; then
3639
systemctl stop puppet.service
3740
fi
41+
42+
# Exit with the installer script's exit code
43+
exit $exit_code

0 commit comments

Comments
 (0)