Class: Puppet::Util::WindowsRunMode

Inherits:
RunMode show all
Defined in:
lib/puppet/util/run_mode.rb

Instance Attribute Summary

Attributes inherited from RunMode

#name

Instance Method Summary collapse

Methods inherited from RunMode

[], #agent?, #initialize, #master?, #server?, #user?

Constructor Details

This class inherits a constructor from Puppet::Util::RunMode

Instance Method Details

#code_dirObject



113
114
115
# File 'lib/puppet/util/run_mode.rb', line 113

def code_dir
  which_dir(File.join(windows_common_base("code")), "~/.puppetlabs/etc/code")
end

#common_module_dirObject



145
146
147
# File 'lib/puppet/util/run_mode.rb', line 145

def common_module_dir
  "#{installdir}/puppet/modules" if installdir
end

#conf_dirObject



109
110
111
# File 'lib/puppet/util/run_mode.rb', line 109

def conf_dir
  which_dir(File.join(windows_common_base("puppet/etc")), "~/.puppetlabs/etc/puppet")
end

#gem_cmdObject



137
138
139
140
141
142
143
# File 'lib/puppet/util/run_mode.rb', line 137

def gem_cmd
  if (puppet_dir = ENV.fetch('PUPPET_DIR', nil))
    File.join(puppet_dir.to_s, 'bin', 'gem.bat')
  else
    File.join(Gem.default_bindir, 'gem.bat')
  end
end

#log_dirObject



129
130
131
# File 'lib/puppet/util/run_mode.rb', line 129

def log_dir
  which_dir(File.join(windows_common_base("puppet/var/log")), "~/.puppetlabs/var/log")
end

#pkg_config_pathObject



133
134
135
# File 'lib/puppet/util/run_mode.rb', line 133

def pkg_config_path
  nil
end

#public_dirObject



121
122
123
# File 'lib/puppet/util/run_mode.rb', line 121

def public_dir
  which_dir(File.join(windows_common_base("puppet/public")), "~/.puppetlabs/opt/puppet/public")
end

#run_dirObject



125
126
127
# File 'lib/puppet/util/run_mode.rb', line 125

def run_dir
  which_dir(File.join(windows_common_base("puppet/var/run")), "~/.puppetlabs/var/run")
end

#var_dirObject



117
118
119
# File 'lib/puppet/util/run_mode.rb', line 117

def var_dir
  which_dir(File.join(windows_common_base("puppet/cache")), "~/.puppetlabs/opt/puppet/cache")
end

#vendor_module_dirObject



149
150
151
# File 'lib/puppet/util/run_mode.rb', line 149

def vendor_module_dir
  "#{installdir}\\puppet\\vendor_modules" if installdir
end