You can use facts and 'if' conditionals or 'case' selectors and test the OS facts. IIRC that would be kernel (windows or Linux) and operatingsystemmajrelease (2008, 2008R2, etc.) in puppet 3 and deeper within the $facts['os'] on puppet 4 or 3 with future parser and structured facts - but double check that. You can run `facter -p` on a sample node to see what facts exist that contain what you are looking for.
You might also review a module like puppetlabs/ntp to see some examples of using conditionals to set defaults, in the params class. The latest version is puppet 4 only but the v4.x train of the module supports puppet 3. Please note, puppet 3 support ends on 12/31/2016 so please start targeting puppet 4 only or ensure you are future proofing so you can transition from 3 to 4 quickly. On Sat, Nov 19, 2016 at 3:56 PM Akai <andreas.pienia...@gmail.com> wrote: > Hello together, > > in one of my modules i want to do different variable initialization > depends by the version of the used operating system. > I found examples who show of to differ between Debian and OpenBSD for > example, but in my case, i want to differ between Windows Server 2012R2 and > Windows Server 2016 - so they are both Windows operating Systems. Is it > possible to differ by the version number or sth. ? If yes, how i do that? > > thanks for any help > > best regards > > Akai > > -- > 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 puppet-users+unsubscr...@googlegroups.com. > To view this discussion on the web visit > https://groups.google.com/d/msgid/puppet-users/9079a58c-b9bf-476e-b7e1-c43f45a50442%40googlegroups.com > <https://groups.google.com/d/msgid/puppet-users/9079a58c-b9bf-476e-b7e1-c43f45a50442%40googlegroups.com?utm_medium=email&utm_source=footer> > . > For more options, visit https://groups.google.com/d/optout. > -- Rob Nelson -- 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 puppet-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/CAC76iT8f-wZzFBPyyTxAVZY3mVp7u9fQDBmm7h55obQ4ySTuWQ%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.