Use Puppet[:clientyamldir] as suggested by tmz.
This commit is contained in:
parent
bb8f5554b2
commit
035ef8f46a
1 changed files with 7 additions and 2 deletions
|
@ -40,10 +40,15 @@ if options[:yamlfile].nil?
|
|||
|
||||
fqdn = Facter.value(:fqdn)
|
||||
if fqdn.nil?
|
||||
abort "Error: Could not get FQDN"
|
||||
abort "Error: Could not determine FQDN"
|
||||
end
|
||||
|
||||
options[:yamlfile] = "/var/lib/puppet/client_yaml/catalog/#{fqdn}.yaml"
|
||||
client_yaml = Puppet[:clientyamldir]
|
||||
if client_yaml.nil?
|
||||
abort "Could not determine client YAML directory."
|
||||
end
|
||||
|
||||
options[:yamlfile] = "#{client_yaml}/catalog/#{fqdn}.yaml"
|
||||
end
|
||||
|
||||
catalog = YAML::load_file(options[:yamlfile])
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue