diff options
author | Marc Chamberland <chamberland.marc@gmail.com> | 2020-05-09 22:58:18 -0400 |
---|---|---|
committer | Lance Albertson <lance@osuosl.org> | 2020-09-15 14:04:36 -0700 |
commit | ed48186831835be81b436a160bcf190a7756d473 (patch) | |
tree | d4ae8196171c57dc2e773e610997e5894e5cf019 /chef-config/lib/chef-config/config.rb | |
parent | f5bbe608321ce3bcfd2d4f17292cf8c1ff042893 (diff) | |
download | chef-ed48186831835be81b436a160bcf190a7756d473.tar.gz |
move dist implementation into chef-utils
Signed-off-by: Marc Chamberland <chamberland.marc@gmail.com>
Signed-off-by: Lance Albertson <lance@osuosl.org>
Diffstat (limited to 'chef-config/lib/chef-config/config.rb')
-rw-r--r-- | chef-config/lib/chef-config/config.rb | 21 |
1 files changed, 10 insertions, 11 deletions
diff --git a/chef-config/lib/chef-config/config.rb b/chef-config/lib/chef-config/config.rb index 2c4323db82..1254911e35 100644 --- a/chef-config/lib/chef-config/config.rb +++ b/chef-config/lib/chef-config/config.rb @@ -36,7 +36,6 @@ autoload :URI, "uri" autoload :Addressable, "addressable/uri" autoload :OpenSSL, "openssl" autoload :YAML, "yaml" -require_relative "dist" module ChefConfig @@ -82,7 +81,7 @@ module ChefConfig # @return [String] the platform-specific path # def self.etc_chef_dir(windows: ChefUtils.windows?) - path = windows ? c_chef_dir : PathHelper.join("/etc", ChefConfig::Dist::DIR_SUFFIX, windows: windows) + path = windows ? c_chef_dir : PathHelper.join("/etc", ChefUtils::Dist::Infra::DIR_SUFFIX, windows: windows) PathHelper.cleanpath(path, windows: windows) end @@ -92,7 +91,7 @@ module ChefConfig # @return [String] the platform-specific path # def self.var_chef_dir(windows: ChefUtils.windows?) - path = windows ? c_chef_dir : PathHelper.join("/var", ChefConfig::Dist::DIR_SUFFIX, windows: windows) + path = windows ? c_chef_dir : PathHelper.join("/var", ChefUtils::Dist::Infra::DIR_SUFFIX, windows: windows) PathHelper.cleanpath(path, windows: windows) end @@ -114,7 +113,7 @@ module ChefConfig # def self.c_chef_dir(windows: ChefUtils.windows?) drive = windows_installation_drive || "C:" - PathHelper.join(drive, ChefConfig::Dist::DIR_SUFFIX, windows: windows) + PathHelper.join(drive, ChefUtils::Dist::Infra::DIR_SUFFIX, windows: windows) end # On windows, C:/opscode @@ -125,7 +124,7 @@ module ChefConfig # def self.c_opscode_dir(windows: ChefUtils.windows?) drive = windows_installation_drive || "C:" - PathHelper.join(drive, ChefConfig::Dist::LEGACY_CONF_DIR, ChefConfig::Dist::DIR_SUFFIX, windows: windows) + PathHelper.join(drive, ChefConfig::Dist::LEGACY_CONF_DIR, ChefUtils::Dist::Infra::DIR_SUFFIX, windows: windows) end # the drive where Chef is installed on a windows host. This is determined @@ -190,7 +189,7 @@ module ChefConfig if config_file PathHelper.dirname(PathHelper.canonical_path(config_file, false)) else - PathHelper.join(PathHelper.cleanpath(user_home), ChefConfig::Dist::USER_CONF_DIR, "") + PathHelper.join(PathHelper.cleanpath(user_home), ChefUtils::Dist::Infra::USER_CONF_DIR, "") end end @@ -269,7 +268,7 @@ module ChefConfig end path = new_path end - ChefConfig.logger.info("Auto-discovered #{ChefConfig::Dist::SHORT} repository at #{path}") + ChefConfig.logger.info("Auto-discovered #{ChefUtils::Dist::Infra::SHORT} repository at #{path}") path end @@ -398,7 +397,7 @@ module ChefConfig # If your `file_cache_path` resides on a NFS (or non-flock()-supporting # fs), it's recommended to set this to something like # '/tmp/chef-client-running.pid' - default(:lockfile) { PathHelper.join(file_cache_path, "#{ChefConfig::Dist::CLIENT}-running.pid") } + default(:lockfile) { PathHelper.join(file_cache_path, "#{ChefUtils::Dist::Infra::CLIENT}-running.pid") } ## Daemonization Settings ## # What user should Chef run as? @@ -795,7 +794,7 @@ module ChefConfig if chef_server_url.to_s =~ %r{/organizations/(.*)$} "#{$1}-validator" else - "#{ChefConfig::Dist::SHORT}-validator" + "#{ChefUtils::Dist::Infra::SHORT}-validator" end end @@ -869,7 +868,7 @@ module ChefConfig default :profile, nil default :chef_guid_path do - PathHelper.join(config_dir, "#{ChefConfig::Dist::SHORT}_guid") + PathHelper.join(config_dir, "#{ChefUtils::Dist::Infra::SHORT}_guid") end default :chef_guid, nil @@ -1078,7 +1077,7 @@ module ChefConfig # generated by the DataCollector when Chef is run in Solo mode. This # allows users to associate their Solo nodes with faux organizations # without the nodes being connected to an actual Chef Server. - default :organization, "#{ChefConfig::Dist::SHORT}_solo" + default :organization, "#{ChefUtils::Dist::Infra::SHORT}_solo" end configurable(:http_proxy) |