Nailgun is used for Satellite's QA for testing the API. It's not
purpose-built for Ansible, but it is generally written as a Python library
for Satellite's API. We get 'free' maintenance/features with Nailgun
because the QA team contributes to it (we have access as well). Nailgun
seems to have similar dependencies to python-foreman (i.e. requests).


> - I would overwrite the nailgun using modules like foreman_ptable.py etc.


We still need to discuss what we will do with duplicate modules (whether to
use python-foreman or nailgun). If there are modules that don't exist in
foreman-ansible-modules, we would appreciate PRs for those.

- there is no place to put Ansible module documentation fragments into like
> utils/module_docs_fragments/foreman.py


I would say just create utils/module_docs_fragments in your PR.

If given a choice, I would vote for Nailgun, a more mature project with
more contributors and guaranteed future contribution from Satellite QA.
There is a bit of a gap between foreman-ansible-modules and Nailgun, given
that it is not purpose built; for this, we do include
ansible_nailgun_cement.py [1].

I appreciate the support and interest from the community.

[1]
https://github.com/theforeman/foreman-ansible-modules/blob/master/module_utils/ansible_nailgun_cement.py

Andrew


On Tue, Oct 24, 2017 at 3:47 PM, Thomas Krahn <[email protected]>
wrote:

> Hi all,
>
> as the maintainer of the Ansible Foreman modules
> <https://github.com/Nosmoht/ansible-module-foreman> i would like to share
> my thoughts with you.
>
> First of all i really like the idea to bring Foreman modules into Ansible.
> The complete configuration of Foreman is much easier if you can use
> Infrastructure as Code.
> That was the reason why i started the implementation in March 2015. At
> this time Ansible didn't have the module_utils folder and modules had to be
> "self contained".
> So the only way to use shared code was to create a Python library and use
> it. My result of that constraint is the Python Foreman library
> <https://github.com/Nosmoht/python-foreman>.
> It was and still is a challenge to always sync the modules and the library
> functionality.
>
> As far as i can see Nailgun is the library to work with Satellite 6 API.
>
> In regards to the future used library i see three different options so far:
> 1. nailgun
> 2. python-foreman
> 3. Ansible's module_utils.
>
> I don't want to talk about functionality here, but more about constraints
> and dependencies.
> If either nailgun or python-foreman is used people would have to install
> the library to use the Ansible modules and could have the same sync issue
> like i had in the past.
> Besides that i believe the library would have even more dependencies
> (python-requests for example) which could make things even more worst.
> On the other hand people would have a Python library that could even be
> used outside of Ansible for other tasks.
>
> If all that stuff is put into Ansible's module_utils folder we wouldn't
> have any sync issue nor external dependencies, but the usage would be
> limited to Ansible.
> And Ansible provides a great framework that abstracts a lot of things
> (methods like fetch_url() and open_url()) that otherwise would have to be
> reimplemented.
>
> Long term speaking i believe a common Python library would be the winner
> as it provides a standardized and well tested Foreman/Satellite interface
> to the world.
>
> I'm not sure how far the nailgun development is, but python-foreman is
> open source and i'm happy to hand out the ownership of that repository.
>
>
>
> Next topic: Ansible modules
>
> I've already done a lot of work to move the modules from python-foreman +
> modules into "everything in Ansible".
> Means all the library stuff goes into module_utils/foreman.py plus all the
> modules in modules/cloud/foreman/*.py.
> Nearly 75% of that work is done so i could open a PR for each module that
> is already finished.
> If that's something the community would like to see...let's do it :-)
>
> I wanted to commit that code into https://github.com/theforeman/
> foreman-ansible-modules but had some issue.
> - I would overwrite the nailgun using modules like foreman_ptable.py etc.
> - there is no place to put Ansible module documentation fragments into
> like utils/module_docs_fragments/foreman.py
>
> If anyone has an idea how to fix that let me know ;)
>
>
> Happy to see how it's going on
> Nosmoht
>
> --
> You received this message because you are subscribed to the Google Groups
> "foreman-dev" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> For more options, visit https://groups.google.com/d/optout.
>



-- 
Andrew Kofink
[email protected]
IRC: akofink
Software Engineer
Red Hat Satellite

-- 
You received this message because you are subscribed to the Google Groups 
"foreman-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to