Hi folks,
i want to declare a resource default globally for all available classes. I searched google and found this site:
These guys suggest this solution:
Service {
provider => systemd,
}
If you write this in a class, the resource default will only be valid within that class, so if you want to have a global default you should probably place that into your site.pp file.
So i tested it. I wrote in my "$environment/manifests/site.pp" under default:
if $::operatingsystem == 'Sles12.0' {
notify{"SLES 12: Systemd als Service-Provideer":}
But i didn't see anything in the debug output on my testystem.
The i created a class called "services::providerdefault" which had the same content like the site.pp in the above. Just the line "node.." was exchanged with "class services::providerdefault {" so to get a class.
I made a requirement in a class for autofs and i got this output.

Now i get the notify in this run.... But the service wants to check with chkconfig and thats wrong. I'm asuming now that my default definition is not typed the right way or in a wrong place.
When i declare the provider directly in the resource declaration its working.
Can someone tell me how i have to declare a resource default that it is working for i.e. 5 services wich i include in the nodedefinition ?
Thanks in Advance
Christian Hase (Yes thats my real name ^-^ its german and means rabbit)