Commit Graph

1811 Commits (76f591e64c9ac4b3fcdcd3815db18d3cd42bb41c)

Author SHA1 Message Date
Sviatoslav Sydorenko e5609db342
[backport][2.9][PR #70446] Refactor Python API examples and docs (#70851)
* Add boilerplate snippet into `examples/`

It is a partial backport of #70224

(partially cherry picked from commit 4816bb4f43)

* 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.

(cherry picked from commit 20bb915092)
4 years ago
Sviatoslav Sydorenko 3fe5da947b
Fix the internal Python API usage examples (#70842)
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.

(cherry picked from commit 8d97c8c222)
4 years ago
David Shrewsbury 76815d3afc
Sanitize URI module keys with no_log values (#70762) (#70821)
* 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

(cherry picked from commit bf98f031f3)
4 years ago
John R Barker 2dd7942073
Update Molecule support contact (#70797) (#70805)
As Molecule started to use https://github.com/ansible-community/molecule/discussions we need to update documentation before retiring
the molecule-users mailing list.

(cherry picked from commit b7ee07215d)

Co-authored-by: Sorin Sbarnea <ssbarnea@users.noreply.github.com>
4 years ago
Abhijeet Kasurde 2a4f98d19f
[2.9] Docs: mention about Ansible workshops (#70378)
Lightbulb is deprecated in favor of https://ansible.github.io/workshops/. Update links accordingly.

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
(cherry picked from commit e4f48c920c)
4 years ago
Sandra McCann 3b7f71dfae
adds japanese translation as a version-switcher option (#70214) (#70217)
Co-authored-by: Alicia Cozine <acozine@users.noreply.github.com>
(cherry picked from commit 4a0f42923b)
5 years ago
Sloane Hertel 1f3185d3eb
Allow tasks to notify a fqcn handler name (#68213) (#70074)
* Allow tasks to notify a fqcn handler name

* Add tests. Fixes #68181

* Add changelog fragment

* Add test to ensure handlers are deduped properly with fqcn, role, and just handler names

* Add some docs about new special vars

(cherry picked from commit 087be1da50)

Co-authored-by: Matt Martz <matt@sivel.net>
5 years ago
Nilashish Chakraborty 0cdaec5316
Add platform guide for FRR (#69773) (#70067)
* Add platform guide for FRR

* Add entry in index

Signed-off-by: NilashishC <nilashishchakraborty8@gmail.com>
(cherry picked from commit 5a7f2f9d5d)

Add changelog
5 years ago
Abhijeet Kasurde dff302701a
[2.9] Update developing_modules_best_practices.rst (#69939)
wrong module path for module_utils.basic in developing_modules_best_practices.rst

(cherry picked from commit ff98ecc4d0)

Co-authored-by: usatosi <usatosi@e-mail.jp>
5 years ago
Sandra McCann 7adce02130
Explain module docs loss for devel (#68369) (#69546)
(cherry picked from commit 0d379d4205)
5 years ago
Abhijeet Kasurde 3fd73750dc [2.9] Docs: point inventory script to respective version
With collections migration, inventory scripts are moved from devel (2.10).
Point docs for inventory script to their respective version.

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
5 years ago
Felix Fontein c49f2218de
Mention acme_certificate behavior changes in porting guide caused by a bugfix and previously incorrect examples. (#69167) 5 years ago
Sloane Hertel d41e38435b
[2.9] CVE-2020-1746 - Remove the params module option from ldap_attr and ldap_entry (#68714)
* Remove the params module option from ldap_attr and ldap_entry

Module options that circumvent Ansible's option handling were disallowed
in:
https://meetbot.fedoraproject.org/ansible-meeting/2017-09-28/ansible_dev_meeting.2017-09-28-15.00.log.html

Additionally, this particular usage can be insecure if bind_pw is set
this way as the password could end up in a logfile or displayed on
stdout.

Fixes CVE-2020-1746

(cherry picked from commit 0ff609f1bc)

* Fix formatting for option names

Co-Authored-By: Felix Fontein <felix@fontein.de>

* Fix fail_json

* fix indentation error

Co-authored-by: Toshio Kuratomi <a.badger@gmail.com>
Co-authored-by: Felix Fontein <felix@fontein.de>
5 years ago
Abhijeet Kasurde 64d8947f7f [2.9] docs: Fixed "Edit on GitHub" link for plugin, cli
Fixed sphinx theme to navigate "Edit on Github" link to locate correct
plugin, cli source in GitHub repo.

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
(cherry picked from commit 2728c2476e)
5 years ago
Jeff Geerling b84e3faa3f
Add Kubernetes Working Group to Communicating guide. (#68501) 5 years ago
kaorihinata 39cfb63be6
Allow no_log=False to silence the no_log warnings for module parameters (#64733) (#67439)
As AnsibleModule._log_invocation is currently implemented, any parameter
with a name that matches PASSWORD_MATCH triggers the no_log warning as a
precaution against parameters that may contain sensitive data, but have not
been marked as sensitive by the module author.

This patch would allow module authors to explicitly mark the aforementioned
parameters as not sensitive thereby bypassing an erroneous warning message,
while still catching parameters which have not been marked at all by the
author.

Adds tests for various no_log states including True, False, and None (as
extracted by AnsibleModule._log_invocation) when applied to an argument with
a name that matches PASSWORD_MATCH.

Fixes: #49465 #64656
(cherry picked from commit 3ca4580cb4)
5 years ago
Andrew Klychkov 1bab4c99f3
Backport of 67645 docs/docsite/rst/: fix typos (#67649) 5 years ago
Andrew Klychkov 4cc4d77c4b
[2.9] Backport /docs/docsite/rst: fix typos (#67650)
* user_guide/intro_adhoc.rst: fix typo (#67644)

(cherry picked from commit 05a3192eb7)

* dev_guide/developing_modules_best_practices.rst: fix typo (#67639)

(cherry picked from commit 244277addd)

* /docs/docsite/rst/dev_guide: fix typos (#67643)

(cherry picked from commit 907c98ebcd)
5 years ago
Sam Doran c6a29ed7d2
[stable-2.9] Update example requirements file docs (#67626) (#67714)
Use "name" when possible rather than "src" to make the examples
of roles and collections in a single requirements files more
coherenant. Fundamentally, roles and collections are completely different.
But we can make the requiremets file easier to read by unifying the
format as much as possible.
(cherry picked from commit 6c70959131)

Co-authored-by: Sam Doran <sdoran@redhat.com>
5 years ago
Sandra McCann 80e5ed0bba
Specify lowercase only for Galaxy namespaces (#67485) (#67503)
* specify lowercase only for galaxy namespaces
* doh... include meta file

(cherry picked from commit a60feeb3c1)
5 years ago
Sandra McCann 79ad190f71
[backport][2.9]Add note that devel branch should not be used in real environments (#… (#67494)
* Add note that devel branch should not be used in real environments (#67483)

(cherry picked from commit 39fef58bea)
5 years ago
Jordan Borean 9895e18e24
Clarify b64encode with Python 2 (#67488) (#67491)
(cherry picked from commit 423a900791)
5 years ago
Felix Fontein aeade1412f
Docs: improve anchors vs. header bar (#67244) (#67317)
(cherry picked from commit fd43619f1a)
5 years ago
Sandra McCann 0ed22d1fbc
add info on creating doc fragments in a collection (#67171) (#67279)
* add info on creating doc fragments in a collection
Co-authored-by: Alicia Cozine <879121+acozine@users.noreply.github.com>

(cherry picked from commit 4dd2513371)
5 years ago
Wojciech Sciesinski b390f808d9
Link the testing documentation to the module documenting page (#67248) (#67288) 5 years ago
Sandra McCann 04d5325c3f
Document network resource modules (#66226) (#67053)
* add network resource module details to docs

(cherry picked from commit 3e35d2d63ce17fb694e645785ad855f01420f7d8)

* network resource module page, with example output

(cherry picked from commit 2ad6055efd)
5 years ago
Felix Fontein 05df06fe4d
Add anchor to each parameter row (#66895) (#67057)
* Add anchor to each paramater row
* Update docs/templates/plugin.rst.j2
* Insert full keys into plugin docs.
* Added visible links.

Co-authored-by: Felix Fontein <felix@fontein.de>
(cherry picked from commit 5b93a14a0f)

Co-authored-by: Dick Visser <dick.visser@geant.org>
5 years ago
Sandra McCann c8610efa24
Network prompts (#66584) (#67054)
* add network prompt examples and module examples

* Update docs/docsite/rst/network/user_guide/network_working_with_command_output.rst

Co-Authored-By: Nathaniel Case <this.is@nathanielca.se>
(cherry picked from commit 68ab8c23be)
5 years ago
anshulbehl 1e7434c49d
Adding network plugin changes for netconf and network_cli (#65708) (#67049)
* Adding network plugin changes for netconf and network_cli

(cherry picked from commit b349ec8fcf)
5 years ago
Sandra McCann 26a09160eb Trim down to one Ansible search option (#66284) (#66664)
* move swiftype search to upper left of docsite, fix spacing and length issues for search icon and searchbox

(cherry picked from commit 1a0724fdd4)
5 years ago
Sandra McCann af0a72df30 Add a banner which will display on the testing site. (#64763) (#66666)
* Add a banner which will display when the docs are published to the testing site.
Thanks to shane for the javascript code

Co-authored-by: Sandra McCann <samccann@redhat.com>
(cherry picked from commit 365820f871)

Co-authored-by: Toshio Kuratomi <a.badger@gmail.com>
5 years ago
Sandra McCann 85f36a3a42 restructure headings and copy-edit shell completion (#66479) (#66536)
* Docs: restructure headings and fix shell completion on installation guide, apply suggestions from code review

(cherry picked from commit 599cc0bdfa)
5 years ago
Sandra McCann de0936f9c4 add details on network gather facts improvements (#66220)
* add details on network gather facts improvements, implement feedback

(cherry picked from commit 9922014441)
5 years ago
Ganesh Nalawade 2d7819e75d Fix netconf plugin related to collections (#65718)
* Fix netconf plugin related to collections

Fixes #65655 (partly)

*  Make netconf plugins configurable so that the
   information of ncclient device handler
   for give platform resides in the platform
   specific netconf plugin.
*  If the device handler value in ncclient is
   different from the ansible_network_os value
   the right value of `ncclient_device_handler`
   should be set in the plugin documentation.

* Fix review comments

* Fix CI issue

* Fix review comment

(cherry picked from commit 1cfab26fab)
5 years ago
Wojciech Sciesinski df37d93754 Update indentation used in the code examples, unify empty lines (#65874) (#65886) 5 years ago
Mark Chappell 43a9bc96a5 AWS Guidelines: Make 'security_token' optional so that they can be run outside of CI (#66107) (#66136) 5 years ago
Wojciech Sciesinski fc89d45385 Update indentation used in the code examples, unify empty lines (#65346) (#65696) 5 years ago
Sandra McCann 6ba26e7556 Clarify how to install roles and collections from same requirements file (#65707) (#65736)
(cherry picked from commit 5eceebcaf3)
5 years ago
Sandra McCann 58a62da92d update version metadata to get faceted swiftype search running (#65574) (#65579)
* update version metadata to get faceted swiftype search running

(cherry picked from commit 96cbbdd59f)
5 years ago
Sandra McCann 9b27c7b7dc Backport/2.9/brokenlinks (#65016)
* Remove duplicated and broken link to Roles (#64991)

(cherry picked from commit f198036d7f)

* Fix link to Roles (#64992)

(cherry picked from commit 1d0a832692)

* fix collection broken links (#65010)

(cherry picked from commit 2749090bc6)
5 years ago
Alicia Cozine 23de3c1614
update configuring ansible-galaxy client (#64796) (#64904)
* update configuring ansible-galaxy client, deduplicate, clarify tokens, AH procedures, etc.

(cherry picked from commit a01376a493)
5 years ago
Felix Fontein 1f0c518965 Document 'elements' for module option and return value documentation. (#64075)
(cherry picked from commit 0bf9146b29)
5 years ago
Matt Martz 26e8474f6d [stable-2.9] unsafe wrapping should only happen for with_ loops (#64401)
* unsafe wrapping should only happen for with_ lookups. Fixes #64379. Addresses #64169

* edit porting guide entry

* typo in changelog fragment

* typo

Co-Authored-By: Sandra McCann <samccann@redhat.com>

* punctuation

Co-Authored-By: Sandra McCann <samccann@redhat.com>
(cherry picked from commit 254788b)

Co-authored-by: Matt Martz <matt@sivel.net>
5 years ago
Kiyo Nagamine cef3036179 [2.9] Fixed tiny typo in interpreter_discovery.rst
Added missing '/'

(cherry picked from commit 84bffff96a)
5 years ago
Sandra McCann 604e06c482 remove toshio as release manager (boohoo) (#64685) (#64740)
(cherry picked from commit 94e98d5369)
5 years ago
Matt Clay c271fd0df2 [stable-2.9] Fixes for validate-modules import handling. (#63932)
* Fix validate-modules support for collections.

- Relative imports now work correctly.
- The collection loader is now used.
- Modules are invoked as `__main__`.

* Remove obsolete validate-modules code ignores.

* Handle sys.exit in validate-modules.

* Add check for AnsibleModule initialization.

* Remove `missing-module-utils-import` check.

This check does not support relative imports or collections.

Instead of trying to overhaul the test, we can rely on the `ansible-module-not-initialized` test instead.

* Fix badly named error codes with `c#` in the name.

The `#` conflicts with comments in the sanity test ignore files.

* Add changelog entries.
(cherry picked from commit e9f8a34dce)

Co-authored-by: Matt Clay <matt@mystile.com>
5 years ago
Sandra McCann 02cc45a8ae clarify acceptable file types in collection docs (#64618) (#64622)
* clarify acceptable file times in collection docs

* implement feedback

(cherry picked from commit 6a662b0ed0)
5 years ago
Alicia Cozine f561e7d15f
updates RHEL packages to 2.9 (#64532) (#64620)
(cherry picked from commit ac9c75d467)
5 years ago
Christian Adams 6c7fadd861 clarify vault warning and fix typo (#64457)
(cherry picked from commit 59eb966042)
5 years ago
Sandra McCann 6d309f726d Add note about large tarball sizes for collections (#64411) (#64416)
* add note on collection tarball size

(cherry picked from commit 797397558e)
5 years ago