I'm new to Puppet (yay!) and working through having a different resolv.conf 
for systems that contain a certain string in their hostname.

I've got the following in my modules/system/files.pp:

class system::files {
    case $hostname {
        /^uklab*$/:  {
            $file = "resolv-isg.conf"
        }
        default:     {
            $file = "resolv-internal.conf"
        }
    }

    file { '/etc/resolv.conf':
        source => "puppet:///modules/system/$file"
    }
}

For some reason it always uses the default, what am I doing wrong? I've 
done loads of Googling around but can't seem to find a reasonable answer. I 
know I could use a different module per node but didn't want to have loads 
of per-node nodules but is this the only way?

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/puppet-users/-/ycBO-sSvP6sJ.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.

Reply via email to