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

become: Add missing documentation for pfexec, dzdo and machinectl #53314

Merged
merged 1 commit into from
Mar 6, 2019

Conversation

Akasurde
Copy link
Member

@Akasurde Akasurde commented Mar 5, 2019

SUMMARY

Signed-off-by: Abhijeet Kasurde akasurde@redhat.com

ISSUE TYPE
  • Bugfix Pull Request
  • Docs Pull Request
COMPONENT NAME

docs/bin/plugin_formatter.py
lib/ansible/plugins/become/pfexec.py

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
@Akasurde Akasurde requested a review from sivel March 5, 2019 08:22
@ansibot
Copy link
Contributor

ansibot commented Mar 5, 2019

@ansibot ansibot added affects_2.8 This issue/PR affects Ansible v2.8 bug This issue/PR relates to a bug. core_review In order to be merged, this PR must follow the core review workflow. docs This issue/PR relates to or includes documentation. needs_triage Needs a first human triage before being processed. support:community This issue/PR relates to code supported by the Ansible community. support:core This issue/PR relates to code supported by the Ansible Engineering Team. labels Mar 5, 2019
@gundalow
Copy link
Contributor

gundalow commented Mar 5, 2019

@Akasurde Could you please include an example of the error message here

@ansibot ansibot removed the needs_triage Needs a first human triage before being processed. label Mar 5, 2019
@Akasurde
Copy link
Member Author

Akasurde commented Mar 5, 2019

# PYTHONPATH=../../lib ../bin/plugin_formatter.py -t rst --plugin-type become --template-dir=../templates --module-dir=../../lib/ansible/plugins/become -o rst -v
Evaluating become files...
Generating rst
Generating plugin pages
about to template doas
about to template dzdo
about to template enable
about to template ksu
about to template machinectl
about to template pbrun
about to template pfexec
Traceback (most recent call last):
  File "../bin/plugin_formatter.py", line 774, in <module>
    main()
  File "../bin/plugin_formatter.py", line 761, in main
    process_plugins(plugin_info, templates, outputname, output_dir, options.ansible_version, plugin_type)
  File "../bin/plugin_formatter.py", line 557, in process_plugins
    text = templates['plugin'].render(doc)
  File "/Volumes/data/src/ansible/venvpy3/lib/python3.6/site-packages/jinja2/asyncsupport.py", line 76, in render
    return original_render(self, *args, **kwargs)
  File "/Volumes/data/src/ansible/venvpy3/lib/python3.6/site-packages/jinja2/environment.py", line 1008, in render
    return self.environment.handle_exception(exc_info, True)
  File "/Volumes/data/src/ansible/venvpy3/lib/python3.6/site-packages/jinja2/environment.py", line 780, in handle_exception
    reraise(exc_type, exc_value, tb)
  File "/Volumes/data/src/ansible/venvpy3/lib/python3.6/site-packages/jinja2/_compat.py", line 37, in reraise
    raise value.with_traceback(tb)
  File "../templates/plugin.rst.j2", line 112, in top-level template code
    {% for key, value in options|dictsort recursive %}
  File "../templates/plugin.rst.j2", line 172, in template
    {% for env in value.env %}
TypeError: 'NoneType' object is not iterable

This error is raised as there is a missing environment variable in pfexec become plugin. Traceback exits the script and due to which other plugin documentation is not created (dzdo and machinectl).

@bcoca
Copy link
Member

bcoca commented Mar 5, 2019

I agree, this should not be a fatal error, not all plugins are required to populate ALL possible configuration avenues ... its just nice that they do.

Copy link
Contributor

@samccann samccann left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

docs portion LGTM

@ansibot ansibot added shipit This PR is ready to be merged by Core and removed core_review In order to be merged, this PR must follow the core review workflow. labels Mar 6, 2019
@bcoca bcoca merged commit be2a349 into ansible:devel Mar 6, 2019
@Akasurde Akasurde deleted the pfexec_doc branch March 7, 2019 02:24
@Akasurde
Copy link
Member Author

Akasurde commented Mar 7, 2019

@bcoca @samccann Thanks for the review.

@ansible ansible locked and limited conversation to collaborators Jul 25, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
affects_2.8 This issue/PR affects Ansible v2.8 bug This issue/PR relates to a bug. docs This issue/PR relates to or includes documentation. shipit This PR is ready to be merged by Core support:community This issue/PR relates to code supported by the Ansible community. support:core This issue/PR relates to code supported by the Ansible Engineering Team.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants