// , Is there a better way to deal with this in later versions of Puppet?

I lean toward using different manifests for different operating system 
variations, but like the original poster says, no matter how one organizes 
the logic, it still gets tedious.

Puppet 4.9 doesn't even seem to have in line selectors: 
https://docs.puppet.com/puppet/latest/lang_summary.html#selectors

https://duckduckgo.com/?q=inurl%3Ahttps%3A%2F%2Fdocs.puppet.com%2Fpuppet%2Flatest%2F+%22selectors%22&t=h_&ia=web

Should I consider having a different module for each OS, say, a module 
named appcerts_pkgs_windows and a module named appcerts_pkgs_linux, with 
different manifests for the variations under each? 

The whole point of Puppet is to manage multiple operating systems and 
variations from a single source. It would surprise me if they didn't have a 
solution, but I just can't seem to find it.

On Friday, September 30, 2011 at 11:33:50 AM UTC-7, Jeff Falgout wrote:
>
> We're in the situation of dealing with multiple operating systems (and 
> will likely add another) and I'm quickly realizing that building logic in 
> the manifest to deal with the differences in Red Hat i386 vs Red Hat x86_64 
> vs SuSE i586 vs SuSE x86_64 vs Mac is getting tedious. For instance, in the 
> sshd_config:
>
> SLES i586 has the sftp-server binary in a different path than the x86_64 
> version and it's different than RHEL - so I end up with logic as such:
>
>     # Set the SFTP Path
>     if $lsbdistid == 'SUSE LINUX' {
>        if $architecture == 'x86_64' {
>           $sftppath = '/usr/lib64/ssh/sftp-server'
>        } else {
>           $sftppath = '/usr/lib/ssh/sftp-server'
>        }
>     } else {
>        $sftppath = "/usr/libexec/openssh/sftp-server"
>     }
>
>
> Is there a better way to deal with different OS's or is the long and 
> winding road of config mgmt?
>
> Do people do something like:
>
> include ssh::server::$operatingsystem
>
> class ssh::server::RedHat {
>   blah
> }
>
> class ssh::server::SLES {
>   blah
> }
>
>
> Different modulepath? Different puppet servers based on OS? 
>
> Cheers,
>
> Jeff
>

-- 
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/ac51ce5d-8b8d-4512-bea0-c0ff8f813645%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to