Hi,
thank you very much for the replies.
> Take a look at virtual resources:
> http://projects.puppetlabs.com/projects/1/wiki/Virtual_Resources
I did take a look at them but I couldn't really figure out how to
properly use them. I can't remember what the problem was but I think
part of it was b
On Fri, Nov 19, 2010 at 12:56 PM, Steve Atwell wrote:
> I need to write a custom fact that depends on the value of another
> custom fact in a different file. For example:
>
> # foo.rb
> Facter.add("foo") do
> setcode do
> [...]
> end
> end
>
> # bar.rb
> Facter.add("bar") do
> set
Thanks very much John. I had indeed been thinking of import as being
like include.
As it happens I have completely reworked this stuff and now the
monitor module just deals with specifying what packages and users are
pushed out. It also now imports a two defines which deal with all the
config st
FWIW, it's probably better performance-wise to do the string manipulations
in Ruby rather than shelling out to bash.
Facter.add "lokatie" do
setcode do
case Facter.value(:ipaddress).split('.')[1]
when '84': 'AAA'
when '85': 'BBB'
# ...
else
# ...
end
end
end
Peac