From 7fed35a408b9ec37454169425823785b5fc8978b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Isma=C3=ABl=20Bouya?= Date: Thu, 24 Aug 2017 02:22:17 +0200 Subject: Refactor base installation module --- modules/base_installation/files/cronie/puppet-post-merge | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 modules/base_installation/files/cronie/puppet-post-merge (limited to 'modules/base_installation/files/cronie/puppet-post-merge') diff --git a/modules/base_installation/files/cronie/puppet-post-merge b/modules/base_installation/files/cronie/puppet-post-merge new file mode 100644 index 0000000..ac5e3ff --- /dev/null +++ b/modules/base_installation/files/cronie/puppet-post-merge @@ -0,0 +1,15 @@ +#!/bin/bash +## Run Puppet locally using puppet apply +git submodule update --init +/usr/bin/puppet apply `pwd`/manifests/site.pp + +## Log status of the Puppet run +if [ $? -eq 0 ] +then + /usr/bin/logger -i "Puppet has run successfully" -t "puppet-run" + exit 0 +else + /usr/bin/logger -i "Puppet has ran into an error, please run Puppet manually" -t "puppet-run" + exit 1 +fi + -- cgit v1.2.3