Commit graph

496 commits

Author SHA1 Message Date
Andrew Klychkov
bfba0ffc45
Docsite: improve developing_modules_documenting.rst (#71590)
* Docsite: improve developing_modules_documenting.rst

* add necessary dots to returns descriptions
2020-09-02 09:26:42 -04:00
Andrew Klychkov
cda5854099
Docsite: improve spelling_word_choice.rst (#71592) 2020-09-02 09:24:53 -04:00
Alicia Cozine
29b20bd1b1
DOCS: Mentions ansible-base, adds collections pointers to Community and Dev Guides (#71480) 2020-09-01 12:25:37 -04:00
Andrew Klychkov
56423b1648
testing_sanity.rst: add argument for running in docker (#71223) 2020-09-01 12:00:13 -04:00
Amin Vakil
bc6461432e
Add --allow-disabled to sanity docs (#71524) 2020-08-31 10:46:03 -05:00
Sandra McCann
addee0699e
quick update to changelog instructins (#71492) 2020-08-27 11:05:35 -05:00
Patrick Reader
2b7461eb52
fix broken links due to master -> main branch rename (#71426) 2020-08-24 15:39:21 -04:00
Andrew Klychkov
5498b0bb71
Documentation: improve dev_guide/testing_integration.rst (#71370) 2020-08-20 15:24:22 -04:00
Andrew Klychkov
b82889eef5
Add note about integration tests for new modules to the dev guide (#71345) 2020-08-20 10:15:08 -04:00
Sandra McCann
74f88c56a5
quick fix to change main back to devel (#71342)
* quick fix to change main back to devel
* Update docs/docsite/rst/dev_guide/developing_collections.rst

Co-authored-by: Felix Fontein <felix@fontein.de>
2020-08-19 15:26:12 -05:00
Rick Elrod
ea58d7c233
Make it so callback plugins can act on implicit/explicit meta tasks (#71009)
Change:
- Now sends meta tasks to the task start callback
- Lets callback plugins opt-in to receiving implicit tasks

Test Plan:
- New integration tests

Tickets:
- Indirectly fixes #71007 by allowing custom callbacks with this data

Signed-off-by: Rick Elrod <rick@elrod.me>
2020-08-18 16:56:48 -05:00
Abhijeet Kasurde
4f993922c8
Add documentation about info/facts module development (#71250)
Fixes: #40151

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2020-08-18 15:56:43 -04:00
Andrew Klychkov
180507c62b
dev_guide: improve developing_collections.rst (#71332) 2020-08-18 12:07:27 -04:00
Abhijeet Kasurde
606604bb97
Add warning about copyright year change (#71251)
To simplify project administration and avoid any legal issues,
add a warning in the docs. This reflects - https://github.com/ansible/ansible/issues/45989#issuecomment-423635622 and fixes: #45989

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2020-08-17 15:44:06 -05:00
Sayee
ecd3b52ad7
Writing style updates to Developing dynamic inventory topic (#71245)
* modified the writing style

* incorporated peer feedback
2020-08-17 14:16:19 -05:00
Abhijeet Kasurde
ecea018506
Fix 404 links (#71256)
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2020-08-17 13:52:45 -04:00
Andrew Klychkov
a496b89d6f
overview_architecture.rst: fix playbook example (#71303) 2020-08-17 13:44:05 -04:00
Andrew Klychkov
9296ee9329
developing_modules_in_groups.rst: add note about releasing (#71305) 2020-08-17 13:43:15 -04:00
Sayee
7195788ffe
updates per writing style (#70978)
* updated to follow IBM and Ansible style guides
* modified heading underlines
* incorporated peer review feedback
2020-08-10 17:39:34 -05:00
Toshio Kuratomi
fb144c4414
Update ansible doc formats (#71070)
* Fix tty_ify bugs and refactor

* Move tty_ify() and supporting attributes to the DocCLI class as that's
  the only thing using it.
* Add unittest for the code.
* Fix a bug where the substitution macros can be detected when they are
  a part of another word.
* Add support for L(), R(), and HORIZONTALLINE which were added to the
  website docs many years ago.

* Update test/units/cli/test_doc.py

Co-authored-by: Matt Clay <matt@mystile.com>

Co-authored-by: Matt Clay <matt@mystile.com>
2020-08-05 10:53:25 -07:00
Sloane Hertel
a9eb8b0488
Add some documentation for the format of meta/runtime.yml (#71035)
* Document the format of meta/runtime.yml

* Document multiple Ansible versions

Clarify difference between deprecation and tombstone fields

* add note
2020-08-04 11:25:08 -04:00
Rick Elrod
7f62a9d7b5
Make cache adjudicator's flush call plugin flush (#70987)
Change:
- Previously CachePluginAdjudicator#flush only removed entries from the
  cache backend that it knew about by using them earlier. Now it calls
  the underlying plugin's flush() method.

Test Plan:
- New unit tests

Tickets:
- Fixes #68770

Signed-off-by: Rick Elrod <rick@elrod.me>
2020-08-03 17:16:15 -05:00
EthanHur
0c855dc70b
Guide users to use ansible-runner (#71063)
Update the docs to guide users to use `ansible-runner` instead of using Python API directly. In many use cases, executing Ansible playbooks are sufficient. In those use cases, `ansible-runner` is easier and much stable to use comparing with Python API, but there is no mention of it.
2020-08-03 10:15:37 -05:00
Sandra McCann
58145dff9c
document how to migrate between collections (#70243)
* document how to migrate between collections
* Apply suggestions from code review

Co-authored-by: John R Barker <john@johnrbarker.com>
Co-authored-by: Felix Fontein <felix@fontein.de>
2020-07-30 15:51:53 -05:00
Sam Doran
7f0c84ea15
Update module debugging docs (#70847)
- Combine remote and local debugging instructions.
- Update the example code to match current AnsiballZ structure and behavior
- Change reference name and update references
- Clarify how PYTHON path is modified
- Also add note about other remote debugging tools.

Co-authored-by: Alicia Cozine <879121+acozine@users.noreply.github.com>
2020-07-29 12:14:49 -04:00
Sandra McCann
748ba96610
How to use rst :ref: for modules in collections (#70567) 2020-07-28 17:40:16 -05:00
Felix Fontein
7e2cc7db12
validate-modules: fix version_added validation for top-level, fix error codes (#70869)
* Also validate top-level version_added.

* Fix error code.

* Produce same version_added validation error in schema than in code (and stop returning it twice).

* Return correct error codes for invalid version_added for options and return values.

* Add changelog.

* Fix forgotten closing braket.

* Accept 'historical' for some top-level version_added.
2020-07-28 10:10:35 -05:00
Sviatoslav Sydorenko
20bb915092
Refactor Python API examples and docs
PR #70446: it's a follow-up for #70445.

It includes a merge of `examples/scripts/uptime.py` and a similar
code snippet from `docs/docsite/rst/dev_guide/developing_api.rst`.

This patch also changes the docs RST file to include contents of
the example file instead of holding a copy of a similar code.
2020-07-23 18:24:02 +02:00
David Shrewsbury
bf98f031f3
Sanitize URI module keys with no_log values (#70762)
* Add sanitize_keys() to module_utils.

* More robust tests

* Revert 69653 change

* Allow list or dict

* fix pep8

* Sanitize lists within dict values

* words

* First pass at uri module

* Fix insane sanity tests

* fix integration tests

* Add changelog

* Remove unit test introduced in 69653

* Add ignore_keys param

* Sanitize all-the-things

* Ignore '_ansible*' keys

* cleanup

* Use module.no_log_values

* Avoid deep recursion issues by using deferred removal structure.

* Nit cleanups

* Add doc blurb

* spelling

* ci_complete
2020-07-22 14:49:37 -05:00
Sayee
1733253297
Modification of 'Adding modules and plugins locally' topic (#70659)
* Remediated the topic to comply with IBM style guide and minimalism practices
Co-authored-by: Alicia Cozine <879121+acozine@users.noreply.github.com>
2020-07-22 11:59:18 -05:00
Baptiste Mille-Mathias
92e16c2838
Few fixes for reference_appendices/faq.html (#70719)
* Format using `` instead of `, add line breaks for long lines, rephrase or remove useless text.
Move some text.

* Add clearer version of OpenSSh is affected by SCP bug

* Review some pages using ansible doc writing guide.
2020-07-20 13:43:39 -05:00
Stef B
fb3db170cc
Make Sources, Plugins sections easier to read (#70652)
Re-wrote the Inventory Sources section and also the next section to have shorter, clearer sentences with a more active voice.
2020-07-20 13:30:06 -05:00
Alicia Cozine
f1f782fc37
partial update of community docs to reflect collections transition (#70488) 2020-07-14 15:47:18 -04:00
Abhijeet Kasurde
375c6b4ae4
docs: update date format in removed_at_date (#70597)
removed_at_date requires YYYY-MM-DD format.

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2020-07-14 11:43:25 -04:00
Abhijeet Kasurde
20209c508f
docs: update module development docs (#70594)
Update module development docs for flattened modules directory.

Fixes: #70261 (at least partially)

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2020-07-13 14:41:59 -05:00
Mark Chappell
e1ba7dc52a
Update AWS Integration test docmentation (#70454) 2020-07-08 08:01:37 +05:30
Baptiste Mille-Mathias
bd1378405b
Small documentation fixes (#70480)
* Add type for options in the sample module shown in Developing Modules, as this is required to have the tests being
green
* Remove duplicated strings: the same sentence is in "Python tips" and "Module security", keeping the
latter.
2020-07-06 12:53:10 -05:00
Sviatoslav Sydorenko
8d97c8c222 Fix the internal Python API usage examples
Previous version initialized the `TaskQueueManager` after calling
`Play.load()` while advertising a way to inject a custom library
location path. This caused the tasks loader not to find any custom
modules because it was triggered before the path was actually added
to the module loader.

This patch changes the order of the operations to ensure that the
customized `context.CLIARGS` actually influences things.

Resolves https://github.com/ansible/ansible/issues/69758.
2020-07-03 10:44:54 +02:00
Michael Ritsema
82e5d03bdb
Suggest ansible ad-hoc command while developing module (#70308)
If a local module has no documentation, the doc command will fail without any hints of what is wrong. Add another way to confirm the presence of a local module.
* Update docs/docsite/rst/dev_guide/developing_locally.rst

Co-authored-by: Abhijeet Kasurde <akasurde@redhat.com>
2020-07-02 17:23:37 -05:00
Sandra McCann
5a28b2b86c
Add steps for how to create changelog.rst for a collection (#70262)
* Update docs/docsite/rst/dev_guide/developing_collections.rst
* add steps to create changelogs, add sentence about not using the tool
* add note for rerunning the command

Co-authored-by: Felix Fontein <felix@fontein.de>
2020-06-29 14:22:31 -05:00
Sandra McCann
83f6e4850b
document FQCN for M() and :seealso: in DOCUMENTATION blocks (#70245)
* document FQCN for M() in DOCUMENTATION blocks

* add note about c
2020-06-29 11:16:59 -05:00
Abhijeet Kasurde
da868d9d60
docs: Add note about ansible-doc (#70162)
ansible-doc can only parse Python modules, added a note about
this is developer guide; Fixes: #69109
2020-06-19 14:28:02 -05:00
Jill R
0ef75f65d9
Fix broken link in AWS Guide (#70153)
Point to collection rather than ansible/ansible for example.
2020-06-19 14:18:55 -05:00
Sandra McCann
c9c8cd34b2
added documentation for R() (#69832)
* Updated docs/docsite/rst/dev_guide/developing_modules_documenting.rst, added documentation for R()
* added link to how to add anchors, anchor, and clarification on when to use each option

Co-authored-by: John R Barker <john@johnrbarker.com>
Co-authored-by: Alicia Cozine <879121+acozine@users.noreply.github.com>
2020-06-16 11:50:50 -05:00
Sandra McCann
2609482975
How to contribute to Ansible maintained collections (#69202)
contributor info with HTML table
2020-06-15 15:38:42 -05:00
John R Barker
37785255f2
validate ansible-base's and collections runtime.yml (#69742)
* Validate ansible-base & collection's runtime.yml

Add new test `runtime-metadata`

* Schema validation of file
* Error if a a legacy meta/routing.yml exist in a collection
* removal_date OR removal_version

* Add tombstone validation.

* Allow both ISO 8601 date strings and datetime.date objects (from YAML dates).

* Address review comments.

* Add metadata to test collection.

* Add requirements file.

Co-authored-by: Felix Fontein <felix@fontein.de>
Co-authored-by: Matt Clay <matt@mystile.com>
2020-06-12 15:34:34 +01:00
Sandra McCann
524257a7b0
Document the ability to deprecate by date (#69833)
* Document the ability to deprecate by date
* deprecated_in and deprecated_by_date are mutually exclusive
2020-06-11 15:28:24 -05:00
Felix Fontein
a114da80ee
Use antsibull-changelog instead of packaged changelog generator (#69313)
Replace the ansible-base changelog linting and generation tool with antsibull-changelog and make it available for linting collections. Previously changelog linting was limited to ansible-base.
2020-06-11 11:21:21 -07:00
Alicia Cozine
d7c03e9fdb
Update testing collections to mention ansible-base versions (#69805)
Co-authored-by: Alicia Cozine <acozine@users.noreply.github.com>
2020-06-10 16:22:01 -04:00
Felix Fontein
a862ff2d43
Deprecation revisited (#69926)
* Allow to specify collection_name separately for deprecation.

* Use new functionality in Ansible.

* Use new functionality in tests.

* Update tagging/untagging functions.

* Update pylint deprecated sanity test.

* Update validate-modules. Missing are basic checks for version_added (validate semantic version format for collections).

* Improve version validation. Re-add version_added validation.

* Make sure collection names are added to return docs before schema validation.

* Extra checks to avoid crashes on bad data.

* Make C# module utils code work, and update/extend tests.

* Add changelog fragment.

* Stop extracting collection name from potentially tagged versions/dates.

* Simplify C# code.

* Update Windows modules docs.

* Forgot semicolons.
2020-06-09 15:21:19 -07:00