module ChefApply::TargetHost::Solaris
Constants
- MKTEMP_COMMAND
Public Instance Methods
chown(path, owner)
click to toggle source
# File lib/chef_apply/target_host/solaris.rb, line 15 def chown(path, owner) owner ||= user run_command!("chown #{owner} '#{path}'") nil end
del_dir(path)
click to toggle source
# File lib/chef_apply/target_host/solaris.rb, line 38 def del_dir(path) del_file(path) end
del_file(path)
click to toggle source
# File lib/chef_apply/target_host/solaris.rb, line 34 def del_file(path) run_command!("rm -rf #{path}") end
install_package(target_package_path)
click to toggle source
# File lib/chef_apply/target_host/solaris.rb, line 29 def install_package(target_package_path) command = "pkg install -g #{target_package_path} chef" run_command!(command) end
make_temp_dir()
click to toggle source
# File lib/chef_apply/target_host/solaris.rb, line 21 def make_temp_dir # We will cache this so that we only run this once @tempdir ||= begin res = run_command!("bash -c '#{MKTEMP_COMMAND}'") res.stdout.chomp.strip end end
mkdir(path)
click to toggle source
# File lib/chef_apply/target_host/solaris.rb, line 11 def mkdir(path) run_command!("mkdir -p #{path}") end
normalize_path(path)
click to toggle source
Nothing to escape in a unix-based path
# File lib/chef_apply/target_host/solaris.rb, line 47 def normalize_path(path) path end
omnibus_manifest_path()
click to toggle source
# File lib/chef_apply/target_host/solaris.rb, line 5 def omnibus_manifest_path # Note that we can't use File::Join, because that will render for the # CURRENT platform - not the platform of the target. "/opt/chef/version-manifest.json" end
ws_cache_path()
click to toggle source
# File lib/chef_apply/target_host/solaris.rb, line 42 def ws_cache_path "/var/chef-workstation" end