diff options
author | Ismaël Bouya <ismael.bouya@normalesup.org> | 2018-04-22 15:27:55 +0200 |
---|---|---|
committer | Ismaël Bouya <ismael.bouya@normalesup.org> | 2018-04-22 15:27:55 +0200 |
commit | 0fc894fd25009ae9d284cff94edffd62a6348924 (patch) | |
tree | af9ab46aec39677fc3f1f0ce99ee2c69fb1c5754 | |
parent | 881f06c0534ef9e5d0af3298fdd7363d09a0c47a (diff) | |
parent | e3cc4c31bd41b5a2d4b3d5f4e1ecc27b541540c4 (diff) | |
download | Puppet-0fc894fd25009ae9d284cff94edffd62a6348924.tar.gz Puppet-0fc894fd25009ae9d284cff94edffd62a6348924.tar.zst Puppet-0fc894fd25009ae9d284cff94edffd62a6348924.zip |
Merge branch 'dev'
-rw-r--r-- | modules/base_installation/files/scripts/puppet_lock | 16 | ||||
-rw-r--r-- | modules/base_installation/manifests/puppet.pp | 6 |
2 files changed, 22 insertions, 0 deletions
diff --git a/modules/base_installation/files/scripts/puppet_lock b/modules/base_installation/files/scripts/puppet_lock new file mode 100644 index 0000000..cf5c429 --- /dev/null +++ b/modules/base_installation/files/scripts/puppet_lock | |||
@@ -0,0 +1,16 @@ | |||
1 | #!/bin/bash | ||
2 | |||
3 | lockfile=/var/run/puppet-apply.lock | ||
4 | path=`dirname $0` | ||
5 | path=`cd $path/..; pwd` | ||
6 | |||
7 | if [ $(id -u) -gt 0 ]; then | ||
8 | echo "You must be root to run this script." >&2 | ||
9 | exit 2 | ||
10 | fi | ||
11 | |||
12 | if [ "$1" = "off" ]; then | ||
13 | rm -f "$lockfile" | ||
14 | else | ||
15 | touch "$lockfile" | ||
16 | fi | ||
diff --git a/modules/base_installation/manifests/puppet.pp b/modules/base_installation/manifests/puppet.pp index c64ddfd..fa2db69 100644 --- a/modules/base_installation/manifests/puppet.pp +++ b/modules/base_installation/manifests/puppet.pp | |||
@@ -27,6 +27,12 @@ class base_installation::puppet ( | |||
27 | } | 27 | } |
28 | ### | 28 | ### |
29 | 29 | ||
30 | file { '/usr/local/sbin/i_puppet_lock': | ||
31 | mode => "0755", | ||
32 | ensure => present, | ||
33 | source => "puppet:///modules/base_installation/scripts/puppet_lock" | ||
34 | } | ||
35 | |||
30 | file { '/usr/local/sbin/i_puppet_reset_and_apply': | 36 | file { '/usr/local/sbin/i_puppet_reset_and_apply': |
31 | mode => "0755", | 37 | mode => "0755", |
32 | ensure => present, | 38 | ensure => present, |