Class: ShadowPuppet::Manifest::Setup

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

Instance Attribute Summary

Attributes inherited from ShadowPuppet::Manifest

#catalog

Instance Method Summary collapse

Methods inherited from ShadowPuppet::Manifest

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

Constructor Details

This class inherits a constructor from ShadowPuppet::Manifest

Instance Method Details

#setup_directoriesObject



40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
# File 'lib/shadow_puppet.rb', line 40

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