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/cron_puppet/files/post-merge | 15 --------------- modules/cron_puppet/manifests/init.pp | 26 -------------------------- 2 files changed, 41 deletions(-) delete mode 100644 modules/cron_puppet/files/post-merge delete mode 100644 modules/cron_puppet/manifests/init.pp (limited to 'modules/cron_puppet') 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 @@ -#!/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 - 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 @@ -class cron_puppet ( - $code_path = "/etc/puppetlabs/code" -) { - file { 'post-hook': - ensure => file, - path => "$code_path/.git/hooks/post-merge", - source => 'puppet:///modules/cron_puppet/post-merge', - mode => '0755', - owner => root, - group => root, - } - package { 'cronie': - ensure => 'present', - } - cron { 'puppet-apply': - ensure => present, - command => "cd $code_path ; /usr/bin/git pull", - user => root, - minute => '*/30', - require => File['post-hook'], - } - service { 'cronie': - ensure => 'running', - enable => true - } -} -- cgit v1.2.3