shadow_puppet 0.1.1 → 0.1.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (2) hide show
  1. data/lib/shadow_puppet.rb +24 -1
  2. metadata +2 -2
data/lib/shadow_puppet.rb CHANGED
@@ -1 +1,24 @@
1
- require File.join(File.dirname(__FILE__) + '/shadow_puppet', 'manifest.rb')
1
+ require File.join(File.dirname(__FILE__) + '/shadow_puppet', 'manifest.rb')
2
+
3
+ class ShadowPuppet::Manifest::Setup < ShadowPuppet::Manifest
4
+ recipe :setup_directories
5
+
6
+ def setup_directories()
7
+ if Process.uid == 0
8
+ file "/var/puppet",
9
+ :ensure => "directory",
10
+ :backup => false
11
+ else
12
+ file ENV["HOME"] + "/.puppet",
13
+ :ensure => "directory",
14
+ :backup => false
15
+ file ENV["HOME"] + "/.puppet/var",
16
+ :ensure => "directory",
17
+ :backup => false,
18
+ :require => file(ENV["HOME"] + "/.puppet")
19
+ end
20
+ end
21
+ end
22
+
23
+ setup = ShadowPuppet::Manifest::Setup.new
24
+ setup.execute
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: shadow_puppet
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jesse Newland
@@ -28,7 +28,7 @@ dependencies:
28
28
  version_requirement:
29
29
  version_requirements: !ruby/object:Gem::Requirement
30
30
  requirements:
31
- - - ">="
31
+ - - "="
32
32
  - !ruby/object:Gem::Version
33
33
  version: 1.5.2
34
34
  version: