[Puppet Users] Re: Best practice to manage multi-OS for the same module?

Rahul Khengare
2013-10-25T09:44:12Z

Hello Aurélien,
     You can write the puppet manifests in a such way that it execute
specific resources for particular OS.
Puppet variables, conditional statements like IF, CASE, SELECTOR and FACTS helps
you to write the conditional manifests.

Refer following links to understand how to manage or write the conditional
puppet manifests,
1. http://docs.puppetlabs.com/learning/variables.html
2. http://docs.puppetlabs.com/puppet/2.7/reference/lang_conditional.html

Hope this will help to achieve your goal.

Thanks and Regards,
Rahul Khengare,
NTT DATA OSS Center, Pune, India.


On Thursday, October 24, 2013 3:43:34 PM UTC+5:30, Aurélien Degrémont
wrote:
>
> Hello all,
>
> As said in the subject, I did not find in puppet doc the official
> recommendation in how multi-os should be handled in module manifests.
>
> Let''s say I want my module foo having classes that could be used
on
> Debian, RHEL6 and Fedora 10 to 18.
> What would be the recommended way to manage differences between all of
> these systems?
>
> I know there is conditionals usable in classes, but is this the
> recommended way?
>
> Also, when I decommission" Fedora10" by example, and I do not
want to
> manage it in all my modules anymore, as this is unneeded complexity, I
> need to modify all the "if" statement in all modules to remove
fedora10
> special treatments?
>
>
> Aurï¿½lien