Commit graph

71 commits

Author SHA1 Message Date
Andrew Klychkov
dbbc44b1f4
[2.10] Docsite backport of 71973, 71975, 71980 (#71991)
* Docsite: improve user_guide/playbooks_vars_facts (#71973)

* Docsite: improve user_guide/playbooks_vars_facts

* Docsite: update user_guide/vault (#71975)

* Docsite: update user_guide/playbooks_filters (#71980)
2020-10-23 15:27:03 -05:00
Baptiste Mille-Mathias
c24bdfa7df
Add example values and results for theory filters (#72087)
(cherry picked from commit 69c3e5644c)
2020-10-09 10:52:16 -05:00
Alicia Cozine
43e0aa5b57
WIP: Backport/2.10/71588 (#71626)
* Add dual index pages for roadmaps (part of #71566)

(cherry picked from commit b518a5db14)

* Docsite: replace Latin phrases to English (#71588)

Replace Latin phrases like "e.g." and "i.e." and "etc." with English phrases.

* Update docs/docsite/rst/community/committer_guidelines.rst
* Update docs/docsite/rst/dev_guide/developing_modules_documenting.rst
* Update docs/docsite/rst/dev_guide/developing_program_flow_modules.rst
* Update docs/docsite/rst/dev_guide/module_lifecycle.rst
* Update docs/docsite/rst/user_guide/intro_inventory.rst
* Update docs/docsite/rst/user_guide/playbooks_loops.rst
* Update docs/docsite/rst/user_guide/playbooks_reuse.rst
* Update docs/docsite/rst/dev_guide/platforms/aws_guidelines.rst
* Update docs/docsite/rst/dev_guide/testing.rst
* Update docs/docsite/rst/dev_guide/testing_integration.rst
* Update docs/docsite/rst/porting_guides/porting_guide_2.5.rst
* Update docs/docsite/rst/reference_appendices/faq.rst

(cherry picked from commit 7bfeed3e24)

* fix index page and TOCs

* adds old roadmap index

* adds toctree ref for old roadmaps

Co-authored-by: Sandra McCann <samccann@redhat.com>
Co-authored-by: Andrew Klychkov <aaklychkov@mail.ru>
Co-authored-by: Alicia Cozine <acozine@users.noreply.github.com>
2020-09-04 14:44:13 -05:00
Sandra McCann
ae9c1167e4
[2.10] Docs Backportapalooza 7 (#71261)
* Fixes due to branch being renamed (#71115)
The ansible collection repository correctly renamed their default branch from `master` to `main`, which has caused a number for broken urls. This PR fixes those urls.

(cherry picked from commit fb9c9570d5)

* Docs:  Fix typo (#71119)

(cherry picked from commit cb9336ab6d)

* remove network for 2.10 base porting guide (#71158)

(cherry picked from commit 56748a8060)

* Updating Getting Started with Resources section #68962 (#71102)

* Updating Getting Started with Resources section #68962
* Add links, including Workshops URL #68962

(cherry picked from commit 5f8b45a70e)

* start of 'data manipulation' examples (#46979)

Co-authored-by: Klaus Frank <agowa338@users.noreply.github.com>
Co-authored-by: Felix Fontein <felix@fontein.de>
Co-authored-by: Abhijeet Kasurde <akasurde@redhat.com>
(cherry picked from commit f46b124d65)

* toml: Clarify about inventory examples (#71180)

Add a note in toml inventory plugin about three different
inventory examples. Fixes: #67003

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
(cherry picked from commit edac065bd2)

* filters: minor doc fix (#71178)

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
(cherry picked from commit 0a7ab396c7)

* docs: 'ansible_play_hosts' lists active hosts, not limited by serial (#71116)

ansible_play_batch lists the currently targeted host(s) in the serial/batch, while
ansible_play_hosts lists all the hosts which will be targeted by the play.

(cherry picked from commit e72e12aa27)

* Fix references to Ansible Collections Overview (#71227)

(cherry picked from commit 19589db10c)

* add another resource module example (#71162)

* Update docs/docsite/rst/network/user_guide/network_resource_modules.rst
Co-authored-by: Nilashish Chakraborty <nilashishchakraborty8@gmail.com>

(cherry picked from commit f4388de14d)

* Adds fest link (#71241)

(cherry picked from commit ae3b8eec12)

* Update release page for ansible and ansible-base (#71229)

* [docs] 2.7 is EOL, add 2.10 which is almost out
- Remove 2.7 support from the maintenance schedule
- Add 2.10 which is in RC and will be out soon enough.
Signed-off-by: Rick Elrod <rick@elrod.me>

* Update docs/docsite/rst/reference_appendices/release_and_maintenance.rst, fix table and separate ansible-base from ansible, fix rstcheck errors, clean up sections, explain the two packages
Co-authored-by: Sandra McCann <samccann@redhat.com>
Co-authored-by: Rick Elrod <rick@elrod.me>

(cherry picked from commit 553ccedcd3)

Co-authored-by: Daniel Finneran <dan@thebsdbox.co.uk>
Co-authored-by: Liviu Chircu <liviu@opensips.org>
Co-authored-by: kshitijcode <ikshitijsharma@gmail.com>
Co-authored-by: Brian Coca <bcoca@users.noreply.github.com>
Co-authored-by: Abhijeet Kasurde <akasurde@redhat.com>
Co-authored-by: Håkon Solbjørg <hakon@solbj.org>
Co-authored-by: Andrew Klychkov <aaklychkov@mail.ru>
Co-authored-by: Alicia Cozine <879121+acozine@users.noreply.github.com>
2020-08-13 12:23:46 -05:00
Sandra McCann
b9a406f890
Docs [2.10] Backportapalooza 6 (#71129)
* Misc typo fixes (#71089)

(cherry picked from commit 504ef607f3)

* 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

(cherry picked from commit a9eb8b0488)

* add note to uninstall older versions of ansible for pip (#71023)

* add note to uninstall older versions of ansible for pip

* combine with the other PR

(cherry picked from commit 72d3d44163)

* VMware: Inventory scenario guide for hostnames (#71055)

Added a scenario guide for ``hostnames`` parameter
for vmware_vm_inventory.

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
(cherry picked from commit 0055673c70)

* Document string tests a bit more (#71049)

- Explain how `regex` differs from `match` and `search`.
- Document `multiline` and `ignorecase`.

Signed-off-by: Rick Elrod <rick@elrod.me>
(cherry picked from commit 701c638757)

* docs: Add a note about package requirements for fact gathering (#70796)

Fixes: #26148

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
(cherry picked from commit a6725d6e2a)

* added note about fakeroot (#71018)

see #70895

(cherry picked from commit 11a31e99e6)

* Update documentation of httpapi's handle_httperror method for clarity (#70991)

(cherry picked from commit a0523e5b8a)

* DOCS: add 2.10 collections roadmap (#70975)

* draft of 2.10 collections roadmap

* incorporates feedback from felixfontein

* gundalow and samccann feedback, fix link

Co-authored-by: Alicia Cozine <acozine@users.noreply.github.com>
(cherry picked from commit 9879da8e23)

* updates changelog types; some updates for easier translation (#71027)

Co-authored-by: Alicia Cozine <acozine@users.noreply.github.com>
Co-authored-by: Felix Fontein <felix@fontein.de>
(cherry picked from commit 4f4436c124)

* Document common return values with examples (#71046)

* adding return value examples
* shift to console code blocks
* cleaning up whitespace and shortening invocation example
* reordering diff section

(cherry picked from commit 864573a38d)

* Update intro_getting_started.rst (#71039)

Added two additional learning resources in the See also: section- forgot closing backticks

(cherry picked from commit 9850915bd6)

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

(cherry picked from commit 0c855dc70b)

* Porting guides for ansible-base 2.10 and ansible 2.10 (#70891)

* Fix changelog link title.

* Rename Ansible 2.10 and 2.11 porting guides to Ansible-base porting guides.

* Add stub for automatically generated 2.10 porting guide.

* Move things that should not be in the ansible-base porting guide to the ansible porting guide.

* Apply changes to base porting guides.

* Add remark that ansible-base is mainly for developers.

* Ansible Base -> Ansible-base

* Fix link in base porting guide.

* Add generated porting guide.

* Use same header signs as antsibull-changelog's RST builder.

* Update generated porting guide.

(cherry picked from commit 61b36c6f30)

* Update network platform guides with FQCN (#70699)

* fqcn all the docs things!

(cherry picked from commit 54bee7152b)

* Document how to upgrade to ansible with pip (#70768)

Fixes #70348

(cherry picked from commit 5019335660)

* 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>
(cherry picked from commit 58145dff9c)

* remove github link from plugins (#70951)

(cherry picked from commit e28b20d729)

* Add latest rc from ansible-base (#70974)

* Add latest rc from ansible-base

(cherry picked from commit d62dffafb3)

* Document to_json will convert to ASCII strings by default (#70954)

... as reported in issue #68702

(cherry picked from commit 8c48366f1c)

* Update the porting guide for ansible-2.10.0a8 (#71141)

(cherry picked from commit 0a9638ce4b)

Co-authored-by: Abhijeet Kasurde <akasurde@redhat.com>
Co-authored-by: Sloane Hertel <shertel@redhat.com>
Co-authored-by: Rick Elrod <rick@elrod.me>
Co-authored-by: Brian Coca <bcoca@users.noreply.github.com>
Co-authored-by: Nathaniel Case <ncase@redhat.com>
Co-authored-by: Alicia Cozine <879121+acozine@users.noreply.github.com>
Co-authored-by: Terciero <terciero@users.noreply.github.com>
Co-authored-by: Brendon O'Sullivan <49501251+bjosullivan@users.noreply.github.com>
Co-authored-by: EthanHur <ethan0311@gmail.com>
Co-authored-by: Felix Fontein <felix@fontein.de>
Co-authored-by: Baptiste Mille-Mathias <baptiste.millemathias@gmail.com>
Co-authored-by: Toshio Kuratomi <a.badger@gmail.com>
2020-08-07 16:04:19 -05:00
Sandra McCann
8d2b25d490
Docs backportapalooza 4 (#70875)
* Pipe lookup plugin usage example documentation fix (#70679)

(cherry picked from commit 58d24584c0)

* Fix misleading documentation for naming blocks (#68458)

From what I have observed it is the block itself that doesn't support the name attribute rather than the tasks inside the block.

* Update docs/docsite/rst/user_guide/playbooks_blocks.rst

Co-authored-by: Alicia Cozine <879121+acozine@users.noreply.github.com>
(cherry picked from commit 633c2d0522)

* Fix incorrect statement to set a variable for a playbook (#70712)

Fixes #70638

(cherry picked from commit 59513ae673)

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

(cherry picked from commit fb3db170cc)

* fix rstcheck problem and gitignore collections dir (#70764)

(cherry picked from commit 24e5d3a51c)

* add note for write permission on rst files (#70766)

* add note for write permission on rst files
* Update docs/docsite/rst/community/documentation_contributions.rst

Co-authored-by: Toshio Kuratomi <a.badger@gmail.com>
(cherry picked from commit 2a7df5e07b)

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

(cherry picked from commit 1733253297)

* WIP: add collections as an intersphinx link (#70826)

* adds collections as a ref for intersphinx

* no need for intersphinx

Co-authored-by: Alicia Cozine <acozine@users.noreply.github.com>
(cherry picked from commit b28d59124b)

* Proper example for splitext filter in docs (#70494)

* Update playbooks_filters.rst with a clear example of how to extract its 2 tokens.

Co-authored-by: Sloane Hertel <shertel@redhat.com>
(cherry picked from commit 7a42d27462)

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

(cherry picked from commit 92e16c2838)

Co-authored-by: Roman Gorshunov <34521622+gorshunovr@users.noreply.github.com>
Co-authored-by: David Rieger <david@isan.engineer>
Co-authored-by: Baptiste Mille-Mathias <baptiste.millemathias@gmail.com>
Co-authored-by: Stef B <regendo@users.noreply.github.com>
Co-authored-by: Sayee <57951841+sayee-jadhav@users.noreply.github.com>
Co-authored-by: Alicia Cozine <879121+acozine@users.noreply.github.com>
Co-authored-by: Fixmetal <fixmetal@gmail.com>
2020-07-28 17:38:17 -05:00
Toshio Kuratomi
46b1a999c6
Collections docs generation backport (#70515)
* Build documentation for Ansible-2.10 (formerly known as ACD).

Builds plugin docs from collections whose source is on galaxy

The new command downloads collections from galaxy, then finds the
plugins inside of them to get the documentation for those plugins.

* Update the python syntax checks
  * docs builds can now require python 3.6+.

* Move plugin formatter code out to an external tool, antsibull-docs.
  Collection owners want to be able to extract docs for their own
  websites as well.
* The jinja2 filters, tests, and other support code have moved to antsibull
* Remove document_plugins as that has now been integrated into antsibull-docs

* Cleanup and bugfix to other build script code:
  * The Commands class needed to have its metaclass set for abstractmethod
    to work correctly
  * Fix lint issues in some command plugins

* Add the docs/docsite/rst/collections to .gitignore as
  everything in that directory will be generated so we don't want any of
  it saved in the git repository
* gitignore the build dir and remove edit docs link on module pages

* Add docs/rst/collections as a directory to remove on make clean
* Split the collections docs from the main docs

* remove version and edit on github
* remove version banner for just collections
* clarify examples need collection keyword defined

* Remove references to plugin documentation locations that no longer exist.
  * Perhaps the pages in plugins/*.rst should be deprecated
    altogether and their content moved?
  * If not, perhaps we want to rephrase and link into the collection
    documentation?
  * Or perhaps we want to link to the plugins which are present in
    collections/ansible/builtin?

* Remove PYTHONPATH from the build-ansible calls
  One of the design goals of the build-ansible.py script was for it to
  automatically set its library path to include the checkout of ansible
  and the library of code to implement itself.  Because it automatically
  includes the checkout of ansible, we don't need to set PYTHONPATH in
  the Makefile any longer.

* Create a command to only build ansible-base plugin docs
  * When building docs for devel, only build the ansible-base docs for
    now.  This is because antsibull needs support for building a "devel
    tree" of docs.  This can be changed once that is implemented
  * When building docs for the sanity tests, only build the ansible-base
    plugin docs for now.  Those are the docs which are in this repo so
    that seems appropriate for now.

* Docs: User guide overhaul, part 5 (#70307)

(cherry picked from commit db354c0300)

* Need to return any error code from running antsibull-docs (#70763)

This way we fail early if there's a problem

(cherry picked from commit 1e3989c9f7)

Co-authored-by: Alicia Cozine <879121+acozine@users.noreply.github.com>
2020-07-20 14:28:35 -07:00
Sandra McCann
c936b8b638
[backport][2.10]Docs backportapalooza3 (#70695)
* 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>
(cherry picked from commit 82e5d03bdb)

* Update AWS Integration test docmentation (#70454)

(cherry picked from commit e1ba7dc52a)

* Update hacking/shippable docs.

The `--all` option downloads more than is needed for analyzing code coverage.

(cherry picked from commit fb7740ae3b)

* Document that subversion module requires subversion (#70537)

(cherry picked from commit 64c2cb273f)

* update documentation link to python 3 (#70509)

update the docs link for strftime on the filters page to point to the python3 docs

(cherry picked from commit f7db428375)

* Update windows_winrm.rst (#70306)

gcc also needed to be installed alongside python-devel, krb5-devel, krb5-libs, and krb5-workstation.

(cherry picked from commit f4ea43c4a0)

* updated requirements file for docs build (#70609)

(cherry picked from commit 38ccfb4a3e)

* Clarify that index_var is 0 indexed (#70548)

A little further down the page is another index, ansible_loop.index, which shares a similar description but is 1 indexed.
Its zero indexed twin has a 0 suffix.

``ansible_loop.index``      The current iteration of the loop. (1 indexed)
``ansible_loop.index0``     The current iteration of the loop. (0 indexed)

To remove ambiguity around the usage of index_var, explicitly mention that this variable is 0 indexed.

(cherry picked from commit c410311f55)

* 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>
(cherry picked from commit 20209c508f)

* Doc: fix examples of changelog entries. (#70551)

(cherry picked from commit edcd1a1a70)

* Document tags are not supported with task meta. (#70590)

fixes #70338

(cherry picked from commit 40591d5fbb)

* 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>
(cherry picked from commit 375c6b4ae4)

* partial update of community docs to reflect collections transition (#70488)

(cherry picked from commit f1f782fc37)

Co-authored-by: Michael Ritsema <michaelritsema@users.noreply.github.com>
Co-authored-by: Mark Chappell <mchappel@redhat.com>
Co-authored-by: Matt Clay <matt@mystile.com>
Co-authored-by: Alan Rominger <arominge@redhat.com>
Co-authored-by: FloMiau <37121807+FloMiau@users.noreply.github.com>
Co-authored-by: mahadelmi <mahadelmi@cmail.carleton.ca>
Co-authored-by: Sayee <57951841+sayee-jadhav@users.noreply.github.com>
Co-authored-by: Karl Goetz <goetzk@users.noreply.github.com>
Co-authored-by: Abhijeet Kasurde <akasurde@redhat.com>
Co-authored-by: Andrew Klychkov <aaklychkov@mail.ru>
Co-authored-by: Baptiste Mille-Mathias <baptiste.millemathias@gmail.com>
Co-authored-by: Alicia Cozine <879121+acozine@users.noreply.github.com>
2020-07-17 13:50:40 -05:00
Sandra McCann
374d4ecd98
Doc backportapalooza 2 (#70440)
* doc: avoid mix of single and double quotes (#70115)

Avoid mix of single and double quotes in the `ternary`, this way
we can copy/past the example without any surprise.

(cherry picked from commit b491f776b9)

* document FQCN for M()  and :seealso: in DOCUMENTATION blocks (#70245)

* document FQCN for M() in DOCUMENTATION blocks

* add note about c

(cherry picked from commit 83f6e4850b)

* Fix bullet points in intro_getting_started.rst. (#70365)

The layout was jumbled due to issues with whitespace.

(cherry picked from commit dc6f4b6502)

* 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>
(cherry picked from commit 5a28b2b86c)

* ansible-doc: avoid problems with YAML anchors when formatting man page (#70045)

* Avoid problems with YAML anchors when formatting man page.

* Add changelog.

(cherry picked from commit 5e4f708241)

* Minor grammatical fix (#70405)

'you' -> 'your'

(cherry picked from commit a1ac595d42)

* incorporate minimalism feedback on filters page (#70366)

Co-authored-by: Alicia Cozine <acozine@users.noreply.github.com>
(cherry picked from commit c89f3cda9e)

* more correct info about role main.yml (#70326)

fixes #40496

(cherry picked from commit 5d3d097de3)

* Fix a small typo in cache plugin description @ `config/base.yml`

PR #70420

(cherry picked from commit 626df08d9d)

* with_sequence: example using vars (#69369)

Added an example for using vars in with_sequence.

Fixes: #68836

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
(cherry picked from commit 5709173c32)

* Update pull.py (#70393)

(cherry picked from commit 46ad3c1162)

* Update playbooks.rst (#70317)

(cherry picked from commit 7c90a2d2a6)

* Add documentation for ipaddr filters  (#70343)

(cherry picked from commit 9eb904ea61)

* update platform table with links to collections (#70373)

(cherry picked from commit aa59c23aed)

* Add description of collections and become_exe keywords (#68055)

* Add description of collections keyword
* Update based on feedback.
- Add link to become plugins.
- Add note about how the collections keyword works with roles.

(cherry picked from commit 5833af9e2a)

Co-authored-by: Gonéri Le Bouder <goneri@lebouder.net>
Co-authored-by: Mark Sanders <ziplokk.mark.sanders@gmail.com>
Co-authored-by: Felix Fontein <felix@fontein.de>
Co-authored-by: Sir Mobus Gochfulshigan Dorphin Esquire XXIII <celestialtuba@gmail.com>
Co-authored-by: Alicia Cozine <879121+acozine@users.noreply.github.com>
Co-authored-by: Brian Coca <bcoca@users.noreply.github.com>
Co-authored-by: Michael Scherer <mscherer@users.noreply.github.com>
Co-authored-by: Abhijeet Kasurde <akasurde@redhat.com>
Co-authored-by: Ethan <smithe2413@gmail.com>
Co-authored-by: jafiala <56597272+jafiala@users.noreply.github.com>
Co-authored-by: Baptiste Mille-Mathias <baptiste.millemathias@gmail.com>
Co-authored-by: Sam Doran <sdoran@redhat.com>
2020-07-08 16:05:41 -05:00
Sandra McCann
222d35ebbd
[backport][2.10] Docsbackportapaloosa (#70302)
* Fix broken link in AWS Guide (#70153)

Point to collection rather than ansible/ansible for example.

(cherry picked from commit 0ef75f65d9)

* remove gendered example (#70117)

Changed example to not assume things about names and genders

(cherry picked from commit 5885ed4455)

* docs: Add note about ansible-doc (#70162)

ansible-doc can only parse Python modules, added a note about
this is developer guide; Fixes: #69109

(cherry picked from commit da868d9d60)

* Update config.yml (#70154)

typos & branding
* Update .github/ISSUE_TEMPLATE/config.yml

Co-authored-by: Rick Elrod <rick@elrod.me>
(cherry picked from commit 4b358c6641)

* async_status: Update documentation (#70196)

Fixes: #38164

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
(cherry picked from commit 40a42de081)

* updates to ansible-maintained collections guidelines (#70178)

(cherry picked from commit 647c6cd289)

Co-authored-by: Jill R <4121322+jillr@users.noreply.github.com>
Co-authored-by: Westley Argentum Hennigh-Palermo <WestleyArgentum@gmail.com>
Co-authored-by: Abhijeet Kasurde <akasurde@redhat.com>
Co-authored-by: John R Barker <john@johnrbarker.com>
2020-06-25 10:17:49 -05:00
Alicia Cozine
6fffb0607b WIP: Docs: User guide overhaul, part 4 (#69266)
Co-authored-by: Alicia Cozine <acozine@users.noreply.github.com>
2020-05-15 16:18:07 -04:00
Sandra McCann
44a4538280
add FQCN for migrated filters (#69321) 2020-05-04 16:02:13 -05:00
Christophe Drevet-Droguet
e867535a57
regex_replace multiline support (#65051)
* document multiline parameter for regex_replace
* add changelog fragment
* tests for regex_replace_multiline
2020-02-19 12:19:40 -05:00
Jordan Borean
423a900791
Clarify b64encode with Python 2 (#67488) 2020-02-17 13:31:03 -06:00
tchernomax
53e043b5fe
combine filter: fine list handling (option b) (#57894) 2020-02-12 16:40:36 -05:00
Toshio Kuratomi
4273e84962
Upstream jinja has decided not to rename from jinja2. (#66880)
So we're going to keep our intersphinx labels as jinja2 to match what
upstream is doing
2020-01-30 10:57:50 -05:00
Toshio Kuratomi
14cc63dc0f Switch intersphinx label from jinja2 to jinja (#66703)
* Switch intersphinx label from jinja2 to jinja

Co-Authored-By: Sviatoslav Sydorenko <wk.cvs.github@sydorenko.org.ua>
2020-01-23 14:09:17 -05:00
Anthony Bourguignon
d3e9ef3c35 add a path_join filter which joins path components (#62713) 2020-01-06 11:56:40 -05:00
Lars Kellogg-Stedman
f85d9d7028 Correct rst syntax in playbooks_filters.rst (#66198)
The `regex_replace` documentation included an example that was meant
to be preformatted text but due to an indentation error was rendering
incorrectly.
2020-01-06 10:13:21 -06:00
Alicia Cozine
860cacc54f Docs: User guide overhaul, part 2 (#65474) 2019-12-12 13:35:17 -05:00
Evgeni Golov
3af1732bd8 fix rendering of GOOD/BAD code for regex_replace examples (#65654)
adds double colon (::) so the examples render as code
2019-12-10 08:49:38 -06:00
Sam Doran
21bbf49396 Mention Python builtin methods in filter docs (#65425) 2019-12-02 09:44:59 -06:00
Niklas Liechti
39ebd244e3 Update playbooks_filters.rst (#64769) 2019-11-26 13:39:12 -05:00
Baptiste Mille-Mathias
e65be0beee Put all files and Path filters under a specific section (#64913)
Many of the filters in the "other useful filters" list manipulate filenames and paths; add a heading and put them together.
2019-11-19 12:30:56 -06:00
Pierre Prinetti
2444fae208 Add a named parameter to the filter to_uuid (#64057)
Let the caller choose a namespace for `to_uuid` and document the
behaviour of both the default case, and the new explicit case.

This PR does not change the existing behaviour of the `to_uuid` UUIDv5
filter.
2019-11-01 13:11:34 -04:00
Andreas Olsson
c8315bfd60 Prefer https:// links in the docs site (#62939)
This is a follow-up of last year's 1a11cec. It deals with links which
at that point either were not present or did not support https://.
2019-09-30 15:11:19 -04:00
Michael Prokop
b33ae14949 doc: fix typos (#62852) 2019-09-26 10:18:29 -04:00
Mark Chesney
11be31db71 Fix naming discrepancy in zip filter example (#60918)
Fix naming discrepancy in zip filter example
2019-08-20 09:53:15 -05:00
Strahinja Kustudic
6131de29d4 Improve regex_replace filter docs (#57450)
* Add a few examples of how to correctly use `regex_replace` filter
because it behaves differently on different Python versions when using
regex qualifiers that can match an empty string (e.g. '*', '?', etc).
2019-06-13 09:12:12 -05:00
Sandra McCann
c06f890f55 add docs for vlan_parser filter (#57498) 2019-06-11 11:22:02 -05:00
Ilya Reshetnikov
bf0e846a39 Update playbooks_filters.rst (#57200)
* Update playbooks_filters.rst to show JSON in the "JSON Query Filter" example data structure
2019-06-03 11:15:11 -05:00
s-hamann
730456b402 Add seed parameter to random_mac filter (#51841) 2019-05-16 13:41:08 -04:00
James Cassell
e55e8fe2c4 regex_escape: support POSIX basic regex (#50327) 2019-03-07 08:51:19 -05:00
Andrii Radyk
07cff73719 Fix yaml indentation for from_yaml_all filter example (#51998) 2019-02-10 21:21:15 +05:30
Felix Fontein
f6122fb63b Fix docs syntax highlighting errors (#50836)
* Add support for [WARNING]: ...

* Fix unreachable/failed output lexing.

* Detecting retry/--limit lines.

* Removing strange (invisible) characters which cause lexing problems.

* Using better-fitting lexers.

* Improve YAML lexing: don't accept quotes in keys.

* Add Django lexer (unchanged) from Pygments.

* Add support for != and % operators.
2019-01-24 16:09:41 -06:00
branen
88029a73d6 Correct docsite typos: it's -> its (#50812) 2019-01-11 15:49:54 -05:00
Satyajit Bulage
13d94ed681 Update filter documentation (#50255)
Added documentation for following filters -

* Product
* human_readable
* human_to_bytes

Signed-off-by: Satyajit Bulage <sbulage@redhat.com>
2019-01-11 15:09:42 +05:30
Brian Coca
b0c28f86de Revert range change (#50155)
* Revert "Fix incorrect examples with random filter (#50137)"

This reverts commit 9a7dbd5213.

The correction is incomplete and also based on a 'fix' that was supposed to have been reverted already

* Revert "Added `+1` to the `end` in `random` filter so that it was inclusive (#27215)"

This reverts commit ea2b89c7ae.

reverted fix as agreed at the time, but missed by maintainers.
2018-12-19 11:12:32 -06:00
Dmitry Lihachev
9a7dbd5213 Fix incorrect examples with random filter (#50137) 2018-12-19 12:07:17 +01:00
Martin Krizek
79947245e2 docs: remove not implemented password_hash feature (#49945) 2018-12-14 17:45:07 -06:00
Will Thames
960ebd981f k8s append_hash (#48830)
* Add append_hash functionality to k8s module

append_hash adds a hash based on the contents of a ConfigMap
or Secret to the name - this enables immutable ConfigMaps and
Secrets.

* Provide k8s_config_resource_name plugin

The k8s_config_resource_name filter plugin provides a means of determining
the name of ConfigMaps and Secrets created with append_hash

* Add changelog fragment

* fix failing tests

* Update openshift version needed for append_hash
2018-11-22 08:14:43 +00:00
Rushan
cc5b9c5fe1 enchance yaml filter documentation (#46629)
* update to_*_yaml filter documentation

* update to*_yaml filter documentation
2018-11-07 20:23:46 -05:00
Risto Oikarinen
e1cfc2500c Clean playbook filters doc by adding whitespaces (#46569) 2018-10-11 09:02:12 -05:00
Dag Wieers
92037679c4 Fix subelements example correctly (#46482) 2018-10-04 14:18:00 -05:00
Andrew Paradi
641c569a20 Fix spelling error in subelements Filter example (#46446)
<!--- Your description here -->

+label: docsite_pr
2018-10-03 21:54:36 -05:00
Deric Crago
065b7ac300 moved 'strftime' filter into 'Other Useful Filters' section (#45801) 2018-09-27 11:52:50 -04:00
Peter Sprygada
1e68881c40 adds support for null values to the ternary filter (#45303)
* adds support for null values to the ternary filter

This change adds a third optional argument to the ternary filter to
handle a null value.  If the third option is specified null and false
are treated differently.

For instance, take the following example:

{{ enabled | ternary('no shutdown', 'shutdown') }}

If enabled == True, then 'no shutdown' is used.
If enabled in (False, None), then 'shutdown' is used.

With this change the following is possible:

{{ enabled | ternary('no shutdown', 'shutdown', omit) }}

If enabled == True, then 'no shutdown'
If enabled == False, then 'shutdown'
If enabled == None, then omit

* update documentation with example of filter

* update filter documentation example per comments

* fix logic error in user_guide example
2018-09-24 18:57:19 -04:00
Raymond Wanyoike
c41632fad2 Add the key_name/value_name options to the dict2items filter (#45550)
* Add the key_name/value_name options to dict2items - as with items2dict, allow users to configure the key/value name for dict2items, add "version added" and examples
2018-09-17 15:53:52 -05:00
FloMiau
e35c4be1c1 Change "Defaulting Undefined Variables" (#41379)
Rewording the text for the second parameter of default because the original text was misunderstandable. +label: docsite_pr
2018-09-12 14:52:22 -05:00
Matthias Fuchs
7871027c9d Share the implementation of hashing for both vars_prompt and password_hash (#21215)
* Share the implementation of hashing for both vars_prompt and password_hash.
* vars_prompt with encrypt does not require passlib for the algorithms
  supported by crypt.
* Additional checks ensure that there is always a result.
  This works around issues in the crypt.crypt python function that returns
  None for algorithms it does not know.
  Some modules (like user module) interprets None as no password at all,
  which is misleading.
* The password_hash filter supports all parameters of passlib.
  This allows users to provide a rounds parameter, fixing #15326.
* password_hash is not restricted to the subset provided by crypt.crypt,
  fixing one half of #17266.
* Updated documentation fixes other half of #17266.
* password_hash does not hard-code the salt-length, which fixes bcrypt
  in connection with passlib.
  bcrypt requires a salt with length 22, which fixes #25347
* Salts are only generated by ansible when using crypt.crypt.
  Otherwise passlib generates them.
* Avoids deprecated functionality of passlib with newer library versions.
* When no rounds are specified for sha256/sha256_crypt and sha512/sha512_crypt
  always uses the default values used by crypt, i.e. 5000 rounds.
  Before when installed passlibs' defaults were used.
  passlib changes its defaults with newer library versions, leading to non
  idempotent behavior.

  NOTE: This will lead to the recalculation of existing hashes generated
        with passlib and without a rounds parameter.
        Yet henceforth the hashes will remain the same.
        No matter the installed passlib version.
        Making these hashes idempotent.

Fixes #15326
Fixes #17266
Fixes #25347 except bcrypt still uses 2a, instead of the suggested 2b.

* random_salt is solely handled by encrypt.py.
  There is no _random_salt function there anymore.
  Also the test moved to test_encrypt.py.
* Uses pytest.skip when passlib is not available, instead of a silent return.
* More checks are executed when passlib is not available.

* Moves tests that require passlib into their own test-function.

* Uses the six library to reraise the exception.

* Fixes integration test.

When no rounds are provided the defaults of crypt are used.
In that case the rounds are not part of the resulting MCF output.
2018-08-27 08:40:41 -07:00