Displaying 1 result from an estimated 1 matches for "custom_definition".
2007 May 01
8
Custom functions and facts
..., :type => :rvalue) do |args|
MD5.new(Facter[''fqdn''].value).to_s.hex % 4
end
end
I''ve managed to get this working by using $fqdn inside my node
definition and passing it through to my custom definition like this:
node ''somenode.domain.com'' {
custom_definition { name: address => $fqdn }
}
define custom_definition ($address){ "custom_name":
$random_hour = hour_from_fqdn($address)
file { "/path/to/file":
content => template("my_template")
}
}
I just wanted to verify that from a call to Facter[''fqdn...