Class: ShadowPuppet::Manifest::Setup

Inherits:
ShadowPuppet::Manifest show all
Defined in:
lib/shadow_puppet.rb

Instance Attribute Summary

Attributes inherited from ShadowPuppet::Manifest

#puppet_resources

Instance Method Summary collapse

Methods inherited from ShadowPuppet::Manifest

#configuration, configuration, configure, #configure, #executable?, #execute, #execute!, #initialize, #missing_recipes, #name, puppet_type_methods, recipe, register_puppet_types, register_puppet_types_for_testing

Constructor Details

This class inherits a constructor from ShadowPuppet::Manifest

Instance Method Details

#setup_directoriesObject



9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
# File 'lib/shadow_puppet.rb', line 9

def setup_directories()
  if Process.uid == 0
    file "/var/shadow_puppet",
      :ensure => "directory",
      :backup => false
    file "/etc/shadow_puppet",
      :ensure => "directory",
      :backup => false
  else
    file ENV["HOME"] + "/.shadow_puppet",
      :ensure => "directory",
      :backup => false
    file ENV["HOME"] + "/.shadow_puppet/var",
      :ensure   => "directory",
      :backup   => false,
      :require  => file(ENV["HOME"] + "/.shadow_puppet")
  end
end