On 06/28/2013 11:52 AM, Chris Brew wrote:
> Hi,
>
> Since we haven't yet constituted a Puppet Working Group I'll ask here.
>
> I've created puppet code to set up ldap authentication on an SL6 box and I'm trying to work out the best way to structure this into modules.
>
> It needs to touch various parts of the OS, setting up the sssd service, adding entries into various pam files, messing with nsswitch.conf, passwd, groups and shadow.
>
> Is it better to split this into separate modules say for sssd, pam, etc or keep everything in one big ldapauth module?
>
> Thanks,
> Chris.
>
Hi Chris,
There is no silver bullet.
The OOP style is to decompose the code into independent objects that
reflect the structure of the problem. This is great for re-use, but has
very low whipupability - it needs analysis and refactoring (to keep
things straight).
I like to see it all laid out in one place and I can't be bothered with
itsy-bity pieces. So I type it all into one big file. This is very poor
for re-use but has a lot of whipupability.
The OPP approach is favoured, nowadays. These differences will make it
hard to write reusable puppet libraries.
Steve
--
Steve Jones [log in to unmask]
System Administrator office: 220
High Energy Physics Division tel (int): 42334
Oliver Lodge Laboratory tel (ext): +44 (0)151 794 2334
University of Liverpool http://www.liv.ac.uk/physics/hep/
|