Hi all,
This, to me, is really bizarre. Here's my code:
Facter.add("hostname_app") do
setcode do
hostname_app = Facter.value(:hostname)
hostname_app[5] = 'a'
hostname_app
end
end
Basically, our servers have 2 network cards, and we need to set up DNS for
both of its IP addresses. eth0 & the server's hostname is its 'management'
name, and eth1 is the server's 'application'/business network.
The management hostname and application hostname only differ by one letter,
which is what the above code is changing.
Now, when this runs, the hostname_app fact is set correctly, but the
default hostname fact is also changed similarly! How on earth is that
happening?
I've confirmed that a normal 'facter' run has the correct hostname set, and
removing this custom fact also keeps the hostname fact correct under a
'facter -p' run. However, with this fact in place a 'facter -p' run shows
the incorrect hostname fact!
Thanks,
Matt.
--
You received this message because you are subscribed to the Google Groups
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/puppet-users/CAKUTv3%2BaU_xgwd88YCt5wB%2BPcP90HQkpsFjczDTNaM0hssJpTw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.