aboutsummaryrefslogtreecommitdiff
path: root/modules/cron_puppet
diff options
context:
space:
mode:
Diffstat (limited to 'modules/cron_puppet')
-rw-r--r--modules/cron_puppet/files/post-merge15
-rw-r--r--modules/cron_puppet/manifests/init.pp26
2 files changed, 0 insertions, 41 deletions
diff --git a/modules/cron_puppet/files/post-merge b/modules/cron_puppet/files/post-merge
deleted file mode 100644
index ac5e3ff..0000000
--- a/modules/cron_puppet/files/post-merge
+++ /dev/null
@@ -1,15 +0,0 @@
1#!/bin/bash
2## Run Puppet locally using puppet apply
3git submodule update --init
4/usr/bin/puppet apply `pwd`/manifests/site.pp
5
6## Log status of the Puppet run
7if [ $? -eq 0 ]
8then
9 /usr/bin/logger -i "Puppet has run successfully" -t "puppet-run"
10 exit 0
11else
12 /usr/bin/logger -i "Puppet has ran into an error, please run Puppet manually" -t "puppet-run"
13 exit 1
14fi
15
diff --git a/modules/cron_puppet/manifests/init.pp b/modules/cron_puppet/manifests/init.pp
deleted file mode 100644
index c9d5a51..0000000
--- a/modules/cron_puppet/manifests/init.pp
+++ /dev/null
@@ -1,26 +0,0 @@
1class cron_puppet (
2 $code_path = "/etc/puppetlabs/code"
3) {
4 file { 'post-hook':
5 ensure => file,
6 path => "$code_path/.git/hooks/post-merge",
7 source => 'puppet:///modules/cron_puppet/post-merge',
8 mode => '0755',
9 owner => root,
10 group => root,
11 }
12 package { 'cronie':
13 ensure => 'present',
14 }
15 cron { 'puppet-apply':
16 ensure => present,
17 command => "cd $code_path ; /usr/bin/git pull",
18 user => root,
19 minute => '*/30',
20 require => File['post-hook'],
21 }
22 service { 'cronie':
23 ensure => 'running',
24 enable => true
25 }
26}