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

rewrite of the developer guide, part 1 #45179

Merged
merged 10 commits into from
Sep 7, 2018
Merged

Conversation

acozine
Copy link
Contributor

@acozine acozine commented Sep 4, 2018

SUMMARY

Revision of the content in docs/docsite/rst/dev_guide. The proposed revisions can be seen (temporarily) at http://docs.testing.ansible.com/ansible/latest/dev_guide/index.html. For comparison purposes, the current content is at https://docs.ansible.com/ansible/devel/dev_guide/index.html and related pages.

This PR incorporates comments made on the first WIP PR, #44098.

ISSUE TYPE
  • Docs Pull Request
COMPONENT NAME

docs.ansible.com/ansible/devel/dev_guide

ANSIBLE VERSION

2.7

ADDITIONAL INFORMATION

This changeset:

  • deletes the testing_legacy_integration and repomerge pages and adds four new pages
  • leaves all other page names/locations the same, so we should not need to add server-side redirects
  • consolidates similar content
  • adds user-friendly links to the index page (as well as reorganizing the TOC)
  • does not revise the testing section, though that is next up for revision

@acozine acozine added the docs This issue/PR relates to or includes documentation. label Sep 4, 2018
@ansibot ansibot added affects_2.8 This issue/PR affects Ansible v2.8 support:core This issue/PR relates to code supported by the Ansible Engineering Team. labels Sep 4, 2018
@acozine acozine mentioned this pull request Sep 4, 2018

To get started, select one of the following topics.
If you want to extend Ansible by using a non-core module or plugin locally, creating a module or plugin, adding functionality to an existing module, or expanding test coverage, this guide is for you. We've included detailed information for developers on how to test and document modules, as well as the pre-requisites for getting your module or plugin accepted into Ansible Core.
Copy link
Contributor

Choose a reason for hiding this comment

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

prerequisites

Also, is this really only applicable to Ansible Core?

.. _debugging:

=================
Debugging Modules
Copy link
Contributor

Choose a reason for hiding this comment

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

Is this a good opportunity to start using sentence case (ccs standard approach)?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Sigh. I suppose you're right.


To debug a module running on a remote target (i.e. not ``localhost``):

- On your controller machine (running Ansible) set ``ANSIBLE_KEEP_REMOTE_FILES=1`` (this tells Ansible to retain the modules it sends to the remote machine instead of removing them)
Copy link
Contributor

Choose a reason for hiding this comment

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

all of these items need a period at the end :-) This would ideally be a numbered list as well (tho I wish rst automatically numbered!)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Hey, it turns out rST does support automatically numbered lists. Instead of 1. and 2., you put #. I tested this on a single page and am going back now to implement this across the dev guide. See https://thomas-cokelaer.info/tutorials/sphinx/rest_syntax.html#list-and-bullets.

Copy link
Member

Choose a reason for hiding this comment

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

does it render on github? iirc that is main reason people stuck to 'direct numbering'

- Take note of the remote path Ansible used on the remote host
- SSH into the remote target after the completion of the playbook
- Navigate to the directory (most likely it is going to be your ansible remote user defined or implied from the playbook: ``~/.ansible/tmp/ansible-tmp-...``)
- Here you should see the module that you executed from your Ansible controller, but this is the zipped file that Ansible sent to the remote host. You can run this by specifying ``python my_test_module.py`` (not necessary)
Copy link
Contributor

Choose a reason for hiding this comment

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

You can optinally run this by...

... and then remove the (not necessary) from the end of this item

docs/docsite/rst/dev_guide/debugging.rst Show resolved Hide resolved
Extending Ansible with local modules and plugins offers lots of shortcuts:

* you can copy other people's modules and plugins
* if you're writing a new module, you can choose any programming language you like
Copy link
Contributor

Choose a reason for hiding this comment

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

In theory, these should all start with a capital and end w/ a period.


To check the HTML output of your module documentation:

* save your completed module file into the correct directory: ``lib/ansible/modules/$CATEGORY/my_code.py``
Copy link
Contributor

Choose a reason for hiding this comment

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

Should be capital and end in period... and ideally numbered.

@acozine acozine merged commit 9a76441 into ansible:devel Sep 7, 2018
@acozine acozine deleted the dev_guide_short branch September 7, 2018 13:57
acozine pushed a commit to acozine/ansible that referenced this pull request Sep 7, 2018
* rewrite of the developer guide, part 1

(cherry picked from commit 9a76441)
acozine pushed a commit that referenced this pull request Sep 7, 2018
@acozine acozine added this to To do in OLD Ansible Documentation via automation Sep 17, 2018
@acozine acozine moved this from To do to Done in OLD Ansible Documentation Sep 17, 2018
ndswartz pushed a commit to ndswartz/ansible that referenced this pull request Nov 28, 2018
@ansible ansible locked and limited conversation to collaborators Jul 22, 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 docs This issue/PR relates to or includes documentation. support:core This issue/PR relates to code supported by the Ansible Engineering Team.
Projects
No open projects
Development

Successfully merging this pull request may close these issues.

None yet

4 participants