From 5b4fbb5f53cfe34b9852223bc5dee86875fbe7b0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Isma=C3=ABl=20Bouya?= Date: Mon, 8 Aug 2016 18:28:11 +0200 Subject: Rename cron-puppet class to cron_puppet --- modules/cron-puppet/files/post-merge | 14 -------------- modules/cron-puppet/manifests/init.pp | 17 ----------------- modules/cron_puppet/files/post-merge | 14 ++++++++++++++ modules/cron_puppet/manifests/init.pp | 17 +++++++++++++++++ 4 files changed, 31 insertions(+), 31 deletions(-) delete mode 100644 modules/cron-puppet/files/post-merge delete mode 100644 modules/cron-puppet/manifests/init.pp create mode 100644 modules/cron_puppet/files/post-merge create mode 100644 modules/cron_puppet/manifests/init.pp (limited to 'modules') diff --git a/modules/cron-puppet/files/post-merge b/modules/cron-puppet/files/post-merge deleted file mode 100644 index b8dc266..0000000 --- a/modules/cron-puppet/files/post-merge +++ /dev/null @@ -1,14 +0,0 @@ -#!/bin/bash -e -## Run Puppet locally using puppet apply -/usr/bin/puppet apply /etc/puppetlabs/puppet/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 4ce0be4..0000000 --- a/modules/cron-puppet/manifests/init.pp +++ /dev/null @@ -1,17 +0,0 @@ -class cron-puppet { - file { 'post-hook': - ensure => file, - path => '/etc/puppetlabs/puppet/.git/hooks/post-merge', - source => 'puppet:///modules/cron-puppet/post-merge', - mode => 0755, - owner => root, - group => root, - } - cron { 'puppet-apply': - ensure => present, - command => "cd /etc/puppetlabs/puppet ; /usr/bin/git pull", - user => root, - minute => '*/30', - require => File['post-hook'], - } -} diff --git a/modules/cron_puppet/files/post-merge b/modules/cron_puppet/files/post-merge new file mode 100644 index 0000000..b8dc266 --- /dev/null +++ b/modules/cron_puppet/files/post-merge @@ -0,0 +1,14 @@ +#!/bin/bash -e +## Run Puppet locally using puppet apply +/usr/bin/puppet apply /etc/puppetlabs/puppet/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 new file mode 100644 index 0000000..a694a6f --- /dev/null +++ b/modules/cron_puppet/manifests/init.pp @@ -0,0 +1,17 @@ +class cron_puppet { + file { 'post-hook': + ensure => file, + path => '/etc/puppetlabs/puppet/.git/hooks/post-merge', + source => 'puppet:///modules/cron_puppet/post-merge', + mode => '0755', + owner => root, + group => root, + } + cron { 'puppet-apply': + ensure => present, + command => "cd /etc/puppetlabs/puppet ; /usr/bin/git pull", + user => root, + minute => '*/30', + require => File['post-hook'], + } +} -- cgit v1.2.3