Skip to content

Commit

Permalink
Merge pull request #75 from puppetlabs/GH-71
Browse files Browse the repository at this point in the history
Fail peadm::pe_install task when installer fails
  • Loading branch information
reidmv committed Mar 21, 2020
2 parents 63cfe49 + 09f9622 commit deea897
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions tasks/pe_install.sh
Expand Up @@ -26,6 +26,9 @@ else
/bin/bash "${tgzdir}/${pedir}/puppet-enterprise-installer" -y
fi

# The exit code of the installer script will be the exit code of the task
exit_code=$?

if [ "$PT_shortcircuit_puppetdb" = "true" ]; then
systemctl stop pe-puppetdb.service
rm /etc/systemd/system/pe-puppetdb.service.d/10-shortcircuit.conf
Expand All @@ -35,3 +38,6 @@ fi
if [ "$PT_puppet_service_ensure" = "stopped" ]; then
systemctl stop puppet.service
fi

# Exit with the installer script's exit code
exit $exit_code

0 comments on commit deea897

Please sign in to comment.