I've hacked around the user module specifically to add FreeBSD support,
although the intention is to be able to add other OS support very simply
by adding an OS flavour specific superclass.
I would appreciate if folks could have a look at this abd ideally test
to see what I broke... bearing in mind I am neither a python nor a
FreeBSD person (yeah - I'm wondering why I started here too).
Code is at
https://github.com/nigelm/ansible/tree/nigelm_freebsd
Only the user module has been changed, and basically its as one big
commit (unfortunately the spacing changes caused by making most of the
code into a class makes the changed lines look more substantial than
they are).
Unless someone shows me real problems with this I'm aiming to send it as
a pull request as soon as I have had a little time to convince myself
its stable.
Nigel.
In general, looks good.
If someone else would like to supply testing to this on FreeBSD, this
would be helpful -- and I can take care of refactoring the class
loader into something I think we want to have as a standard across
modules (hopefully something in module common).
Thanks!
I haven't tried it but I love the idea. It will make adding solaris
support (and others) that much easier. Thanks much.
Michael DeHaan wrote:
If someone else would like to supply testing to this on FreeBSD, this
would be helpful
Absolutely. I have only tested against FreeBSD 9.0 - a fresh install,
and even that is fairly lightly tested. The python package goes into
/usr/local/bin so the platform requires ansible_python_interpreter to be
set.
The standard part of it has been tested against Centos 6
-- and I can take care of refactoring the class
loader into something I think we want to have as a standard across
modules (hopefully something in module common).
I added a (slightly half-arsed) distribution part to the loader - it
seemed likely that at least one of the linuxes will need something
different, so having a way of picking up a new module based on that
looked useful.
I'm aiming to add some more comments around it, then I'll raise a pull
req with you - unless you would prefer it now and I can then decorate it
after merging. Not sure how much time I have in the next few days so
there may be a pause.
Nigel.
You can go ahead and send it over. I may hack around with it some in
the next few days.
Glad to see this, it can help set a standard for the other modules.
Pull request 1483 raised.
Its been an interesting learning experience - not done serious python
previously.
Feel free to bat bugs back across to me - there are quite likely to be
some (mostly of the leaving () off method names - I mostly write perl,
these brackets are all optional!).
Nigel.