From cfa8eb925ff0115d5d4b2298f7d9a054b869fa75 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Isma=C3=ABl=20Bouya?= Date: Sat, 17 Mar 2018 12:46:37 +0100 Subject: Add puppet_apply script with lockfile --- modules/base_installation/manifests/cronie.pp | 4 ++-- modules/base_installation/manifests/puppet.pp | 6 ++++++ 2 files changed, 8 insertions(+), 2 deletions(-) (limited to 'modules/base_installation/manifests') diff --git a/modules/base_installation/manifests/cronie.pp b/modules/base_installation/manifests/cronie.pp index e8d5dfd..e8f3e20 100644 --- a/modules/base_installation/manifests/cronie.pp +++ b/modules/base_installation/manifests/cronie.pp @@ -19,13 +19,13 @@ class base_installation::cronie inherits base_installation { } cron { 'puppet-apply': ensure => present, - command => "cd $base_installation::puppet_code_path ; puppet apply $base_installation::puppet_code_path/manifests/site.pp", + command => "cd $base_installation::puppet_code_path ; puppet_apply $base_installation::puppet_code_path/manifests/site.pp", user => root, minute => '*/20' } cron { 'puppet-apply-reboot': ensure => present, - command => "cd $base_installation::puppet_code_path ; puppet apply $base_installation::puppet_code_path/manifests/site.pp", + command => "cd $base_installation::puppet_code_path ; puppet_apply $base_installation::puppet_code_path/manifests/site.pp", user => root, special => "reboot" } diff --git a/modules/base_installation/manifests/puppet.pp b/modules/base_installation/manifests/puppet.pp index 6f7732d..0cb43bc 100644 --- a/modules/base_installation/manifests/puppet.pp +++ b/modules/base_installation/manifests/puppet.pp @@ -39,6 +39,12 @@ class base_installation::puppet ( source => "puppet:///modules/base_installation/scripts/report_print.rb" } + file { '/usr/local/sbin/puppet_apply': + mode => "0755", + ensure => present, + source => "puppet:///modules/base_installation/scripts/puppet_apply", + } + unless empty(find_file($password_seed)) { $ldap_password = generate_password(24, $password_seed, "ldap") $ssha_ldap_seed = generate_password(5, $password_seed, "ldap_seed") -- cgit v1.2.3