aboutsummaryrefslogtreecommitdiff
path: root/modules/cron_puppet
diff options
context:
space:
mode:
authorIsmaël Bouya <ismael.bouya@normalesup.org>2017-08-14 19:02:29 +0200
committerIsmaël Bouya <ismael.bouya@normalesup.org>2017-08-24 00:33:58 +0200
commitba2cf1b5d938810077b0fd73844faf432e8e8f9d (patch)
tree40884fcc70af8eb349979b2ff62e3e4435bae5a5 /modules/cron_puppet
parenteb9fec57fcfcc84f0e310e343167a10fb13ca0c8 (diff)
downloadPuppet-ba2cf1b5d938810077b0fd73844faf432e8e8f9d.tar.gz
Puppet-ba2cf1b5d938810077b0fd73844faf432e8e8f9d.tar.zst
Puppet-ba2cf1b5d938810077b0fd73844faf432e8e8f9d.zip
Install OVH vps from scratch
Diffstat (limited to 'modules/cron_puppet')
-rw-r--r--modules/cron_puppet/files/post-merge4
-rw-r--r--modules/cron_puppet/manifests/init.pp8
2 files changed, 7 insertions, 5 deletions
diff --git a/modules/cron_puppet/files/post-merge b/modules/cron_puppet/files/post-merge
index 1ba08fb..ac5e3ff 100644
--- a/modules/cron_puppet/files/post-merge
+++ b/modules/cron_puppet/files/post-merge
@@ -1,7 +1,7 @@
1#!/bin/bash -e 1#!/bin/bash
2## Run Puppet locally using puppet apply 2## Run Puppet locally using puppet apply
3git submodule update --init 3git submodule update --init
4/usr/bin/puppet apply --modulepath=/etc/puppetlabs/puppet/modules /etc/puppetlabs/puppet/manifests/site.pp 4/usr/bin/puppet apply `pwd`/manifests/site.pp
5 5
6## Log status of the Puppet run 6## Log status of the Puppet run
7if [ $? -eq 0 ] 7if [ $? -eq 0 ]
diff --git a/modules/cron_puppet/manifests/init.pp b/modules/cron_puppet/manifests/init.pp
index 1756a06..c9d5a51 100644
--- a/modules/cron_puppet/manifests/init.pp
+++ b/modules/cron_puppet/manifests/init.pp
@@ -1,7 +1,9 @@
1class cron_puppet { 1class cron_puppet (
2 $code_path = "/etc/puppetlabs/code"
3) {
2 file { 'post-hook': 4 file { 'post-hook':
3 ensure => file, 5 ensure => file,
4 path => '/etc/puppetlabs/puppet/.git/hooks/post-merge', 6 path => "$code_path/.git/hooks/post-merge",
5 source => 'puppet:///modules/cron_puppet/post-merge', 7 source => 'puppet:///modules/cron_puppet/post-merge',
6 mode => '0755', 8 mode => '0755',
7 owner => root, 9 owner => root,
@@ -12,7 +14,7 @@ class cron_puppet {
12 } 14 }
13 cron { 'puppet-apply': 15 cron { 'puppet-apply':
14 ensure => present, 16 ensure => present,
15 command => "cd /etc/puppetlabs/puppet ; /usr/bin/git pull", 17 command => "cd $code_path ; /usr/bin/git pull",
16 user => root, 18 user => root,
17 minute => '*/30', 19 minute => '*/30',
18 require => File['post-hook'], 20 require => File['post-hook'],