Commit Graph

2532 Commits (ae1291004e2d6d127f70a2588012d5b1342d9dee)

Author SHA1 Message Date
Sandra McCann f4388de14d
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>
4 years ago
Håkon Solbjørg e72e12aa27
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.
4 years ago
Brian Coca f46b124d65
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>
4 years ago
kshitijcode 5f8b45a70e
Updating Getting Started with Resources section #68962 (#71102)
* Updating Getting Started with Resources section #68962
* Add links, including Workshops URL #68962
4 years ago
Sandra McCann 56748a8060
remove network for 2.10 base porting guide (#71158) 4 years ago
Sandra McCann abe4a1d533
remove network section from base porting guide (#71157) 4 years ago
Toshio Kuratomi 0a9638ce4b
Update the porting guide for ansible-2.10.0a8 (#71141) 4 years ago
Daniel Finneran fb9c9570d5
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.
4 years ago
Liviu Chircu cb9336ab6d
Docs: Fix typo (#71119)
Fix typo
4 years ago
Rick Elrod 4e55b93613
virt facts: allow guest/host to have >1 virt tech (#70832)
Change:
- Allow systems to declare multiple virt techs. For example if a system
  is both a docker container, but virtualized on KVM, show both. If a
  system is set up to run virtualbox and KVM VMs, show both.

- This is done by introducing new facts keys:
  - virtualization_tech_guest
  - virtualization_tech_host

- Backwards compatibility is preserved by keeping track of the previous
  return-points and refusing to update those keys after we would have
  returned, but now returning them at the end, so that the new keys can
  accumulate their data.

Test Plan:
- Local
- CI

Tickets:
- Refs #66304
- Refs #17151
- Refs #17058
- Probably others

Signed-off-by: Rick Elrod <rick@elrod.me>
4 years ago
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>
4 years ago
Sandra McCann 72d3d44163
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
4 years ago
Rick Elrod 0d7c144ce4
Allow macOS ACLs to work for unpriv -> unpriv (#70785)
Change:
- Use `chmod +a` in the fallback chain to allow MacOS to use ACLs to
  allow an unprivileged user to become an unprivileged user.

Test Plan:
- CI, new tests

Tickets:
- Fixes #70648

Signed-off-by: Rick Elrod <rick@elrod.me>
4 years ago
Jeff Groom 79f7104556
Update platform_index.rst (#70927) 4 years ago
Abhijeet Kasurde 0055673c70
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>
4 years ago
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
4 years ago
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>
4 years ago
Alicia Cozine 8313cc8fb1
Warning banner should only show on `/devel/` docs, not on pages with 'devel' in their titles (#70849)
* banner should not be placed on pages with 'devel' in their titles

* Update docs/docsite/_themes/sphinx_rtd_theme/ansible_banner.html

Co-authored-by: Sviatoslav Sydorenko <wk.cvs.github@sydorenko.org.ua>

* Only match paths at the beginning

Co-authored-by: Alicia Cozine <acozine@users.noreply.github.com>
Co-authored-by: Sviatoslav Sydorenko <wk.cvs.github@sydorenko.org.ua>
Co-authored-by: Sviatoslav Sydorenko <webknjaz@redhat.com>
4 years ago
Brian Coca 11a31e99e6
added note about fakeroot (#71018)
see #70895
4 years ago
Nathaniel Case a0523e5b8a
Update documentation of httpapi's handle_httperror method for clarity (#70991) 4 years ago
Alicia Cozine 4f4436c124
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>
4 years ago
Toshio Kuratomi e10902d744
Add the ansible_2_10 intersphinx reference. (#71028)
There are links from the scenario guides to collections but collections
docs aren't built in testing or locally when we're on the devel branch.
Due to that we need to make sure those references resolve to the
production docsite.  We can use intersphinx to make sure that happens.

* The test for binary files wasn't reading enough of the file.

Checking for null bytes in the first 1024 bytes failed to diagnose the
ansible_2_10.inv file as binary
4 years ago
Abhijeet Kasurde a6725d6e2a
docs: Add a note about package requirements for fact gathering (#70796)
Fixes: #26148

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
4 years ago
Terciero 864573a38d
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
4 years ago
Brendon O'Sullivan 9850915bd6
Update intro_getting_started.rst (#71039)
Added two additional learning resources in the See also: section- forgot closing backticks
4 years ago
Rick Elrod 701c638757
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>
4 years ago
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.
4 years ago
Sandra McCann 54bee7152b
Update network platform guides with FQCN (#70699)
* fqcn all the docs things!
4 years ago
Felix Fontein 61b36c6f30
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.
4 years ago
Felix Fontein 698efb8981
'Foreport' changes to 2.10 porting guide from stable-2.10 to devel. (#71024)
Without this, this change would get lost when backporting #70891, or would make backporting a lot harder.
4 years ago
Baptiste Mille-Mathias 5019335660
Document how to upgrade to ansible with pip (#70768)
Fixes #70348
4 years ago
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>
4 years ago
Alicia Cozine 9879da8e23
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>
4 years ago
Baptiste Mille-Mathias d62dffafb3
Add latest rc from ansible-base (#70974)
* Add latest rc from ansible-base
4 years ago
Baptiste Mille-Mathias 8c48366f1c
Document to_json will convert to ASCII strings by default (#70954)
... as reported in issue #68702
4 years ago
Sandra McCann e28b20d729
remove github link from plugins (#70951) 4 years ago
Sam Doran dc79528cc6
Fix warning for new default permissions when mode is not specified (#70976)
Follow up to #70221
Related to #67794
CVE-2020-1736

When set_mode_if_different() is called with mode of 'None', ensure we issue
a warning about the change in default permissions.

Add integration tests to ensure the warning works properly.

* Fix tests
- actually use custom module 🤦‍♂️
- verify file permission on created files
- use remote_tmp_dir so we're ready for split controller
- improve test module so we can skip the call to set_fs_attributes_if_different()
- fix tests for CentOS 6
4 years ago
Rick Elrod 14dc4de424
Update docs for --tags default, and add some tests (#70939)
Change:
- Clarify that not passing `--tags` will cause `ansible_run_tags` to
  default to `["all"]`.
- Add some extra coverage around `ansible_run_tags`

Test Plan:
- New integration and unit tests

Tickets:
- Fixes #69619

Signed-off-by: Rick Elrod <rick@elrod.me>
4 years ago
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>
4 years ago
Emilien Macchi 37e9d2278a
Fix a typo in "restart mysql" example (#70950)
Fix a typo in "restart mysql" example task. It's missing a space between "state:" and "restarted".
4 years ago
PJ Waskiewicz 69e5c6c14a
Update network_best_practices_2.5.rst (#70962)
Fix a small typo in the playbook tasks sample section
4 years ago
Sandra McCann 748ba96610
How to use rst :ref: for modules in collections (#70567) 4 years ago
Sorin Sbarnea 787e6108e0
Document galaxy install from local clones (#70941) 4 years ago
Sandra McCann 8fb8f1b2a0
fix changelog link (#70883) 4 years ago
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.
4 years ago
Fixmetal 7a42d27462
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>
4 years ago
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.
4 years ago
Matt Davis 4c0af6c808
fix internal cases of actions calling unqualified module names (#70818)
* fix internal cases of actions calling unqualified module names

* add porting_guide entry
* misc other fixes around action/module resolution broken by redirection

ci_complete

* Update docs/docsite/rst/porting_guides/porting_guide_2.10.rst

Co-authored-by: Rick Elrod <rick@elrod.me>

* Update docs/docsite/rst/porting_guides/porting_guide_2.10.rst

Co-authored-by: Rick Elrod <rick@elrod.me>

* address review feedback

* pep8

* unit test fixes

* win fixes

* gather_facts fix module args ignores

* docs sanity

* pep8

* fix timeout test

* fix win name rewrites

Co-authored-by: Rick Elrod <rick@elrod.me>
4 years ago
Alicia Cozine b28d59124b
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>
4 years ago
Sam Doran 5260527c4a
Change default file permissions so they are not world readable (#70221)
* Change default file permissions so they are not world readable

CVE-2020-1736

Set the default permissions for files we create with atomic_move() to 0o0660. Track
which files we create that did not exist and warn if the module supports 'mode'
and it was not specified and the module did not call set_mode_if_different(). This allows the user to take action and specify a mode rather than using the defaults.

A code audit is needed to find all instances of modules that call atomic_move()
but do not call set_mode_if_different(). The findings need to be documented in
a changelog since we are not warning. Warning in those instances would be frustrating
to the user since they have no way to change the module code.

- use a set for storing list of created files
- just check the argument spac and params rather than using another property
- improve the warning message to include the default permissions
4 years ago