Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

collections_tech_preview notes/example module_utils python imports #58896

Open
wants to merge 5 commits into
base: devel
from

Conversation

Projects
None yet
5 participants
@maxamillion
Copy link
Contributor

commented Jul 10, 2019

Signed-off-by: Adam Miller admiller@redhat.com

SUMMARY

Add notes and example for using module_utils that are delivered as part of a Collection.

ISSUE TYPE
  • Docs Pull Request
COMPONENT NAME

docs/docsite/rst/collections_tech_preview.rst

collections_tech_preview notes/example module_utils python imports
Signed-off-by: Adam Miller <admiller@redhat.com>
@ansibot

This comment has been minimized.

Copy link
Contributor

commented Jul 10, 2019

@acozine
Copy link
Contributor

left a comment

Overall looks good - I saw a couple of nits on the writing side. Someone else should review the code example.

Show resolved Hide resolved docs/docsite/rst/collections_tech_preview.rst Outdated
Example snippet of a module using both default Ansible ``module_utils`` and
those provided by a collection. In this example the Collection is
``ansible_security``, the namespace is ``community``, and the ``module_util`` in
question is called ``qradar`` such that the Fully Qualified Collection Name

This comment has been minimized.

Copy link
@acozine

acozine Jul 10, 2019

Contributor

You've spelled out Fully Qualified Collection Name and introduced the acronym more than once . . . you can use the acronym alone now, certainly for the rest of the section, probably for the rest of the page.

This comment has been minimized.

Copy link
@samccann

samccann Jul 11, 2019

Contributor

I'm reluctant to have ansible_security as a community collection example since we may actually have an ansible_security collection from RH. Can we change it to example_security, or something less likely to ever exist?

This comment has been minimized.

Copy link
@maxamillion

maxamillion Jul 15, 2019

Author Contributor

@samccann we can even just have example_collection or whatever ... that was just something I happened to have open in vim at the time so I cribbed some code.

Update docs/docsite/rst/collections_tech_preview.rst
Co-Authored-By: Alicia Cozine <879121+acozine@users.noreply.github.com>
@@ -115,8 +115,43 @@ The ``ansible-doc`` command requires the fully qualified collection name (FQCN)
plugins directory
------------------

Add a 'per plugin type' specific subdirectory here, including ``module_utils`` which is usable not only by modules, but by any other plugin by using their FQCN. This is a way to distribute modules, lookups, filters, and so on, without having to import a role in every play.
Add a 'per plugin type' specific subdirectory here, including ``module_utils`` which is usable not only by modules, but by any other plugin by using their Fully Qualified Collection Name (FQCN). This is a way to distribute modules, lookups, filters, and so on, without having to import a role in every play.

This comment has been minimized.

Copy link
@samccann

samccann Jul 11, 2019

Contributor

FQCN was already defined in an earlier section of this doc so doesn't need to be repeated at all. Just us FQCN, unless you are seeing people not understanding this term and we shouldn't use an acronym at all?

This comment has been minimized.

Copy link
@ekohl

ekohl Jul 18, 2019

Contributor

When I first read it, I assumed it was a typo of FQDN.

Show resolved Hide resolved docs/docsite/rst/collections_tech_preview.rst Outdated
Show resolved Hide resolved docs/docsite/rst/collections_tech_preview.rst Outdated
Show resolved Hide resolved docs/docsite/rst/collections_tech_preview.rst Outdated
Example snippet of a module using both default Ansible ``module_utils`` and
those provided by a collection. In this example the Collection is
``ansible_security``, the namespace is ``community``, and the ``module_util`` in
question is called ``qradar`` such that the Fully Qualified Collection Name

This comment has been minimized.

Copy link
@samccann

samccann Jul 11, 2019

Contributor

I'm reluctant to have ansible_security as a community collection example since we may actually have an ansible_security collection from RH. Can we change it to example_security, or something less likely to ever exist?

maxamillion and others added some commits Jul 15, 2019

Update docs/docsite/rst/collections_tech_preview.rst
Co-Authored-By: Sandra McCann <samccann@redhat.com>
Update docs/docsite/rst/collections_tech_preview.rst
Co-Authored-By: Sandra McCann <samccann@redhat.com>
Update docs/docsite/rst/collections_tech_preview.rst
Co-Authored-By: Sandra McCann <samccann@redhat.com>
@acozine

This comment has been minimized.

Copy link
Contributor

commented Jul 22, 2019

@maxamillion I think the only thing holding up this PR is the change in the name of the sample collection.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.