Commit Graph

52668 Commits (1d7436935f00379d00682c9ec1059b3a1c279fce)
 

Author SHA1 Message Date
Matt Clay 2ac74197af [stable-2.13] ansible-test - Prefer unittest.mock for core.
(cherry picked from commit 81351022d8)

Co-authored-by: Matt Clay <matt@mystile.com>
2 years ago
Matt Clay 44ce9fe998 [stable-2.13] ansible-test - Fix shell target options handling.
(cherry picked from commit f933314101)

Co-authored-by: Matt Clay <matt@mystile.com>
2 years ago
Matt Clay 2b6df9ea36
Add RHEL 9.0 to ansible-test and CI. (#77923)
* ansible-test - Add RHEL 9.0 remote support.

* Add RHEL 9.0 to CI. (#77853)

* Add RHEL 9.0 to CI.

* Restrict network manager inspection to RHEL8

* Skip module tests when astream_name is undefined, undefine it for RHEL9 until 9.1

* Remove redundant test.

Co-authored-by: Matt Martz <matt@sivel.net>
(cherry picked from commit 43d650f924)

* Include test fix from https://github.com/ansible/ansible/pull/77847
2 years ago
Sandra McCann e6b16ddeb5
Docs backportapalooza 05 26 (#77921)
* Remove statement about dependencies and includes. Fixes #75055 (#77912)

(cherry picked from commit a2eb472fb6)

* doc: Clarify stride/increment in inventory intro (#77893)

(cherry picked from commit 9010f0fbe3)

* Remove double spaces in errormessage (#77839)

(cherry picked from commit 711b51fad6)

* add anchors for crossreferencing (#77800)

(cherry picked from commit a99623bce1)

* [docs]Mention that global variables are not mapped to hostvars (#77783)

(cherry picked from commit 74469bf54a)

* Point to Kerberos as a safer winrm setup method (#77794)

(cherry picked from commit 45d930e9c1)

* more context on multiple facts modules (#77896)

(cherry picked from commit dbbeea0686)

Co-authored-by: Matt Martz <matt@sivel.net>
Co-authored-by: rawtaz <rawtaz@users.noreply.github.com>
Co-authored-by: Wouter Schoot <wouter@schoot.org>
Co-authored-by: Sergei Petrosian <30409084+spetrosi@users.noreply.github.com>
Co-authored-by: TheBigBear <TheBigBear@users.noreply.github.com>
Co-authored-by: Brian Coca <bcoca@users.noreply.github.com>
2 years ago
Sandra McCann c45ba4f9ca
docs: Update porting guide for ansible 5.8.0 (#77843) (#77859)
(cherry picked from commit 059204b871)

Co-authored-by: David Moreau Simard <moi@dmsimard.com>
2 years ago
Sandra McCann 8d99c1cc0c
docs: Update porting guide for ansible 6.0.0a3 (#77842) (#77858)
(cherry picked from commit 66e92a3aff)

Co-authored-by: David Moreau Simard <moi@dmsimard.com>
2 years ago
Matt Clay 46a1eb6832 [stable-2.13] Prefer unittest.mock over mock. (#77886)
(cherry picked from commit 2595b42aca)

Co-authored-by: Matt Clay <matt@mystile.com>
2 years ago
Matt Clay 47e1cc38fd [stable-2.13] Use unittest.mock instead of mock. (#77883)
This can only be done for controller tests.
(cherry picked from commit 3a9a23fb1a)

Co-authored-by: Matt Clay <matt@mystile.com>
2 years ago
Matt Clay 93b8ccda21 [stable-2.13] Avoid deprecated method in unit tests.
(cherry picked from commit 5f74350fd5)

Co-authored-by: Matt Clay <matt@mystile.com>
2 years ago
David Schmidt 006ea84f70
Update Ansible release version to v2.13.0.post0. (#77809) 2 years ago
Dimitri Savineau ad609fa57e
New release v2.13.0 (#77799) 2 years ago
Sandra McCann d0d1cc9e54
05 12 backportapalooza (#77787)
* stub out ovirt dev guide with pointer to new location (#77751)

(cherry picked from commit 5e22fe21fd)

* Docsite/communication.rst: fix formatting (#77760)

(cherry picked from commit 97e574fe6e)

* Updated the playbook section in this docs (#77747)

(cherry picked from commit 42086c14a3)

* 2.13 GA has been bumped up a week to release on May 16 (#77772)

(cherry picked from commit 75bc630565)

* Fix plugin dev examples (#77759)

* Fix plugin dev examples

* Update docs/docsite/rst/dev_guide/developing_plugins.rst

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

* docs: Update ansible-core release date in Ansible roadmap (#77775)

(cherry picked from commit 235f2598b1)

* revamp basic concepts docs (#77748)

(cherry picked from commit 8e91403412)

* core-2.13 - update release table (#77780)

(cherry picked from commit 6230244537)

* clarify Ansible EOL details (#77778)

* clarify Ansible EOL details: update docs/docsite/rst/reference_appendices/release_and_maintenance.rst
Co-authored-by: Felix Fontein <felix@fontein.de>

(cherry picked from commit 654fff05e6)

* Update url to quickstart video. (#77779)

(cherry picked from commit f75bb09a8b)

Co-authored-by: Andrew Klychkov <aklychko@redhat.com>
Co-authored-by: Desmond Obisi <51109125+DesmondSanctity@users.noreply.github.com>
Co-authored-by: Matt Martz <matt@sivel.net>
Co-authored-by: Mario Lenz <m@riolenz.de>
Co-authored-by: David Moreau Simard <moi@dmsimard.com>
Co-authored-by: Brian Coca <bcoca@users.noreply.github.com>
Co-authored-by: Tabah Baridule <dulemartins07@gmail.com>
Co-authored-by: Matt Davis <6775756+nitzmahone@users.noreply.github.com>
2 years ago
Sandra McCann 256641b780
set stable-2.13 to latest (#77798) 2 years ago
Sandra McCann 0d1d1b74b3
update version switcher to include 2.13 (#77786) (#77795)
(cherry picked from commit f5642cea28)
2 years ago
Sandra McCann 14f64ae38f
core-2.13 - update release table (#77780) (#77785)
(cherry picked from commit 6230244537)
2 years ago
Sandra McCann a6d7eb8710
[docs][backport] 5 06 docs backportapalooza (#77749)
* Docsite: move a stepped down steering committee member to past members (#77715)

(cherry picked from commit a1ddb83fc1)

* add collection pr review checklist (#77661)

Co-authored-by: Emmanuel Ugwu <32464178+ugwutotheeshoes@users.noreply.github.com>
Co-authored-by: Andrew Klychkov <aaklychkov@mail.ru>
(cherry picked from commit ef2fe6823c)

* clarify latest release (#77577)

* clarify latest release
* fix tables

(cherry picked from commit f633b62cbc)

* typo in doc (#77672)

(cherry picked from commit c71faec595)

* Docs: `ansible-test sanity` example with a folder

##### SUMMARY
The docs mentions explicitly that you can run the tests against certain files which might not relay that it works on folders too!

Let's make this clear :)

##### ISSUE TYPE
- Docs Pull Request

+label: docsite_pr

(cherry picked from commit 52bd59c481)

* docs: update porting guide for ansible 6.0.0a2 (#77736)

(cherry picked from commit 0cfc291573)

* simplify developing modules (#77647)

(cherry picked from commit 255745b3e6)

* Mention admin requirement for runas become (#77722)

(cherry picked from commit dd094a4413)

* core branch descriptions (#76152)

(cherry picked from commit d352f2ec21)

* Fix ansible-test import analysis warning.

Fix overlooked in https://github.com/ansible/ansible/pull/68372/

(cherry picked from commit 77732ed50d)

* Revert "Fix ansible-test import analysis warning."

This reverts commit 676f1056cb.

Co-authored-by: Andrew Klychkov <aklychko@redhat.com>
Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
Co-authored-by: Kristian Heljas <11139388+kristianheljas@users.noreply.github.com>
Co-authored-by: David Moreau Simard <moi@dmsimard.com>
Co-authored-by: Brian Coca <bcoca@users.noreply.github.com>
Co-authored-by: Jordan Borean <jborean93@gmail.com>
Co-authored-by: Matt Davis <6775756+nitzmahone@users.noreply.github.com>
Co-authored-by: Matt Clay <matt@mystile.com>
2 years ago
Sandra McCann a07e3eb45b
4 28 docs backportapalooza (#77686)
* docs: Update porting guide for ansible 5.7.0 (#77646)

(cherry picked from commit 709ae7c050)

* remove import_play examples from include module (#77597)

(cherry picked from commit d321fa3f15)

* trim down to use sanity test docs requirements file (#77612)

* trim down to use sanity test docs requirements file
* add requirements back
Co-authored-by: Felix Fontein <felix@fontein.de>
* Update docs/docsite/rst/community/documentation_contributions.rst

(cherry picked from commit a65fbfad5b)

* Typo fix (#77648)

(cherry picked from commit cf5f0690f0)

* Update guide_vultr.rst (#77665)

(cherry picked from commit f6fb402d1f)

* add select distro installs to docs (#77567)

(cherry picked from commit 096393a221)

* community_steering_committee.rst: add new member (#77589)

(cherry picked from commit 3cbfee7852)

* clarify latest release (#77577)

* clarify latest release
* fix tables

(cherry picked from commit f633b62cbc)

* typo in doc (#77672)

(cherry picked from commit c71faec595)

Co-authored-by: David Moreau Simard <moi@dmsimard.com>
Co-authored-by: deosrc <deosrc@g-de.co.uk>
Co-authored-by: Jan-Piet Mens <jp@mens.de>
Co-authored-by: Andrew Klychkov <aklychko@redhat.com>
Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
2 years ago
samccann f4f1f772c1 [stable-2.13] shift to ansible_core_version
(cherry picked from commit 7471c036ec)

Co-authored-by: samccann <samccann@redhat.com>
2 years ago
Christian Adams 511389ef3a
Update Ansible release version to v2.13.0rc1.post0. (#77718) 2 years ago
David Schmidt f282306b1b
New release v2.13.0rc1 (#77717) 2 years ago
Martin Krizek 89e6dcda26
Prevent losing unsafe from lookups (#77609) (#77650)
* Prevent losing unsafe from lookups

This patch fixes a bug which under certain conditions results in data
returned from lookups not being marked as unsafe.

Each time Templar.do_template is invoked a new AnsibleContext is
created and stored effectively at two places:
1) as an instance variable in templar_obj.cur_context
2) as a local variable called new_context in do_template method of Templar

Due to custom functionality in Ansible's Context that allows for nested
templating it is possible that during resolving variable's value
template/do_template method is called recursively again, again creating
a new context. At that point the problem manifests itself because as
mentioned in 1) above the context is overwriten on the templar object
which means that any subsequent calls to _lookup will use the new
context to mark it as unsafe which is now different to the local
new_context which is used for testing for unsafe property.

The solution to the problem appears to be to restore the original
context inside do_template and also to eliminate the local variable
new_context to prevent problems in the future.

It appears that we don't have a better way of storing the context other
than as some form of global variable and so this appears to be the
"best" solution possible at this point. Hopefully data tagging will be
the solution here.

For more examples see unit and integration tests included in this patch.

Fixes #77535

(cherry picked from commit 3980eb8c09)
2 years ago
Christian Adams 8f1c25d154
Update Ansible release version to v2.13.0b1.post0. (#77634) 2 years ago
Christian Adams 5d9d0fe39b
New release v2.13.0b1 (#77629) 2 years ago
Matt Clay 9a7b645c50 ansible-test - Update default containers to 5.9.0. 2 years ago
Felix Fontein cad892125c [stable-2.13] Replace antsibull with antsibull-docs (#77504)
(cherry picked from commit 841bdb74eb)

Co-authored-by: Felix Fontein <felix@fontein.de>
2 years ago
Sandra McCann e03069a444
[docs][backport] Docs backports week 4-18-22 (#77557)
* Update reporting_bugs_and_features.rst (#77518)

(cherry picked from commit fa7c5d9b10)

* docs: Add porting guide for Ansible 6.0.0a1 (#77526)

(cherry picked from commit 0d9a580f24)

* Steering Committee: add new member (#77529)

(cherry picked from commit 553a226da5)

* Update pip example with standard lowercase http[s]_proxy env vars (#77515)

(cherry picked from commit 2ba39fcf8c)

* Update docs to recommend the TTY for prompts over stderr (#77533)

(cherry picked from commit 789d29e895)

* update python devel docs (#77499)

* update python devel docs

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

* setup: remove 'any' as seemingly valid option (#77532)

fixes #59783

(cherry picked from commit 762d97f1b8)

* Update developing_collections_shared.rst (#77497)

##### SUMMARY
Use of the meta/runtime.yml file to specify the ansible-core version for collections

##### ISSUE TYPE
- Docs Pull Request

+label: docsite_pr

(cherry picked from commit eef0a1cef9)

* Update developing_collections_structure.rst (#77496)

(cherry picked from commit 538a19b748)

* Fix a broken link and some grammatical errors (#77531)

(cherry picked from commit 0c1cb0e9d4)

* Add contributor path page (#77494)

Co-authored-by: Emmanuel Ugwu <32464178+ugwutotheeshoes@users.noreply.github.com>
(cherry picked from commit 3b0d74c145)

Co-authored-by: Iheanacho Amarachi Sharon <58210919+Iheanacho-ai@users.noreply.github.com>
Co-authored-by: David Moreau Simard <moi@dmsimard.com>
Co-authored-by: Andrew Klychkov <aklychko@redhat.com>
Co-authored-by: Junegunn Choi <junegunn.c@gmail.com>
Co-authored-by: Matt Martz <matt@sivel.net>
Co-authored-by: Brian Coca <bcoca@users.noreply.github.com>
Co-authored-by: Emmanuel Ugwu <32464178+ugwutotheeshoes@users.noreply.github.com>
Co-authored-by: Kajsa Gauza <nimrod7@gmail.com>
2 years ago
Sam Doran 91fb18bf31
[stable-2.13] arg_spec - Return aliases in validation result and update aliases (#77576) (#77601)
When looking up the `no_log` setting for a parameter that is an alias in
`AnsibleModule._log_invocation()`, the alias value will always be an
empty dictionary since `self.aliases` on the `AnsibleModule` instance is
never updated after initialization. Since the `no_log` setting is on the
canonical parameter not the alias, an incorrect warning is issued if the
parameter matches `PASSWORD_MATCH`.

This PR returns the aliases dictionary as an attribute of the
`ValidationResult` and updates the `aliases` attribute on the
`AnsibleModule` instance.
(cherry picked from commit 1b947eaf92)

Co-authored-by: Sam Doran <github@samdoran.com>
2 years ago
Brian Coca 3e1db5d753
git fix docs and wrapper script (#77588) (#77603)
* git fix docs and wrapper script

 fixes #77582

 now env var is set to wrapper or full command depending on version
 as was the intent of previous PR
 added ref to git commit from git for why/how we used the env vars

* handle key_file

(cherry picked from commit d06d99cbb6)
2 years ago
Brian Coca e51e36ea6a
varaiblemanager, more efficienet vars file reads (#77570) (#77596)
(cherry picked from commit 2c2a204dc6)
2 years ago
Matt Clay 9deb5ad45a
[stable-2.13] Exclude Python 2.6 from interpreter discovery. (#77528)
(cherry picked from commit 32d67ce998)

Co-authored-by: Matt Clay <matt@mystile.com>
3 years ago
Dimitri Savineau 8dedf7f06c
Update Ansible release version to v2.13.0b0.post0. (#77508) 3 years ago
Dimitri Savineau 220917e2af
New release v2.13.0b0 (#77502) 3 years ago
Sloane Hertel 2cba3e8c42
Get git executable for collections in git repos (#77493) (#77500)
* Fix traceback installing collections from git repos if git is not installed

(cherry picked from commit 477c55b0d2)
3 years ago
Sandra McCann c4901aa08f
[docs][backport] 0407 weekly docs backports (#77490)
* INI: values with spaces can be single or double quoted (#77369)

(cherry picked from commit ac56647f4a)

* community_steering_committee.rst: add chairperson (#77454)

(cherry picked from commit 82c622a26a)

* Document how to release a collection  (#77391)

Co-authored-by: Divine Odazie <dodazie@gmail.com>
(cherry picked from commit 26631de88c)

* docs: Update porting guide for ansible 5.6.0 (#77466)

(cherry picked from commit 36371500b7)

* Trivial (#77467)

Co-authored-by: Iheanacho Amarachi Sharon  <58210919+Iheanacho-ai@users.noreply.github.com>
(cherry picked from commit e8dbc84afe)

* Update installing_collections_file.rst (#77439)

(cherry picked from commit 6da4186f6e)

* template module: document jinja2_native behavior (#77445)

(cherry picked from commit a85261342a)

* avoid recursion in example (#77436)

(cherry picked from commit d7d2afd203)

* Clarifying how handlers are handled (#77372)

(cherry picked from commit 7126bfc61c)

Co-authored-by: Dr. András Korn <korn-github.com@elan.rulez.org>
Co-authored-by: Andrew Klychkov <aklychko@redhat.com>
Co-authored-by: David Moreau Simard <moi@dmsimard.com>
Co-authored-by: Travis Michette <tmichett@redhat.com>
Co-authored-by: Martin Krizek <martin.krizek@gmail.com>
Co-authored-by: Brian Coca <bcoca@users.noreply.github.com>
3 years ago
Martin Krizek bd1da60bf2
Ensure correct environment_class is set on Template (#77485) (#77488)
(cherry picked from commit c7e198b907)
3 years ago
Matt Martz 30f96bb75e
[stable-2.13] ansible-test - Don't fail if network cannot be disconnected (#77472) (#77482)
* Don't fail if network cannot be disconnected

* add clog frag
(cherry picked from commit 66c5844)

Co-authored-by: Matt Martz <matt@sivel.net>
3 years ago
Matt Clay 3b20b02272
[stable-2.13] Fix sanity test crash. (#77475)
(cherry picked from commit 6216c9fc93)

Co-authored-by: Felix Fontein <felix@fontein.de>

Co-authored-by: Felix Fontein <felix@fontein.de>
3 years ago
Sandra McCann 6b6b324618
[docs][backport][2.13] Backportapalooza 3-31 (#77438)
* add links.yml to collection structure docs (#77415)

* add links.yml to collection structure docs
* fix link
* Update docs/docsite/rst/dev_guide/developing_collections_structure.rst

(cherry picked from commit 8caa6efaab)

* Example is a single play, not a playbook

(cherry picked from commit bf8e186c68)

* Fix list formatting (#77354)

(cherry picked from commit e918cfa588)

* Most Matrix channels are ansible.com and not .im (#77352)

(cherry picked from commit 6557a60d08)

* Docs cheatsheet - skeleton and ansible-playbook (#76655)

(cherry picked from commit 21addac5da)

Co-authored-by: rwhector <richard@walnut.gen.nz>
Co-authored-by: Christian Adamini <christian.adamini@invision.de>
Co-authored-by: bluikko <14869000+bluikko@users.noreply.github.com>
Co-authored-by: Alicia Cozine <879121+acozine@users.noreply.github.com>
3 years ago
Jordan Borean f720c58949
winrm - ensure callers PATH for kinit is set (#77401) (#77404)
* winrm - ensure callers PATH for kinit is set

* Fix unit test expectations

* Fix type annotation

(cherry picked from commit 60b4200bc6)
3 years ago
Matt Martz 85341c3e5d
[stable-2.13] Catch ImportError when pyyaml doesn't have libyaml extension (#77434) (#77459)
* [stable-2.13] Catch ImportError when pyyaml doesn't have libyaml extension (#77434)
(cherry picked from commit e3aa73c)

Co-authored-by: Matt Martz <matt@sivel.net>

* Add test to assert that missing libyaml doesn't result in an error. Fixes #77437

(cherry picked from commit 2797dc644a)
3 years ago
Matt Clay ee9705a1ce [stable-2.13] ansible-test - Fix origin host target filtering.
(cherry picked from commit 4b51e61645)

Co-authored-by: Matt Clay <matt@mystile.com>
3 years ago
Matt Clay 708e4c206a ansible-test - Update default test containers. 3 years ago
Felix Fontein 7075fa36a1
Bump requirements for antsibull to 0.42.0 (which depends on antsibull-changelog >= 0.14.0). (#77362) 3 years ago
Matt Clay 93d0ea0215 Update core porting guide generation. 3 years ago
Matt Clay 3e491db466
Porting guide fixes. (#77376)
* Update porting guide generation.
* Fix 2.13 porting guide link.
3 years ago
Matt Martz 4723eb9caa
Add family fallback for RHEL to register as RedHat (#77371)
* Add family fallback for RHEL to register as RedHat

* Update tests to properly assert RHEL behavior
3 years ago
Sandra McCann f03624e295
clarify how to customize ansible cli output (#77357) 3 years ago
Felix Fontein babc26adc1
Handle errors during ansible-doc --metadata-dump more gracefully (#77035)
* Add option --no-fail-on-errors to return errors for ansible-doc --metadata-dump in JSON result instead of failing.

* Adjust changelog fragment.

* Add basic tests.
3 years ago
Matt Clay 55f90ba31f ansible-test - Remove RHEL 9.0b support.
Support can be restored once RHEL 9 has been released.
3 years ago
Matt Martz afecc6400e
Action Plugin argspec validation (#77013) 3 years ago