Compare commits

..

1791 Commits

Author SHA1 Message Date
520bb66f8a New release v2.14.0 (#79314) 2022-11-07 09:22:26 -05:00
0f3a1d3c82 [2.14] Log runme.sh execution in integration tests (#79282)
* Log `runme.sh` execution in integration tests (#79263)

* Log `runme.sh` execution in integration tests

This patch adds `set -x` where it's missing in the integration tests.
It also enables `pipefail` in `runme.sh` scripts that use pipes.

* Add a change note for PR #79263

(cherry picked from commit 6674c43edd)

* Delete a bad PR #79263 change note

(cherry picked from commit 9cfb3f73e8)
2022-11-03 20:39:12 -07:00
edbd88d3f1 [stable-2.14] ansible-test - Fix and update documentation links.
(cherry picked from commit 938c0fa944)

Co-authored-by: Matt Clay <matt@mystile.com>
2022-11-03 20:37:58 -07:00
66363dd182 Update Ansible release version to v2.14.0rc2.post0. (#79262) 2022-10-31 16:48:54 +01:00
6fb5f0c8b8 New release v2.14.0rc2 (#79257) 2022-10-31 14:33:03 +01:00
3fc245d3c6 Backportapalooza 10 27 (#79247)
* managed node requirement amend (#79189)

(cherry picked from commit 757efa4a45)

* documentation fix for file module 78988 (#79182)

(cherry picked from commit 465480f755)

* Added link to the Ansible meetup page (#79207)

(cherry picked from commit f3f7d44238)

* add link to fest videos (#79196)

(cherry picked from commit 060f114d8c)

* Docs: Typos and edits in collections integration (#79228)

(cherry picked from commit 74f55db5c6)

* fix url for fest VoD banner (#79229)

(cherry picked from commit 656d01dd24)

* Docs: Typos and edits in collections reviews (#79217)

(cherry picked from commit fa8dc6b73d)

* plugins/lookup/pipe: docs typo fixes (#79222)

(cherry picked from commit 0bacea70c4)

* collection roles dont support plugins (#79243)

(cherry picked from commit 6ee089bc80)

Co-authored-by: prasadpatil49 <51715670+prasadpatil49@users.noreply.github.com>
Co-authored-by: VICTORIA JOHNSON <110999245+DrVickie8@users.noreply.github.com>
Co-authored-by: Goodness Chris-Ugari <goodnesschrisugari@yahoo.com>
Co-authored-by: Kenyon Ralph <kenyon@kenyonralph.com>
Co-authored-by: Brian Coca <bcoca@users.noreply.github.com>
2022-10-28 16:13:54 -07:00
70d1b34a9a contributor_path: misc doc fixes (#79239) 2022-10-27 13:06:58 -05:00
b162c509a9 Communication docs: note that editing Matrix messages causes IRC spam (#79238) (#79242)
(cherry picked from commit bc83da9a1b)
2022-10-27 13:06:45 -05:00
4653d1f4a0 ansible-test - Update default container. 2022-10-26 18:12:12 -07:00
a023813bd1 Bump antsibull-docs version from 1.6.1 to 1.7.0. (#79071) (#79231)
(cherry picked from commit 74b80c3193)

Co-authored-by: Felix Fontein <felix@fontein.de>
2022-10-26 16:23:28 -07:00
8f2b0a50d0 stable docs build: do not use YAML parsing/serialization for .deps files (#79233) (#79234)
* Do not use YAML parsing/serialization for .deps files.

* Prevent crash.

(cherry picked from commit 9545f2e0de)

Co-authored-by: Felix Fontein <felix@fontein.de>
2022-10-26 15:38:52 -07:00
bd085c6ce5 Add Ansible community 7.0.0a2 porting guide (#79219) (#79220)
(cherry picked from commit f02b8fb6f0)

Co-authored-by: Christian Adams <chadams@redhat.com>
2022-10-26 14:07:28 -05:00
df006fb581 contributor_path: fix links (#79137) 2022-10-26 08:29:35 -05:00
7868f4a436 update alpha to next week (#79166) (#79167)
(cherry picked from commit d82d232d07)
2022-10-25 16:27:45 -05:00
45bf720b06 contributor_path: add doc link (#79138) (#79139)
(cherry picked from commit 808f5a0c03)
2022-10-25 16:27:35 -05:00
8d6251af61 Updating Japanese translation (#79205) 2022-10-25 15:39:50 -05:00
795ac8993b Backportapalooza 10 20 (#79180)
* docs: fix typos (#79082)

(cherry picked from commit ad5d9843d6)

* Docs: syntax error in Parsing semi-structured text with Ansible (#79085)

(cherry picked from commit 7d6984618d)

* Added code-block wrappers in implicit_localhost.rst (#79086)

Fixes #79031

(cherry picked from commit 8ecfb7c6d8)

* Misc Typo fixes (#79088)

(cherry picked from commit a48c442275)

* Add code-block wrappers to code examples in playbooks_filters.rst (#79093)

Fixes #79029

(cherry picked from commit dfef3260a5)

* Apply minor formatting changes to "playbooks directory" section (#79092)

(cherry picked from commit 1286b7d42e)

* Made changes to notes on #L9 and #L21 (#79173)

(cherry picked from commit d6c268378f)

* Update communication.rst (#79172)

grammar fixes

(cherry picked from commit 1a6cfa8203)

* Update contributor_path.rst (#79170)

grammar fixes

(cherry picked from commit 64d5c6cc3a)

* Update overview_architecture.rst (#79161)

Add missing right parenthesis

(cherry picked from commit 89af4e6e31)

* Added the emphasize changelog (#79160)

Co-authored-by: Sviatoslav Sydorenko <wk.cvs.github@sydorenko.org.ua>
(cherry picked from commit b7eb067090)

* minor changes in documentation (#79114)

(cherry picked from commit cc3abae532)

* Setting indentation correctly in the Example section (#79072)

(cherry picked from commit 1182059d46)

* docs: cgroupsv1 is required for ansible-test with docker (#79066)

(cherry picked from commit ae38628404)

* Change occurance yes/no to true/false (#79035)

(cherry picked from commit 551f5a3753)

Co-authored-by: KIDANI Akito <a.kid.1985@gmail.com>
Co-authored-by: taso <74918216+tasoint@users.noreply.github.com>
Co-authored-by: 12-malak <73274076+12-malak@users.noreply.github.com>
Co-authored-by: Abhijeet Kasurde <akasurde@redhat.com>
Co-authored-by: Sharif Nassar <mrwacky42@users.noreply.github.com>
Co-authored-by: NitrogenPointBlue <110332643+NitrogenPointBlue@users.noreply.github.com>
Co-authored-by: Aysha Muhammed <64032658+Aysha-py@users.noreply.github.com>
Co-authored-by: Goodness Chris-Ugari <goodnesschrisugari@yahoo.com>
Co-authored-by: Jack Lin <46962923+blueskyson@users.noreply.github.com>
Co-authored-by: Tabah Baridule M <dulemartins07@gmail.com>
Co-authored-by: trolzen <trolzen@gmail.com>
Co-authored-by: Bart Dorlandt <bart@bamweb.nl>
Co-authored-by: Chris Smart <distroguy@gmail.com>
2022-10-25 15:36:03 -05:00
a76163ca3c remove AnsibleFest banner (#79156) (#79157)
(cherry picked from commit 5b04dff7bd)
2022-10-25 12:22:10 -05:00
3922d46a71 issue #79022 file parameter import_tasks and include_tasks (#79183)
Co-authored-by: Felix Fontein <felix@fontein.de>
2022-10-25 12:20:07 -05:00
b7f9d839e0 ansible-test - Update base and default containers. 2022-10-25 10:16:45 -07:00
41159432d1 [stable-2.14] Fix ansible-test-git test for newer git versions.
The latest versions of `git` include a fix for CVE-2022-39253. The fix blocks the file protocol by default.

See: 45c9f05c44/Documentation/RelNotes/2.30.6.txt
(cherry picked from commit 4202acb41b)

Co-authored-by: Matt Clay <matt@mystile.com>
2022-10-25 10:01:09 -07:00
418b92b323 [stable-2.14] ansible-test - Fix pylint support on Python 3.11.
(cherry picked from commit 645b6b8581)

Co-authored-by: Matt Clay <matt@mystile.com>
2022-10-24 16:48:26 -07:00
51c0d50631 [stable-2.14] Restrict wheel below v0.38.0 under Pythons < 3.7 (#79187)
* Restrict `wheel` below v0.38.0 under Pythons < 3.7

* Add a change note for PR #79187

* Update changelogs/fragments/79187--wheel-0.38.0.yml

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

* Use constraints file when installing wheel.

Co-authored-by: Matt Clay <matt@mystile.com>
(cherry picked from commit a76bbb18a5)

Co-authored-by: Sviatoslav Sydorenko <wk.cvs.github@sydorenko.org.ua>
2022-10-24 16:19:17 -07:00
7e47371d2e Update Ansible release version to v2.14.0rc1.post0. (#79153) 2022-10-17 12:40:34 -04:00
86bdec3661 New release v2.14.0rc1 (#79127)
Signed-off-by: Ricardo Carrillo Cruz <ricarril@redhat.com>
2022-10-17 17:04:05 +02:00
febf071d01 [stable-2.14] Don't assume column index for netmask and broadcast (#79121) (#79132)
* Don't assume column index for netmask and broadcast. Fixes #79117

* fix typo
(cherry picked from commit f53dbf9)

Co-authored-by: Matt Martz <matt@sivel.net>
2022-10-13 16:09:01 -05:00
9c9a33904a fix password lookup's use of f=v settings (#76551) (#79106)
* fix password lookup's  use of f=v settings (#76551)

update tests

(cherry picked from commit 5d253a1380)

* fix password unit tests (#79113)

(cherry picked from commit c4d6629bce)

Co-authored-by: Sloane Hertel <19572925+s-hertel@users.noreply.github.com>
2022-10-13 14:47:07 -05:00
9bbdfb2c70 community_steering_committee: add a new member (#79089) (#79116)
(cherry picked from commit ad1eba9876)
2022-10-13 10:22:25 -05:00
2ac9e2761b ansible-config, only subvalues should use yaml shorthand (#79073) (#79078)
(cherry picked from commit 27ab589ee8)
2022-10-13 09:42:28 -05:00
172982e83f Add Ansible community 6.5.0 porting guide (#79123)
Co-authored-by: Ansible Service Account <chadams@redhat.com>
2022-10-12 16:16:54 -04:00
c6511e3a5b [stable-2.14] ansible-test - Update pylint to 2.15.4.
(cherry picked from commit 14e7f05318)

Co-authored-by: Matt Clay <matt@mystile.com>
2022-10-11 11:15:40 -07:00
33ed9656c2 Update Ansible release version to v2.14.0b3.post0. (#79100) 2022-10-11 11:21:00 -04:00
d412bb245c New release v2.14.0b3 (#79076) 2022-10-10 10:51:34 -04:00
45f9af1fd4 Backport hacktoberfest 3 (#79069)
* Docs: true/false with boolean values in docsite/rst/playbook_guide (#78958)

(cherry picked from commit 173ddde126)

* No latin terms (#79009)

Fixes #79006

(cherry picked from commit f0cc70f9e1)

* docs: replace latin terms with english in network (#79013)

fixes #78999 by removing Latin usage in network docs

(cherry picked from commit 8d665a1a8e)

* Docs: Typo in Alibaba Cloud Compute Services Guide (#78984)

(cherry picked from commit ea04d05a1e)

* Docs: Replace Latin in the porting guides  (#79011)

(cherry picked from commit 8f4133b514)

Co-authored-by: Suven-p <pandeysuven@gmail.com>
Co-authored-by: Ishan Siddiqui <77967215+ishan-siddiqui@users.noreply.github.com>
Co-authored-by: Samuel Gaist <samuel.gaist@idiap.ch>
Co-authored-by: taso <74918216+tasoint@users.noreply.github.com>
Co-authored-by: smeet07 <81572407+smeet07@users.noreply.github.com>
2022-10-07 11:04:20 -07:00
c0901fcba5 Fixed Latin words, replaced all via with either through or by (#79004) (#79068)
(cherry picked from commit 4f4ad453c4)

Co-authored-by: Ishan Siddiqui <77967215+ishan-siddiqui@users.noreply.github.com>
2022-10-06 17:00:18 -05:00
b5d8c954b8 Backport hacktoberfest 4 (#79070)
* docs: replace latin terms with english in the reference_appendices (#79010)

(cherry picked from commit 4d3c12ae9e)

* docs: replace latin terms with english in the scenario_guides (#79008)

(cherry picked from commit 367cdae3b2)

* Docs: true/false with boolean values (#78980)

* Adding FQCN community.postgresql. to postgresql modules

(cherry picked from commit 56285b1d2b)

* Docs: Add code-block wrappers to code examples (#79037)

* Docs: Add code-block wrappers to code examples

(cherry picked from commit 63b5fc4b8d)

* Docs: Provide descriptive labels for http references (#78959)

(cherry picked from commit f7c01bc866)

* Docs: Adding code blocks wrapper (#79042)

* Adding code blocks wrapper

(cherry picked from commit 3a788314a2)

* Cleaned up test_strategies doc (#79045)

Authored-by: Shade Alabsa <shadealabsa@microsoft.com>
(cherry picked from commit 3fc3371463)

* Docs: fixed configs docs to properly display code blocks (#79040)

* fixed some docs to properly display code blocks
Co-authored-by: Shade Alabsa <shadealabsa@microsoft.com>

(cherry picked from commit 25a770de37)

* Docs: Add code-block wrappers in faq.rst (#79047)

(cherry picked from commit 35700f57cc)

* Docs: Add code-block wrappers in lookup.rst & strategy.rst (#79032, #79033) (#79048)

(cherry picked from commit 680bf029b1)

* Add code-block wrappers in network_debug_troubleshooting.rst

(cherry picked from commit 57f22529cb)

Co-authored-by: Samuel Gaist <samuel.gaist@idiap.ch>
Co-authored-by: prayatharth <73949575+prayatharth@users.noreply.github.com>
Co-authored-by: Mudit Choudhary <74391865+muditchoudhary@users.noreply.github.com>
Co-authored-by: Blaster4385 <53873108+Blaster4385@users.noreply.github.com>
Co-authored-by: Deepshri M <92997066+Deepshaded@users.noreply.github.com>
Co-authored-by: shade34321 <shade34321@users.noreply.github.com>
Co-authored-by: Shellylo <54233305+Shellylo@users.noreply.github.com>
Co-authored-by: Shubhadeep Das <dshubhadeep@gmail.com>
2022-10-06 17:00:05 -05:00
9d7989fbe8 Backport hacktoberfest 2 (#79067)
* Docs: Replace Latin terms in the dev_guide #78997 (#79005)

(cherry picked from commit fbd98cd824)

* replace with boolean true/false (#78950)

(cherry picked from commit 78c9fb4159)

* docs: replace latin terms with english in the os_guide directory (#79007)

Fixes #79003

(cherry picked from commit 55925958ea)

Co-authored-by: Mazen Ramadan <mazenramadan00@gmail.com>
Co-authored-by: Niranjan Meghwal <56632168+NiranjanMeghwal@users.noreply.github.com>
Co-authored-by: Samuel Gaist <samuel.gaist@idiap.ch>
2022-10-06 16:59:46 -05:00
7077ea7f95 Backport hactoberfest 1 (#79065)
* apt_key, fix example indentation

Co-authored-by: Matt Clay <matt@mystile.com>
(cherry picked from commit cee9872605)

* Docs: Add code-block wrappers to code examples: testing_documentation.rst (#78966)

* Docs: Add code-block wrappers to code examples: testing_documentation.rst
List of changed files:
- docs/docsite/rst/dev_guide/testing_documentation.rst
* Fix: match whitespace convention of other occurences

(cherry picked from commit 538b99781f)

* added code-blocks according to #78962 (#78972)

(cherry picked from commit 01484cdc68)

* Adding code-block wrappers to code examples (#78968)

(cherry picked from commit 1db75a41bf)

* added code-blocks according to #78963 (#78969)

* added code-blocks according to  #78963
* Update testing.rst, added newlines

(cherry picked from commit 446406a0c8)

* Docs: Add code-block wrappers to code examples in style_guide (#78970)

* Docs: Add code-block wrappers to code examples in style_guide
List of changed files:
- docs/docsite/rst/dev-guide/style_guide/index.rst
- docs/docsite/rst/dev-guide/style_guide/basic_rules.rst

(cherry picked from commit 3dc0c2135e)

* #78971 Update module_lifecycle.rst (#78974)

* Update module_lifecycle.rst

(cherry picked from commit 93c2cb2b8e)

* #78965 Adding the code-block to prevent the translation (#78979)

* Adding the code-block to prevent the translation

(cherry picked from commit 9afb37eda6)

* Adds code-block in collection documentation (#78977)

* fix issue #78976

(cherry picked from commit 1b922b42dd)

* docs - Use code-block to format examples in Windows module development walkthrough (#78985)

(cherry picked from commit 56c48d1c45)

* Docs: true/false with boolean values in docsite/rst/os_guide (#78957)

(cherry picked from commit fb8c2daf46)

* Update porting_guide_2.0.rst (#78951)

Replaced http link with rst version - issue https://github.com/ansible/ansible/issues/78914

(cherry picked from commit dc2d15fca4)

* Update porting_guide_3.rst (#78952)

Fixes #78914

(cherry picked from commit 919c449256)

* Update porting_guide_4.rst (#78953)

(cherry picked from commit ba32642538)

* Update porting_guide_5.rst (#78954)

(cherry picked from commit 5137cb16e9)

* scenario guide doc changes (#78934)

(cherry picked from commit 5b333c9665)

Co-authored-by: Jasper <44026484+jasperjonker@users.noreply.github.com>
Co-authored-by: Ozan Uslan <54141068+ozanuslan@users.noreply.github.com>
Co-authored-by: Lukas Grimm <ombre@ombre.ch>
Co-authored-by: Deepshri M <92997066+Deepshaded@users.noreply.github.com>
Co-authored-by: IMvision12 <88665786+IMvision12@users.noreply.github.com>
Co-authored-by: Luigi Giugliano <luigi3000@gmail.com>
Co-authored-by: Thomas Doczkal <thomas@doczkal.eu>
Co-authored-by: jmakhack <joshmak@berkeley.edu>
Co-authored-by: Sudipto Ghosh <sudipto@ghosh.pro>
Co-authored-by: Kampftoast <creeper00001@googlemail.com>
Co-authored-by: J-F-Far <joel.f.farthing@gmail.com>
2022-10-06 16:59:30 -05:00
cd9ef334d0 [stable-2.14] Ensure that we do not squash keywords in validate (#79049) (#79062)
* [stable-2.14] Ensure that we do not squash keywords in validate (#79049)

* Ensure that we do not squash keywords in validate. Fixes #79021

* become_user: nobody should only apply to the test tasks, not the setup_test_user role

* Update how become_user is specified

* Add test to ensure keyword inheritance is working for become

* Add clog frag

* Cache fattributes to prevent re-calculation

* ci_complete

* Remove unnecessary getattr.
(cherry picked from commit 420564c5bc)

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

* Remove unneeded merge conflict changes
2022-10-06 09:32:40 -05:00
cd52ae459d Fix using FQCN for flush_handlers (#79057) (#79061)
Fixes #79023

(cherry picked from commit e1daaae42a)
2022-10-06 09:23:49 -05:00
b5eba64882 Omit full fix (#79024)
* omit keyword should reset to context (#78917)

* omit keyword should reset to context

  ensure we use context/inheritance when calculating value,
  using default only when context is unavailable.

  fixes #75692

(cherry picked from commit 9650ddb11c)

* fixes to FA inheritance (#78990)

finalized applies to all field attributes
fix getting parent value
also remove unused/needed extend/prepend signature
moar testing

(cherry picked from commit ff6e4da36a)

* setup role needs it's own info
2022-10-06 08:53:36 -05:00
332ba231cd [stable-2.14] Use python re to parse service output instead of grep (#79015) (#79050)
* Use python re to parse service output instead of grep. Fixes #78541

* Add clog frag

* Add an extra guard to abort if rc is 4, and /etc/init.d is missing
(cherry picked from commit 4458128)

Co-authored-by: Matt Martz <matt@sivel.net>
2022-10-06 08:46:51 -05:00
fea62e7553 Do not crash templating when filter/test name is not a valid Ansible plugin name (#78913) (#79026)
* Do not crash templating when filter/test name is not a valid Ansible plugin name.
* Store and re-raise KeyError if there was one.

Co-authored-by: s-hertel <19572925+s-hertel@users.noreply.github.com>
(cherry picked from commit 6d0aeac1e1)
2022-10-06 08:46:42 -05:00
288dab3214 Update Ansible release version to v2.14.0b2.post0. (#78996) 2022-10-03 15:20:08 -05:00
e88427ae6b New release v2.14.0b2 (#78944) 2022-10-03 13:40:10 -04:00
f46bbb2140 [stable-2.14] ansible-test - Update distro containers to 4.8.0.
The updated containers include coverage 6.5.0..
(cherry picked from commit 5b239acb77)

Co-authored-by: Matt Clay <matt@mystile.com>
2022-09-30 11:03:12 -07:00
53bac70257 [stable-2.14] ansible-test - Update coverage to version 6.5.0. (#78945)
(cherry picked from commit 20c1252212)
2022-09-30 09:56:28 -07:00
d15815c88d Fix connection/become task loop settings (#78565) (#78935)
* Fix connection/become task loop settings

* Remove old code

(cherry picked from commit ba6da65a0f)
2022-09-29 17:04:36 -07:00
04fe7b374d ansible-test validate-module - support sidecar docs (#78904) (#78933)
(cherry picked from commit be4807b712)
2022-09-29 17:03:25 -07:00
923f952d6b Upgrade antsibull-docs to 1.6.1 (#78872) (#78929)
* Bump antsibull-docs version to 1.6.0 to fully support filter docs.

* known_good_reqs.txt no longer exists.

* Bump version to 1.6.1.

(cherry picked from commit d93883645c)

Co-authored-by: Felix Fontein <felix@fontein.de>
2022-09-29 17:02:27 -07:00
5dff3bf46f Backportapalooza 09 29 (#78928)
* iss#72389: Adds note and polishes docs/docsite/rst/tips_tricks/sample_setup.rst (#78858)

Co-authored-by: Jaroslav Klech <jklech@redhat.com>
(cherry picked from commit 964e2bc6fe)

* Fixes typo in rst format (#78884)

.. hint:: requires a blank line above and below.

(cherry picked from commit 71adb02142)

* Update yum.py (#78829)

##### SUMMARY
The entire yum command should be highlighted, not only its options.

##### ISSUE TYPE
- Docs Pull Request

+label: docsite_pr

(cherry picked from commit f8f76c5886)

* Add Ansible community 7.x porting guide (#78916)

(cherry picked from commit 0884a7cf0e)

* Fixed spelling (#78911)

(cherry picked from commit ae66d9a1f4)

* Add message about viewing chat history when on IRC (#78834)

(cherry picked from commit 0343ae46d2)

Co-authored-by: JaroslavKlech <klechh@gmail.com>
Co-authored-by: Anwesha Das <anwesha@das.community>
Co-authored-by: Olivier Clavel <olivier.clavel@gmail.com>
Co-authored-by: Christian Adams <chadams@redhat.com>
Co-authored-by: Joel McGuire <jlmcguire4@gmail.com>
Co-authored-by: Greg "Gwmngilfen" Sutcliffe <github@emeraldreverie.org>
2022-09-29 17:01:59 -07:00
7209c0b3d4 apt_repository, handle both new/old gpgp stds (#78735) (#78909)
* apt_repository, handle both new/old gpgp stds

(cherry picked from commit c7cde2645d)
2022-09-29 17:01:05 -07:00
6b8432850f apt module, prevent tb from invalid type for pkg (#78666) (#78907)
* apt module, prevent tb from invalid type for pkg

 see #78663

(cherry picked from commit 7acd4f75c0)
2022-09-28 09:13:00 -05:00
0747c5c859 [stable 2.14] Fix known host changed status when removing non-existing key #78598 (#78881)
* Fix known_hosts changed status when removing non-existing key (#78748)

* Ensure no change is reported when removing missing key for host with other keys

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

* Rename changelog fragment for fix known hosts changed status cherry pick

* Rename changelog according to new PR number

Co-authored-by: Matt Martz <matt@sivel.net>
2022-09-28 08:16:08 -05:00
df01924168 [2.14] Improve filter docs (#78883)
(cherry picked from commit 9aa9b4eac0)
2022-09-28 08:15:53 -05:00
e5fd4ae747 plugin loader fix existing config testing (#78859) (#78891)
create specific function to find config entry to avoid repopulating constantly

(cherry picked from commit 4115ddd135)
2022-09-28 08:15:43 -05:00
30b7bfc1d8 documented windows filters (#78876) (#78892)
* documented windows filters

Co-authored-by: Felix Fontein <felix@fontein.de>
Co-authored-by: Sandra McCann <samccann@redhat.com>
(cherry picked from commit 7c4d5f5099)
2022-09-28 08:15:29 -05:00
47712d8d48 Update Ansible release version to v2.14.0b1.post0. (#78875) 2022-09-26 10:27:57 -04:00
c02a270ef1 New release v2.14.0b1 (#78870)
Signed-off-by: Dimitri Savineau <dsavinea@redhat.com>

Signed-off-by: Dimitri Savineau <dsavinea@redhat.com>
2022-09-26 09:30:06 -04:00
4655fe6d8b [stable-2.14] ansible-test - Fix integration test target filter. (#78862)
- Allow disabled, unsupported, unstable and destructive integration test targets to be selected using their respective prefixes.
- Allow unstable tests to run when targeted changes are made and the ``--allow-unstable-changed`` option is specified (resolves https://github.com/ansible/ansible/issues/74213).
(cherry picked from commit d3d7785472)

Co-authored-by: Matt Clay <matt@mystile.com>
2022-09-22 13:38:14 -07:00
7aff371ba5 ansible-test - Fix default container version. (#78854) 2022-09-22 00:20:53 -07:00
38f706a2a3 ansible-test - Update base and default containers. (#78847) 2022-09-21 15:49:43 -07:00
eb35cf9bb7 [stable-2.14] Don't request repo updates when only testing modes (#78843) (#78848)
(cherry picked from commit 2542048)

Co-authored-by: Matt Martz <matt@sivel.net>
2022-09-21 15:24:37 -07:00
900010571d [stable-2.14] Add use_rsa_sha2_algorithms option for paramiko (#78789) (#78842)
Fixes #76737
Fixes #77673

Co-authored-by: Matt Clay <matt@mystile.com>
(cherry picked from commit 76b7466)

Co-authored-by: Matt Martz <matt@sivel.net>
2022-09-21 12:50:13 -05:00
85dba943ab [stable-2.14] ansible-test - Update Python 3.11 support. (#78840) (#78841)
- Update sanity test requirements to fully support Python 3.11.
- Make Python 3.11 the default in the base and default test containers.

(cherry picked from commit 4d25233ece)
2022-09-21 10:42:14 -07:00
c71fdadadb [stable-2.14] Add ssh_args and friends back, add var for proxy_command (#78826) (#78836)
* [stable-2.14] Add ssh_args and friends back, add var for proxy_command (#78826)

Fixes #78750
(cherry picked from commit 1b47def)

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

* Remove non-backportable changes
2022-09-21 11:35:31 -05:00
3b937123d2 final docs for filters (#78800)
Co-authored-by: Felix Fontein <felix@fontein.de>
2022-09-20 11:38:26 -04:00
24a42bb25e fix network_connection_options text (#78813) 2022-09-20 10:04:24 -04:00
b1ff0f4ebc vault secrets file, keep context when symlink (#78734)
* vault secrets file, keep context when symlink

	fixes #18319

Co-authored-by: Sloane Hertel <19572925+s-hertel@users.noreply.github.com>
2022-09-20 09:07:21 -04:00
e5e87a3927 ansible-test - Update pylint to 2.15.3. (#78811) 2022-09-19 15:34:41 -07:00
ab8a291824 Add sudo for writing bash completion to a global (#78712) 2022-09-19 16:45:39 -04:00
a02e22e902 Add --offline option to 'ansible-galaxy collection install' (#78678)
* Add --offline option to 'ansible-galaxy collection install' to prevent querying distribution servers

This allows installing/upgrading individual tarfiles to have dependency resolution.
Previously needed to be done manually with --no-deps or else all collections and dependencies needed to be included in the requirements.

Co-authored-by: Sviatoslav Sydorenko <wk.cvs.github@sydorenko.org.ua>
2022-09-19 14:10:36 -04:00
813c25eed1 plugin docs: look at all potential sidecar docs extensions before giving up (#78788)
* Look at all potential sidecar docs extensions before giving up.

* Do not process Python files twice.
2022-09-19 11:50:27 -04:00
1d410ca700 Fix local facts unreadable (#76095)
* Catch exceptions during stat calls

If such an exception is not caught it causes the complete
local facts gathering to fail.
2022-09-19 10:57:02 -04:00
9b8e60c36d While the Python function is called ismount, the filter has the names mount and is_mount. (#78792) 2022-09-19 10:50:31 -04:00
616ad883ad Add OSMC to Debian OS_FAMILY_MAP (#78778)
* Add OSMC to Debian OS_FAMILY_MAP

 - os_family fact of the Debian-based OSMC distribution was not detected correctly

* tweak changelog

Co-authored-by: Matt Davis <6775756+nitzmahone@users.noreply.github.com>
2022-09-16 10:44:04 -07:00
2df2261cd4 Doc: Community Steering Committee policy: add topics triage workflow (#78732) 2022-09-16 09:48:46 -04:00
f26f3325ba apt - fix module short-circuiting when a package is not installed and only_upgrade is True (#78790) 2022-09-15 18:24:39 -04:00
7683c0ae54 ansible-test - Update base and default containers. (#78774) 2022-09-15 12:44:05 -07:00
4b45b4b09d apt - fix failure when package is not installed and only_upgrade=True (#78781)
* apt - fix module failure when package is not installed and only_upgrade is True

* changelog
2022-09-15 12:42:34 -07:00
9bc4fa496c Env gitignore (#78766)
* added env to git ign aka the std name for py venv

* added the github def py env ign
2022-09-15 12:16:38 -07:00
86b86398f0 add ansible_name/ansible_aliases attrs to plugin objects (#78700)
*  new _fqcn attribute to plugin objects
* unbreak plugins in subdirs
* Fix inadventent changes to _load_name and use existing vars
* add plugin aliases and name property, and replace plugin._load_name where incorrect
* Fix listing plugin names

Fix listing legacy and builtin together
test deprecated plugin documentation
fix doc extensions
remove sometimes inaccurate _load_name handling from plugin.name

* Add tests for REJECT_EXTS and doc extensions

Fix unpredictable collection redirects so non-fqcns in the redirect list are guaranteed to be legacy (instead of determined by the collections keyword)

Move aliases and name properties to _update_object so all plugin types, including doc fragments, can use them

* make legacy plugin names internally consistent
* rename attributes to ansible_name and ansible_aliases
2022-09-15 14:15:42 -04:00
a55afcc39a Added warning (#78785) 2022-09-15 14:13:01 -04:00
cbffb77f57 Document some more filters (#78548) 2022-09-15 14:00:52 -04:00
e276770ee9 Removed repeated introduction paragraph (#78691) 2022-09-15 11:46:57 -04:00
c7b4a25f9d Fix typo and wrong syntax in intro_patterns.rst (#78702) 2022-09-15 11:37:03 -04:00
db33ca8e1a faq legacy vs builtin (#78769) 2022-09-15 11:12:48 -04:00
f50ff1c2db Fix Issue #78564 (#78741) 2022-09-15 11:06:31 -04:00
952ee88f33 Documented connection parameters required to enable scp (OpenSSH >=9.0) (#78745) 2022-09-15 11:03:09 -04:00
d4407ca688 Ansible 6.4.0: Porting Guide (#78775) 2022-09-15 10:34:05 -04:00
4c720036e4 Update docs-build and rstcheck sanity tests. (#78773) 2022-09-14 15:45:05 -07:00
9f16bdbdda Ensure syntax check errors include filenames (#77679)
This fixes bug which prevents identification of broken playbook when
passing multiple playbooks as arguments, something that is common
especially with `--syntax-check`.

Affects: ansible-lint
2022-09-14 12:50:50 -07:00
df6a564abd add galaxy docs back to core' (#78764) 2022-09-14 20:18:44 +01:00
695c48957d Fix test docs (#78756) 2022-09-14 13:32:28 -04:00
8090ee3e78 post_validate LoopControl (#75715)
avoid having to template/post_validate each part of the object
2022-09-14 10:15:23 -04:00
540442db2e issue #78760 missing indexes (#78763) 2022-09-13 14:43:21 -04:00
563f3ecc11 Error for context-dependent redirects (#78755) 2022-09-13 09:31:38 -05:00
86ab63f281 Recover unix load average into an ansible_loadavg fact (#75319)
* Recover unix load average into an ansible_loadavg fact

The average load is available out of the box with os.getloadavg().
It adds useful context to the existing ansible_memory_mb and ansible_mounts
facts that provide size and utilization or memory and disk space.

* Add an integration test
2022-09-13 10:09:06 -04:00
a6d4c3ff7c Print skip reason for skipped meta tasks instead of an empty msg in -vv (#78681)
Fixes #77315
2022-09-13 09:50:10 +02:00
a26c325bd8 uri: added use_netrc argument to allow ignoring netrc (#74397) (#78569) 2022-09-12 09:38:22 -05:00
79f67ed561 ansible-test - Fix container error handling. (#78739) 2022-09-09 10:40:21 -07:00
2e5e8026cc Improve split integration test. (#78738)
* Omit redundant fact gathering.

* Add connection type to split test.

* Add user info to split integration test.
2022-09-08 15:26:22 -07:00
62221a3be2 Update test matrix symlinks. (#78737)
* Add remote platform symlinks.

These were already supported by ansible-test.
This change adds the symlinks for use in the CI test matrix.

* Remove obsolete AIX test symlink.

AIX was already removed from ansible-test.
2022-09-08 14:30:59 -07:00
b8025ac160 Allow selection of TLS/SSL ciphers (#78650)
* Allow selection of TLS/SSL ciphers. Fixes #78633
* Never pass None as the password. Fixes #53373
2022-09-08 15:11:13 -05:00
fa093d8adf ansible-doc: remove manual formatting (#78668)
* remove manual formatting and make the output align closer with the original YAML

Co-authored-by: Brian Coca <brian.coca+git@gmail.com>
2022-09-08 16:02:58 -04:00
eb17ab8c27 ansible-doc consistent version info ignore (#78725) 2022-09-08 12:19:45 -07:00
8a7b89c2f4 ansible-test - Update distro containers. (#78729) 2022-09-07 19:32:45 -07:00
b3854161a0 ansible-test - Update coverage to version 6.4.4. (#78728) 2022-09-07 18:47:19 -07:00
c56b35598f ansible-test - Upgrade pylint. (#78727)
This version of pylint now supports Python 3.11.
2022-09-07 14:22:38 -07:00
fbd828673d Fix distro fact handling for Flatcar (#77635)
* Fix distro fact handling for Flatcar

The existence of the file /etc/flatcar/update.conf depends on
bootstrap configuration typically provided by the user. For that
reason this file is unsuitable for determining distro facts for
Flatcar Container Linux.

The distribution_release fact is meaningless in the case of Flatcar
since Flatcar doesn't have named releases. The distribution_version
fact, however, IS meaningful and should contain a number such as
"3139.2.0".

- Use /etc/os-release instead of /etc/flatcar/update.conf.
- Drop the distribution_release fact.
- Set the distribution_version fact.
- Update distro test fixture for Flatcar
- Generate the fixture using gen_distribution_version_testcase.py.
- Override result.distribution and result.os_family manually as the
  generator script gives wrong values.
- Use a recent Flatcar version.

Signed-off-by: Johanan Liebermann <jliebermann@microsoft.com>
2022-09-07 13:14:12 -04:00
77ba025a13 document tests (#78685)
Document the builtin test plugins

Co-authored-by: Felix Fontein <felix@fontein.de>
2022-09-07 09:49:23 -04:00
fcfdca8e7d Overriding AnsibleContext.resolve is not needed/allowed (#78714)
https://github.com/pallets/jinja/pull/1393
https://github.com/pallets/jinja/pull/1544

ci_complete
2022-09-07 15:20:24 +02:00
41b62f7db4 Limit Galaxy API calls during ansible-galaxy dependency resolution (#77468)
* Limit Galaxy API calls during ansible-galaxy collection dependency resolution when possible

Installing a tarfile with a dependency from a Galaxy server (e.g. dependencies: {'ns.coll': '>=1.0.0'}) does not get the available versions of the dependency from the galaxy server if a sufficient version is already installed.

Co-authored-by: Sviatoslav Sydorenko <wk.cvs.github@sydorenko.org.ua>
2022-09-06 17:07:04 -04:00
dc2a79f1c3 ansilbe-doc fixes for filters/test listing (#78696)
* split filters
* listing fixes
* return to no docs being exception
2022-09-06 16:13:18 -04:00
38a82a5cc4 ansible-test - Remove Fedora 35 support. (#78720) 2022-09-06 13:00:52 -07:00
8ebca4a6a3 fetch_file - properly split files with multi-part file extensions (#75257) 2022-09-06 14:30:04 -05:00
fd19ff2310 Propagate ansible_failed_task to an outer rescue (#78676)
Fixes #43191
Fixes #72638
Fixes #78042

Co-authored-by: Sandra McCann <samccann@redhat.com>
2022-09-06 17:11:49 +02:00
848143640b issue 78082 move content and orphan user guide (#78711) 2022-09-06 05:20:46 -07:00
223e05e012 issue 78082 create collections users guide (#78708) 2022-09-05 08:06:13 -07:00
75975a691e issue 78082 modules plugins collections (#78699) 2022-09-02 12:52:06 -04:00
a66a6c2f84 issue 78082 create separate vault guide (#78697) 2022-09-02 12:19:58 -04:00
72783837c5 fix issue with legacy pugins and no docs (#78686)
* fix issue with legacy pugins and no docs
2022-09-01 17:48:04 -04:00
077e1bfe17 Added section about boolean variables (#78653)
Co-authored-by: William Njuguna <william@coralogix.com>
2022-09-01 14:28:03 -04:00
5f2bb2ba93 Add the rest of the runtime keys to the example in the default collection skeleton (#78573) 2022-09-01 14:24:49 -04:00
b8abcd17a8 new: documentation update for galaxy usr guide (#78649) 2022-09-01 14:20:45 -04:00
4260b71cc7 refactor and fixes for doc parsing (#77719)
* refactor and remove redundant code in documentation

  allow location and building api to be more accessible
  fix issues with displaying ansible.legacy and ansible.builtin
  ensure we don't x2 process tokens (some modules reference them also) fixes #77764
  move to constants vs hardcoded
  more informative errors and comments
  now have actual filter/test plugins, which expose the filter/test functions
  moved filter/test loading/finding logic into jinja2pluginloader, removed dupe implementations
  added tests for case in which we unique by basename when listing

Update lib/ansible/utils/plugin_docs.py
Co-authored-by: Sloane Hertel <19572925+s-hertel@users.noreply.github.com>
2022-09-01 14:16:05 -04:00
2464e1e91c Fix vars plugin code and documentation mismatch (#78562)
* Add a warning for collections that are attempting to be autoloaded to no effect
* Deprecate REQUIRES_WHITELIST and add support for REQUIRES_ENABLED so the docs are accurate
* Fix documentation
* add more vars plugin tests
* Simplify code and add a FIXME for another bug
* fix precedence
* Make setting the class attr at all a warning, even if it's True
* Add fun parsing for _load_name
* include _load_name in messages
2022-08-31 12:15:58 -04:00
f8e24e4a65 Guard urllib3 imports against all exceptions. Fixes #78648 (#78667) 2022-08-30 14:22:56 -05:00
19e7c5b0c1 _get_next_task_from_state should not mutate anyting outside of state (#78657)
Fixes #78612
2022-08-30 17:16:21 +02:00
38c3b5e8f1 Fix typos in stat module examples (#78651) 2022-08-30 17:05:27 +02:00
0c57734819 until is also implicit (#78632)
The until keyword templating is also implicit, this will now reflect in the docs
2022-08-29 11:21:37 -04:00
d8cb9117ac Skip test if no there are no problematic chars for wcswidth (#78645) 2022-08-29 09:06:37 -05:00
ebcf1654c4 Note that become_user is required for runas (#78603) 2022-08-25 15:54:41 -04:00
87ba1e29d3 doc: Correct mixed up commentary and task name (#78610)
Co-authored-by: Sloane Hertel <19572925+s-hertel@users.noreply.github.com>
2022-08-25 15:17:23 -04:00
484a671c5e Fixes broken links. For the github links this was where references to in the URL are stale due to the default branch in the linked repository now being . While github does have the functionality of dropping you on the default branch (via an HTTP 302 redirect) when it does not recognize the branch you are trying to reach, the fact that most of these links work is more of a coincidence than reliance on a github feature. Also removes unnecessary whitespace where found. (#78638) 2022-08-25 15:14:05 -04:00
81813b7f23 Fixes parameter name in expect module examples (#78635) 2022-08-25 12:10:25 -07:00
49fdf59d1f Fixes typo on docsite playbook_reuse_roles page (#78630) 2022-08-25 12:06:50 -07:00
12cec69545 Fix validate-modules version_added test (#78554) 2022-08-25 10:47:06 -04:00
843405077e prep intro inventory page to be subdivided (#78634) 2022-08-24 16:53:42 -04:00
df497ea13b Add Porting Guide for ansible-community v6 (#78625) 2022-08-24 09:36:42 -04:00
3b9f1871e5 Docs: fix issue-76133-apt-repository (#78586) 2022-08-23 11:06:11 -04:00
f1c56e988d Fail fast in stuck ansible-galaxy-collection
This specific integration test gets stuck periodically causing the
Galaxy jobs to be killed on timeout wasting an hour of runtime. The
module that gets stuck waiting on Pulp is an in-test one, called
`setup_collections`. When it works, the task is complete in around 70
seconds but when it doesn't, it just freezes the whole play.

This patch attempts to make it fail faster by putting a reasonable
timeout value of 2 minutes.
2022-08-23 16:57:19 +02:00
38db9cf417 ansible-test - Update test containers. (#78615)
The test containers no longer use the `VOLUME` instruction.
2022-08-22 14:22:29 -07:00
4187707f03 ansible-test - Use --tmpfs to run containers. (#78605) 2022-08-22 12:24:23 -07:00
2e536c0afb Fix file integration test chattr/lsattr check. (#78614)
On BusyBox systems such as Alpine, chattr on a tmpfs fails with a status of 0 and output only on stderr.

This change updates the test to not assume output on stdout.
2022-08-22 11:18:17 -07:00
ece85abbc4 ansible-test - Verify executables are executable. (#78606) 2022-08-19 19:45:51 -07:00
5ac40b358d fix adhoc dev example (#78593) 2022-08-19 15:06:03 -04:00
beb70daf14 Fix pytest collection during test_host partial run
Sometimes pytest errors out with an `ImportError` during its tests
collection stage when a Python package/directory containing the test
module does not have an `__init__.py` in it. This is being observed
under Python 3.9 and higher.

The patch provides a workaround for this problem but does not address
the root cause which is currently unknown.

Ref:
https://github.com/ansible/ansible/pull/78585#issuecomment-1220885431
2022-08-19 20:11:57 +02:00
045f30371f fix Ansible 2.14 reference (#78589) 2022-08-19 09:15:52 -07:00
42d8a9daa8 Prevent double failing hosts for includes in loops (#76928)
Fixes #23161
2022-08-19 14:19:31 +02:00
3d6a60b481 Address inactive but legacy print calls found with code checking. (#78581)
* Address inactive but legacy print calls found with code checking.

* Per bcoca remove the inactive legacy print statements
2022-08-18 19:23:39 -04:00
4c8b8a06be Fix exit codes for role search and delete. Fixes #78516 (#78578) 2022-08-18 15:15:51 -04:00
1e6730aec4 docs: Update managed node requirements (#78468) 2022-08-18 14:48:51 -04:00
e0eb45e753 Docs: Issue 78082 Create command line guide (#78567) 2022-08-18 14:46:36 -04:00
9e287d9002 issue 78082 move bsd hosts content (#78568) 2022-08-18 14:31:18 -04:00
deb54e4c5b Relax minimal config to enable manifest functionality (#78574)
* Revert "Fix incorrect docs about how to enable manifest functionality (#78572)"

This reverts commit ac1ca40fb3.
2022-08-17 18:01:46 -05:00
ac1ca40fb3 Fix incorrect docs about how to enable manifest functionality (#78572) 2022-08-17 15:10:00 -05:00
d2f8099118 Use MANIFEST.in style directives to build collections (#78422) 2022-08-17 14:22:39 -05:00
f9a450551d add required file to collection skeleton (#77418)
* add required file to collection skeleton

This file is required to be able to upload a collection.

It is present in
https://github.com/ansible-collections/collection_template/blob/main/meta/runtime.yml
but that does not get used by default.

Without this, if you use the "ansible-galaxy collection init" command
and you try and publish that collection without adding this file, you
get the error:

"ERROR! Galaxy import process failed: 'requires_ansible' in
meta/runtime.yml is mandatory, but no meta/runtime.yml found (Code:
UNKNOWN)"

Also updates relevant test and adds a changelog fragment
2022-08-17 14:42:47 -04:00
8dc097989b add note to use package_facts module (#78484) 2022-08-17 18:59:55 +01:00
2e8082ebb0 yum_repository: Do not set default value for async (#76750)
* yum_repository: Do not set default value for async

The `async` repository option is deprecated in RHEL 8, but Ansible sets

```ini
async = 1
```

even when it's omitted from the module options, which causes `dnf` to complain
about an unknown configuration option.

This commit removes the default value from the `async` parameter, which means
it won't be added to the repository file if omitted from the module parameters.

Signed-off-by: Benoît Knecht <bknecht@protonmail.ch>

* Document the specific versions with the default True and the option deprecation for RHEL 8

Co-authored-by: s-hertel <19572925+s-hertel@users.noreply.github.com>
2022-08-17 13:56:24 -04:00
bf1ef5a1f3 Replace get_persistent_connection_options in task_executor with get_options (#74446)
Replace get_persistent_connection_options with get_options
Remove special case for network sub_plugin in _set_plugin_options
Try to avoid mock connection pretending to be persistent
Rename variables->options to reflect what they actually are
Gather options for ssh_type_conn on network_cli
Drop reliance on sub_plugin["type"]
2022-08-17 12:12:08 -04:00
2fdaee143a update link for RH customers in docs banner (#78563) 2022-08-17 16:56:49 +01:00
33ee5d4c1b update FAQ with not about libyaml (#78483) 2022-08-16 16:06:25 -04:00
7ae1eabaa4 clarify collection signature not available from Community Galaxy (#78386) 2022-08-16 16:05:06 -04:00
ccf1a63158 issue #78082 separate inventory user guide (#78555) 2022-08-16 15:02:39 -04:00
811093f022 Move handler processing into new PlayIterator state (#77955)
Fixes #46447
Fixes #52561
Fixes #54991
Fixes #64611
Fixes #64999
Fixes #65067
Fixes #72725
Fixes #72781
Fixes #77616
2022-08-16 18:37:14 +02:00
254de2a434 Templar: deprecate shared_loader_obj option (#78540) 2022-08-16 17:17:10 +02:00
d683c5bd21 ansible-test - Fix Ubuntu 20.04 bootstrapping. (#78551) 2022-08-15 17:00:19 -07:00
660aceaa77 Fix version switcher for Japanese docs (#78432) 2022-08-15 14:05:03 -04:00
b6f42547f4 Targeting a small typo correction (#78531) 2022-08-15 10:44:58 -04:00
4604ea38dd Supply some descriptions for settings used in ansible.cfg (#78536) 2022-08-15 10:43:45 -04:00
8e96c27888 ansible-test - Update base and default containers. (#78532) 2022-08-11 16:03:15 -07:00
69ceb31600 ansible-test - Update sanity test requirements. (#78528) 2022-08-11 14:44:50 -07:00
09d0df1d87 Fix variable use before definition. (#78500)
* Fix variable use before definition.

* Include mkstemp in exception handler.

Also remove two pointless variable assignments.
2022-08-11 13:58:52 -07:00
7f69629fa7 Fix ansible-docs: shipping ansible in wheel format #78485 (#78524) 2022-08-11 16:54:21 -04:00
135f95fb2f Split up ansible-test integration tests. (#78520)
* Relocate venv-pythons.py script.

* Split out unsupported-directory test.

* Split out sanity-import test.

* Split out sanity-validate-modules test.

* Split out units test.

* Split out integration test.

* Split out units-constraints test.

* Split out integration-constraints test.

* Split out coverage test.

* Split out sanity test.

* Split out git test.

* Update test groups.
2022-08-11 13:40:36 -07:00
0de4480467 allow multiple types for null representation (#78451)
* allow multiple types for null representation

  '' is not Nonetype
  fixes #76493
2022-08-11 16:07:57 -04:00
3a59cb25f4 add info about plugin name when ignoring abstract errors (#78465)
* add info about plugin name when ignoring abstract

  related to #78464

* added error to narrow down method
2022-08-11 16:07:28 -04:00
99016653a2 ansible-test - Fix self-test change handling. (#78521) 2022-08-11 12:35:23 -07:00
86298b7a47 Fix --role-file arg detection (#78475)
* Fix --role-file arg detection. Fixes #78204

* Do not traceback, give better error

* Add coverage for compound shortopts to match -r. Fixes #78491
2022-08-11 14:30:00 -05:00
740864869e ansible-config init fixes (#78453)
* ansible-config init fixes

  now handles --disabled correctly for 'vars' format
  also does not display internal config entries anymore

  fixes #78438

note plugins have _prefixed settings that are public, this should change
2022-08-11 15:20:59 -04:00
2729088f2a PlayIterator: deprecate cache_block_tasks and get_original_task (#78514) 2022-08-11 15:14:17 -04:00
cb0215bcdd adding .PHONY for 3 rules (#78510)
rules: docs, version, install_manpages
2022-08-11 15:11:32 -04:00
3add5e9321 Fix apt making changes in check mode (#78496)
* Don't actually update the cache in check mode

Add tests for updating the cache in check mode

* Don't mark packages as manually installed in check mode and add a test for it

* changelog

* Update test/integration/targets/apt/tasks/apt.yml

* fix test
2022-08-11 15:08:50 -04:00
c35a36083d ansible-console - Fix arg name to match base class. (#78502) 2022-08-11 10:56:39 -07:00
0d3523df8f docs: misc fixes in The Ansible Development Cycle (#78513) 2022-08-11 13:56:19 -04:00
2b63fdd1b8 ansible-test - Fix ansible-doc sanity test FQCN. (#78518) 2022-08-11 10:53:23 -07:00
9eb3d6811b find - Use getattr instead of __getattribute__ (#78503) 2022-08-11 09:51:35 -07:00
3a666a131f Remove unused code. (#78499) 2022-08-11 09:50:32 -07:00
2d2839b234 module_utils - Fix changing value while iterating. (#78501) 2022-08-11 09:32:08 -07:00
0a199a07ed remove old network link (#78495) 2022-08-11 15:39:02 +01:00
2fedde6356 ansible-test - Update distro test containers. (#78506) 2022-08-10 20:48:02 -07:00
8367af9cdd ansible-test - No locale warning with delegation. (#78505)
The locale warning for the origin host is not relevant when delegation is used.
It is also not relevant when non-test commands are in use.
2022-08-10 18:53:19 -07:00
47804fcdf5 ansible-test - Update coverage to 6.4.3. (#78504) 2022-08-10 17:05:12 -07:00
9ee183c4b9 Clean up unit tests. (#78498) 2022-08-10 14:41:52 -07:00
89862fda3b ansible-test - Sanity test code cleanup. (#78497) 2022-08-10 14:41:37 -07:00
3f1838bf91 Update attributes of files that are links without specifying link target (#76167)
* update attributes of files that are symlinks

* update attributes of files that are hard links

* fix default state in documentation

* remove unnecessary suppression

* add to changelog
2022-08-11 06:01:31 +10:00
69c7e3f4a3 update the documentation for the _collection init_ command (#78404) 2022-08-09 15:13:42 -04:00
98a5820da6 Python 3.9 Controller minimum (#78466) 2022-08-09 10:24:25 -04:00
82246df5b7 fix configuration name in porting guide 2.12 (#78472) 2022-08-09 10:22:47 -04:00
650befed37 Add missing space after keywords. (#78480)
Also remove unnecessary parenthesis.
2022-08-08 13:18:28 -07:00
04e8927579 apt: include apt preferences (e.g. pinning) when selecting packages (#78327)
Fixes #77969
2022-08-05 17:05:07 +02:00
85acf4d1e5 ansible-test - Avoid use of deprecated type hints. (#78456)
* ansible-test - Avoid use of deprecated type hints.

PEP 585 deprecated many container types in the `typing` module in favor of the actual types, which support subscripting as of Python 3.9.

Conversion of `t.Type` was skipped since PyCharm does not currently recognize it.

* ansible-test - Fix `t` and `c` imports/shadowing.
2022-08-04 22:29:38 -07:00
5bee66fc5d ansible-test - More type hint updates. (#78455)
* Simple regex replace of multi-line function arg annotations on the first line.

* Manually fix up ArgumentParser type annotations.

* Manual type hint conversions.

* Manual conversion of function type hints.

* Remove unnecessary type hints on for statements.
2022-08-04 15:51:11 -07:00
b993b5cd49 ansible-test - Convert more type hints. (#78449)
* Simple regex replace of multi-line function arg annotations.

* Simple regex replace of multi-line function arg annotations with default values.

* Simple regex replace of multi-line function arg return annotations.

* Simple regex replace of assignment annotations.
2022-08-04 12:15:46 -07:00
2218b63aef Fix typo: missing 'install'. (#78448) 2022-08-04 14:26:32 -04:00
02e98810a9 Re-organize CI test groups for POSIX tests. (#77420)
* `context/target` tests must be in groups 1 - 2.
* `context/controller` tests must be in groups 3 - 5.

This makes it easier to efficiently organize groups and balance test runtimes.
2022-08-04 09:31:14 -07:00
7e634f54c3 Module/plugin docs: (#78380) 2022-08-04 12:30:38 -04:00
d92f6da592 Update galaxy_server_list (#78398) 2022-08-04 12:29:19 -04:00
733a767948 Add basic docs on how to create a collection docsite with antsibull-docs. (#78387) 2022-08-04 12:28:48 -04:00
ddd8b8bfd9 Improve grammar (#78391) 2022-08-04 12:26:25 -04:00
f5cac6bc5d docs: Fix control node reference links (#78424) 2022-08-04 12:22:05 -04:00
51f94570a6 Fix default value documentation for pipelining. (#78441) 2022-08-04 12:19:24 -04:00
eb462edb16 add example to import a playbook from collection (#78443) 2022-08-04 12:17:57 -04:00
eb46ab1399 fix broken link (#78434) 2022-08-04 03:16:10 -07:00
0591efd5e6 remove Templar caching (#78419)
* source of templating bugs (and at least one CVE), only applies to single-var values anyway
2022-08-03 15:26:37 -07:00
3eb0485dd9 ansible-test - Use more native type hints. (#78435)
* ansible-test - Use more native type hints.

Simple search and replace to switch from comments to native type hints for return types of functions with no arguments.

* ansible-test - Use more native type hints.

Conversion of simple single-line function annotation type comments to native type hints.

* ansible-test - Use more native type hints.

Conversion of single-line function annotation type comments with default values to native type hints.

* ansible-test - Use more native type hints.

Manual conversion of type annotation comments for functions which have pylint directives.
2022-08-03 15:08:55 -07:00
f2abfc4b3d ansible-test - Parse content config only once. (#78418) 2022-08-02 22:20:21 -07:00
ad79c1e0d0 Add support for json in adhoc -a (#78114)
Co-authored-by: Sandra McCann <samccann@redhat.com>
2022-08-03 11:24:12 +10:00
d8fefba20e ansible-test - Update locale logic to match core. (#78389)
Now that core requires UTF-8 filesystem encoding, ansible-test does as well.

Additionally, the `en_US.UTF-8` or `C.UTF-8` encoding must be available.
Previously the `en_US.UTF-8` encoding was requested, but its availability was never verified.
The fallback to `C.UTF-8` maintains UTF-8 encoding while allowing more flexibility in the running environment.
2022-08-02 16:59:14 -07:00
27ce607a14 Ansible 6.2.0: porting_guide changes (#78408) 2022-08-02 14:32:26 -04:00
9af282debe Slip data tagging to 2.15 (#78414) 2022-08-02 12:31:15 -05:00
05608b20e8 Fix listing collections that are missing the metadata required by build (#76596)
* Rethread pr/70185 through the dependency resolver

Hang optional metadata toggle on the ConcreteArtifactsManager instead of threading it through whole list codepath

Don't error while listing collections if a collection's metadata is missing keys required for building a collection.

Give an informative warning if metadata has been badly formatted.

Co-authored-by: Sam Doran <sdoran@redhat.com>
2022-08-02 11:46:47 -04:00
9b79d6ba35 config error origin (#78407) 2022-08-02 11:26:54 -04:00
a2174fc6d9 Fix removing existing dir/files with ansible-galaxy collection init --force (#78403)
* Remove collection contents when re-initializing with --force


Co-authored-by: Sviatoslav Sydorenko <wk.cvs.github@sydorenko.org.ua>
2022-08-02 11:25:49 -04:00
ce6c9befb8 Do not allow handlers from dynamic includes to be notified (#78399)
* Do not allow handlers from dynamic includes to be notified
2022-08-02 11:21:21 -04:00
f6d2b18322 Correctly get the filename from a url in fetch_file. Fixes #29680 (#78383) 2022-08-02 11:03:31 -04:00
5979f215a6 [WIP] Ansible 7 Roadmap (#78125) 2022-08-01 14:39:16 -04:00
e4890afc4e Pause module, return actual echo value (#78378) 2022-07-29 09:11:20 -04:00
b0b58fa7c2 ansible-test - Update base and default containers. (#78377) 2022-07-28 16:50:28 -07:00
234938cd76 Change the language used in the unarchive test. (#78382)
The current language pack fails to install on Ubuntu 22.04.
However, since the langauge only needs to be non-English, changing it preserves the test functionality.
2022-07-28 14:52:33 -07:00
9bf5da8f75 Fix escaped asterisk in code block demonstrating wildcards (#78375)
The code block is rendered verbatim. This currently results in `\*` being shown, which is incorrect (i.e., not parsed as a wildcard pattern).
Removing the superfluous `\` fixes the rendering.
This PR fixes all instances of this issue on that page.
2022-07-28 12:27:51 -07:00
b6ec06ab25 add note about permission change (#78128) 2022-07-28 14:45:50 -04:00
85bc2bcfcd Update information on the Intro_patterns.rst (#78192) 2022-07-28 14:27:22 -04:00
cc5c706681 Update unit test controller requirements. (#78376) 2022-07-28 10:27:05 -07:00
f5c01a8b6e Remove unit test Python 2.6 compat. (#78369) 2022-07-28 10:14:30 -07:00
3ba6348e4d Galaxy metadata docs update (PR 78280) (#78374)
Co-authored-by: Root <edroot@s1068319.srn.sandia.gov>
Co-authored-by: Emmanuel Ugwu <32464178+ugwutotheeshoes@users.noreply.github.com>
2022-07-28 12:00:17 -04:00
cb9b20311c Update playbooks_variables.rst (#78359) 2022-07-28 10:09:05 -04:00
27b4b74e52 Fix typo and style (#78365) 2022-07-28 10:05:05 -04:00
b86a18bd27 Remove unit test pytz requirement. (#78368) 2022-07-27 19:28:19 -07:00
1368bfa348 PluginLoader now installs module-to-be-imported in sys.modules before exec (as Python import does). (#78364) 2022-07-27 14:55:50 -07:00
0ef1376966 Make distro.id() report newer versions of OpenSuSE (at least >=15) also report as opensuse (#76121)
* Report OpenSuSE >= 15 as opensuse

Make distro.id() report newer versions of OpenSuSE (at least >=15) also report
as opensuse. They report themselves as opensuse-leap.

* Add a test
2022-07-28 06:21:18 +10:00
eba15885cf update Fest url per marketing (#78361) 2022-07-27 13:40:58 -04:00
0f688f07af update the out-of-date ansible-test sanity ignores (#78342) 2022-07-27 09:33:35 -07:00
a3c90dd0bc ansible-test - Fix TTY and output handling. (#78350) 2022-07-26 11:43:48 -07:00
e4087baa83 Add missing colon to a snippet in complex data doc (#78349) 2022-07-26 17:19:15 +02:00
c135a47f44 chmod aix errors with 255 is not unreachable (#78249)
* chmod aix errors with 255 is not unreachable

  fixes #78210

* added another 'aix chmod msg'
check stderr also
2022-07-26 11:13:56 -04:00
5728d72cda Fix KeyError for ansible-galaxy when caching paginated responses from v3 (#78325)
* Fix KeyError for ansible-galaxy when caching paginated responses from v3

* changelog

* generate responses in loop for test

Co-authored-by: Matt Martz <matt@sivel.net>
2022-07-22 07:18:07 +10:00
1429672213 Add pep440 version_type for version test (#78308) 2022-07-21 15:56:14 -05:00
9d4ced1237 wait_for - Read file and perform comparisons using bytes to avoid decode errors (#78317)
* wait_for - Read file and perform comparisons using bytes to avoid decode errors. Fixes #78214

* Write non-ascii via script instead of static file

* Use contexlib.closing to support py27 context manager

* Use executable from task, instead of shebang

* Update encoded bytes to utf16
2022-07-21 15:03:52 -05:00
0012263c7a ansible-test - Fix handling of args after -- (#78328) 2022-07-21 13:00:36 -07:00
399e34ddd6 Add cli docs for interacting with gpg for collection signing (#78321) 2022-07-21 13:47:23 -04:00
fd810e88d6 Fix minor typos (#78294)
Signed-off-by: Hu Shuai <hus.fnst@fujitsu.com>
2022-07-21 13:42:42 -04:00
b0a84cc9ca dnf: clarify comparison operators in docs (#78316)
Fixes #78295
2022-07-21 13:39:17 -04:00
7aada8d499 Docs: Issue 78082 Create playbook guide (#78262) 2022-07-21 11:38:17 -04:00
61af59c808 ansible-test - Update distro containers to 4.4.0. (#78322) 2022-07-20 15:38:07 -07:00
4cd3425dfe ansible-test - Update coverage to 6.4.2 (#78320) 2022-07-20 11:12:12 -07:00
b56b38b3ba Use classproperty to access field attributes of a class (#78180)
* Use classproperty to access field attributes of a class, consolidate into one class
2022-07-20 12:21:20 -04:00
884244f1b2 Python 3.9 min for controller (#77566) 2022-07-20 10:52:32 -05:00
90ef914f77 ansible-test - Drop Python 3.8 controller support. (#78237) 2022-07-19 21:32:23 -07:00
681c32ec65 Fix fetch integration test on macOS. (#78314)
The test can now run split.
2022-07-19 17:43:38 -07:00
61ea6c4a5b Fix expect integration test. (#78315)
The test can now run split on macOS.
2022-07-19 17:27:37 -07:00
27d39be580 Fix become integration test. (#78313)
* Don't set become_flags in become integration test.

Setting the flags in the test overrides the default value in the become plugins, which was not intentional.

* Remove hack for broken implicit tilde support.

It was only broken because the tests were overriding the default become flags for sudo.

* Simplify assertions.
2022-07-19 14:59:36 -07:00
619a1fa7e2 Drop custom repo from libuser install @ Alpine CI (#78305)
`group` and `setup_cron` integration tests currently install `libuser` and `faketime`
packages respectively, from the non-default edge/testing repositories. It is no
longer necessary to do so for the former so this patch drops the repo option. As
for the latter, this patch includes a note explaining when the same could be done
for it too.

This patch also adds a note on installing `faketime` on Alpine in CI.

Co-Authored-By: Matt Clay <matt@mystile.com>
2022-07-19 23:18:32 +02:00
de2163b160 Overhaul become integration tests. (#78312) 2022-07-19 14:12:33 -07:00
f3f4ad9332 ansible-test - Use sudo for all remotes. (#78310) 2022-07-19 13:38:34 -07:00
8565deaae3 ansible-test - Install acl on Alpine remotes. (#78303) 2022-07-19 12:39:03 -07:00
8bb20fe06b ansible-test - Enable ACL support on more remotes. (#78299) 2022-07-19 11:49:32 -07:00
9b42f9befe Revert "Re-enable strategy units (#78293)" (#78300)
This reverts commit c6c9d90ca4.
2022-07-19 13:23:58 -05:00
c6c9d90ca4 Re-enable strategy units (#78293) 2022-07-19 17:18:22 +02:00
5e74693215 add AnsibleFest 2022 registration banner (#78291) 2022-07-19 14:41:21 +01:00
691dde645c Update cheetsheet to fix meaning of -k (#78271) 2022-07-18 15:12:48 -04:00
ee4588abca Split integration test fixes. (#78281)
* Add setup_test_user integration target.

This integration target creates a temporary test user and removes
it when the current integration target finishes. This user is
configured with a password so it can be used with become, even
when the current user is unprivileged.

* Fix slurp integration test.

* Fix unarchive integration test.

* Fix module_utils integration test.
2022-07-18 10:19:25 -07:00
b63812bc08 ansible-test - Enable ACLs on FreeBSD remotes.
This allows integration tests to switch from one unprivileged user
to another, sharing files between the users using ACLs.
2022-07-15 16:12:39 -07:00
358a8ad7af Updated release_and_maintenance.rst (#78272) 2022-07-15 11:02:30 -04:00
d070b03ad8 Fix templating nested vars with convert_data=False (#78273)
Regression introduced in #78259.
2022-07-15 15:57:34 +02:00
9afdb7fec1 template module/lookup: fix convert_data for macros (#78259)
Fixes #78141
2022-07-14 12:14:25 -07:00
de810d5799 Deprecate use of Python crypt (#78257) 2022-07-14 12:12:23 -07:00
bc3686c784 Adding some troubleshooting detail for Kerberos connections (#78197) 2022-07-14 13:11:18 -04:00
fedd386998 Add note about package managers (#78260) 2022-07-14 13:10:24 -04:00
0590ce065c example showing how to deal with keys w/o apt_key (#78206) 2022-07-13 16:47:43 -04:00
221af7640d stat only returns pw_name/gr_name if those can be looked up (#78183) 2022-07-13 16:47:14 -04:00
c9a341902b Document choice to use Ansible Project in copyright lines (#78164)
Co-authored-by: Sviatoslav Sydorenko <wk.cvs.github@sydorenko.org.ua>
2022-07-13 16:46:04 -04:00
6ddccc1604 Adding applicable licensing requirements (#78162) 2022-07-13 16:45:19 -04:00
d635b871d1 Cleanup write_file method in uri (#76412) 2022-07-13 15:32:18 -05:00
048adac5b7 Migrate vmware.vmware_rest Dev Guide to collection (#78255) 2022-07-13 16:19:52 -04:00
b2cde3a896 Add default value for lvm_facts when lvm or lvm2 is not installed or … (#75989)
* Add default value for lvm_facts when lvm or lvm2 is not installed or there are no lvm facts
2022-07-13 12:30:13 -07:00
d58e69c82d Add support for gzip decoding responses (#41925) 2022-07-13 11:06:52 -05:00
a6e671db25 Fix AIX processor facts and add unit test (#78223)
- `processor_count` was erroneously set to the number of cores
- `processor_cores` was erroneously set to the number of threads per core
- `processor_vcpus` and `processor_threads_per_core` were not set
- `processor` was a string, while it's supposed to be a list

Before:

```
"ansible_processor": "PowerPC_POWER7",
"ansible_processor_cores": 4,
"ansible_processor_count": 12,
```

After:

```
"ansible_processor": [
    "PowerPC_POWER7"
],
"ansible_processor_cores": 12,
"ansible_processor_count": 1,
"ansible_processor_threads_per_core": 4,
"ansible_processor_vcpus": 48,
```

Also add a unit test.

Co-authored-by: Baptiste Jonglez <git@bitsofnetworks.org>
2022-07-13 14:49:36 +02:00
1f59bbf4f3 listify_lookup_plugin_terms deprecate dataloader (#78244)
* listify_lookup_plugin_terms deprecate dataloader

  deprecated useless dataloader pass to function
  also removed from callers in core


Co-authored-by: Sloane Hertel <19572925+s-hertel@users.noreply.github.com>
2022-07-12 16:10:32 -04:00
3658c26ad4 Ansible 6.1.0: Updated porting_guide_6.rst (#78245) 2022-07-12 14:59:10 -04:00
b85bcd7abf Fix module_utils_common.respawn test. (#78248)
The respawn failure can be returned on either stdout or stderr.
2022-07-12 10:04:15 -07:00
be88250a83 Update python_3_support.rst (#78239)
Fix invalid characters warning when using example group names. (Replace dashes in example group name with underscores.)
2022-07-12 17:42:09 +02:00
fff14d7c1d Decode vaulted args before sending over ansible-connection. (#78236)
I'm not aware of a way to easily get vault secrets decoded on the
ansible-connection side without sending the vault secrets over the
connection in the same way, so just decode them for transport.
2022-07-12 17:40:47 +02:00
2e4b0fefbf Added Kylin Linux Advanced Server Support (#78232) 2022-07-12 17:24:51 +02:00
75de4a37bc validate-modules - allow raw module return type (#78231) 2022-07-12 17:23:22 +02:00
2bc2153c01 yum: fix releasever for latest (#78066)
Fixes #78058
2022-07-12 12:38:47 +02:00
630616103e dnf: fix output parsing on non-English LANGUAGE systems (#78233)
Fixes #78193
2022-07-12 09:10:25 +02:00
b1dd2af4ca Preflight utf8 encodings check (#78175) 2022-07-11 09:22:27 -05:00
9950a86f73 Remove unnecessary special case in Role.load_data (#78181)
ci_complete
2022-07-11 09:19:41 +02:00
d26801e994 Fix wording for :ref|term: substitution (#78216)
* Fix workding for :ref|term: subsitution

 now matches 'seealso' and makes more sense:

  ```
  delay:
  applies_to:
  - Task
  description: Number of seconds to delay between retries. This setting is only used
    in combination with `until`.
  ```
 vs
  ```
  delay:
  applies_to:
  - Task
  description: Number of seconds to delay between retries. This setting is only used
    in combination with website for `until`.
  ```

* updated unit tests

* match see also

* more sanity
2022-07-07 12:25:52 -07:00
f6419a53f6 Ensure atomic writes for cache file (#78208)
* Ensure atomic writes for cache file

 helps avoid errors in highly concurrent environments
2022-07-07 13:50:49 -04:00
e10851d495 documentation: become plugins: correct pluralization in description (#78196)
fixes #78195
2022-07-05 11:19:39 -04:00
7ec8916097 fix ternary problem (#78186) 2022-07-01 11:06:47 -04:00
489b7f1859 Update dpkg_selections.py (#78177)
* Update dpkg_selections.py to include an syntax example showing how to remove package holds

* Fix pep8 issue: dpkg_selections.py

Missed some trailing spaces when adding example text.
2022-07-01 09:33:36 -04:00
a77fc2e822 Pr 72292- Add context to inventory plugins (#78070)
* Add context to inventory plugins documentation

* Show how to add the inventory plugin to the `enable_plugins` configuration item - not just replace it.
* Show adding tags to `keyed_groups` without specifying the separator.
* Show adding more complex `groups` and `compose` statements, including using the ternary filter.
* As I added an additional group, I've updated the resulting `ansible-inventory` output accordingly.
2022-07-01 01:49:00 -07:00
b56d73796e Clarify that sbin directories are always looked at in get_bin_path (#78171) 2022-06-30 18:24:42 -04:00
1a417e52d6 use 'command -v' instead of 'which' in Makefile (#78170)
'which' is not standardized and can even be considered problematic [1]

[1] https://lwn.net/Articles/874049/
2022-06-30 12:08:16 -07:00
17d52c8d64 Move undefined check from concat to finalize (#78165)
* Move undefined check from concat to finalize

In the classic Jinja2's Environment str() is called on the return value of the
finalize method to potentially trigger the undefined error. That is not
the case in NativeEnvironment where string conversion of the return value is
not desired. We workaround that by checking for Undefined in all of our concat
functions. It seems simpler to do it earlier in the finalize method(s) instead.
As a side-effect it fixes an undefined variable detection in imported templates.

Fixes #78156

ci_complete

* Fix sanity

* ...

* sigh
2022-06-30 12:05:39 -07:00
953a86f5a6 doc: filter: unvault: fix example (#78161)
no filter named to_string
2022-06-30 12:02:28 -07:00
84105e39f4 Update vault.rst (#78140) 2022-06-30 13:55:29 -04:00
7ec84c511f elaborate on import/include conditional example (#78138) 2022-06-30 13:51:50 -04:00
1562672bd1 Make unit test for missing git executable more generic (#78173)
* Make unit test for missing git executable more generic

* use MagicMock side_effect to raise exception instead
2022-06-30 13:19:44 -04:00
6bcb494f83 [dnf] Fix skip_broken, add test coverage (v2) (#78158)
* [dnf] Fix skip_broken, add test coverage

Change:
- skip_broken was set in config but not actually used in calls to
  base.install()
- added a lot of test cases with specialized repo
- got rid of external (docker repo) nobest test cases since the
  specialized repo works well for those too
- Slight cleanup and adding comments in dnf module

Test Plan:
- ci_complete

Tickets:
- Fixes #73072

Original-author: Rick Elrod <rick@elrod.me>

* Use a better test for checking results list

ci_complete

Signed-off-by: Rick Elrod <rick@elrod.me>

Co-authored-by: Rick Elrod <rick@elrod.me>
2022-06-30 12:16:00 -04:00
f70cc2fb7e Refactor ansible-test integration tests. (#78168)
* Relocate update-ignore.py for easier re-use.

* Add script to ease collection testing.

* Skip ignore rewrite if file does not exist.

* Add integration test for the shebang sanity test.

* Fix ansible-test-no-tty integration test.

Previously the test only verified a TTY was not used if a TTY already existed.
This prevented the test from verifying behavior when run in CI.
Now the test creates a PTY before invoking ansible-test.

* Clean up ansible-test-docker integration test.
2022-06-29 17:34:32 -07:00
bcdc2e167a Support for Python 3.11+ tomllib for inventory (#77435) 2022-06-29 11:12:47 -05:00
5797d06aec Use customized setraw to prevent output issues (#78060) 2022-06-29 10:50:33 -05:00
43153c5831 FieldAttributes as descriptors (#73908) 2022-06-29 14:39:23 +02:00
4c9385dab7 Fix documentation with misleading data type (#78157)
##### SUMMARY
The sample value given for the 'mode' parameter is shown without quotes, but the data type is string. If you actually try to use an unquoted numeric string for this value you're in for a nasty surprise! I added quotation marks to the sample value.
##### ISSUE TYPE
- Docs Pull Request

+label: docsite_pr
2022-06-28 11:25:45 -04:00
58b42abede Update README.md (#78139)
Update Python version requirement to >= 3.8.
2022-06-28 11:03:29 -04:00
a1444f390d Docs: Issue 78082 separate tips and tricks in user guide (3/3) (#78103) 2022-06-28 10:07:29 -04:00
4bd7e50612 fixed hyperlinks to galaxy.ansible for issue #78104 (#78152) 2022-06-27 15:46:44 -04:00
4594c0c609 Fix HTTP tests on FreeBSD when running split. 2022-06-24 16:55:12 -07:00
b9d13d222c ansible-test - Improve pip bootstrap download. 2022-06-24 11:36:11 -07:00
fa35aa4865 Galaxy server config updates (#77106)
* ansible-galaxy configurable timeouts

  - also fixed issues with precedence,
    so --ignore-certs now overrides config
  - made galaxy_timeout generic setting,
    if set, it becomes default for server configs,
    but now specific servers can override
  - updated tests or added notes (some tests ignore/override precedence)

Co-authored-by: Sloane Hertel <19572925+s-hertel@users.noreply.github.com>
2022-06-24 13:26:31 -04:00
e481b35e23 Delete core-ci query param from ansible-test (#78136)
Ref: https://github.com/ansible/ansible-core-ci/pull/343
2022-06-23 22:54:27 +02:00
4cfa0b07fc issue #78082 create win user guide (#78099) 2022-06-23 16:31:49 -04:00
08327c698c issue #78082 add concepts to start (#78097) 2022-06-23 16:28:02 -04:00
59f3f1b625 issue #78076 fix diagram (#78077) 2022-06-23 14:30:41 -04:00
3e3f8cb004 Update list for gather_subset (#78133) 2022-06-23 14:25:23 -04:00
ca04dc28a2 ansible-test - Remove deprecated test platforms. 2022-06-23 10:14:38 -07:00
70543402c7 update intersphinx links for Ansible 6 (#78121) 2022-06-23 10:05:10 -04:00
08b438c4ba Updated the document 'src' in URI (#78105) 2022-06-22 13:52:53 -04:00
e8a77626a3 update conf.py for Ansible 6 release (#78049) 2022-06-21 13:58:46 -04:00
34f8168afc ansible-console fixes (#78064)
* list collection task actions too
* dynamically add execute/help functions when module is found
* handle redirection and short names
2022-06-21 13:50:23 -04:00
a9ce358f98 update release page to reflect Ansible 6 release (#78047)
Co-authored-by: Iheanacho Amarachi Sharon  <58210919+Iheanacho-ai@users.noreply.github.com>
2022-06-21 13:39:22 -04:00
1b63e7d3fa docs: Update porting guide for Ansible 6.0.0 (#78101) 2022-06-21 13:34:52 -04:00
cea18bf60a password lookup argument parsing fix (#78080)
fixes #78079
2022-06-21 11:11:02 -04:00
cf9fd2d7da ansible-test - Use shlex.join where appropriate. 2022-06-17 23:01:25 -07:00
24d91f552c ansible-test - Add support for more remotes. 2022-06-17 18:56:06 -07:00
5666c6d6a3 ansible-test - More flexible become support. 2022-06-17 17:37:42 -07:00
717f178870 Add tutorial links to the docs #78073 (#78084) 2022-06-17 14:20:07 -04:00
ea351f0ae2 user - Use -n instead of -N for luseradd on all distros (#75042)
* Use -n instead of -N for luseradd on all distros

Co-authored-by: Chris James <git@etcet.net>
2022-06-17 13:16:42 -04:00
44b5314174 fix missing single quotes in sample code (#78056) 2022-06-17 09:12:53 +05:30
c321e3baad update documentation of 'unarchive' (#77643) 2022-06-16 14:34:04 -04:00
5b90601ca4 Document debconf interaction with dpkg-reconfigure (#74196)
Signed-off-by: David Greaves <david@dgreaves.com>
2022-06-16 13:47:56 -04:00
66c0882314 reword the regex note (#75393)
Co-authored-by: Matt Martz <matt@sivel.net>
Co-authored-by: Brian Scholer <1260690+briantist@users.noreply.github.com>
2022-06-16 13:33:09 -04:00
3cd2c494bd issue #72449 winrm script rm (#77931) 2022-06-16 13:30:31 -04:00
681dc6eab9 Windows - incorrect python-devel package in WinRM docs (#78037)
Co-authored-by: Emanuele Barbato <manu@Giuseppes-MacBook-Air.local>
2022-06-16 13:29:03 -04:00
3a5a61b783 hide distro map since it is not configurable (#78068)
make it a private setting for internal use and avoid
 user confusion by not displaying it with normal configuration options
2022-06-16 13:03:52 -04:00
18992b7947 Add new loop_control.extended_allitems option (#75760)
* Add new `loop_control.extended_allitems` option. Fixes #75216

* Add test for extended_allitems

* docs code block fix
2022-06-16 08:56:13 -05:00
a90f666ab3 Use ctypes to access shadow, instead of spwd which is deprecated (#78050)
* Use ctypes to access shadow, instead of spwd which is deprecated

* Remove sanity ignore

* cast to str to satisfy mypy

* Add typing.cast polyfill

* Appease mypy redefine

* Add clog frag
2022-06-16 08:55:52 -05:00
d81a519f25 Remove .travis.yml files from galaxy init skeletons (#75740)
* Remove .travis.yml files from galaxy init skeletons

These files have existed for many years but in light of the recent
circumstances around Travis, we should not include them by default in
the galaxy init skeletons.

* Add breaking_changes changelog fragment with recommendation to use a custom skeleton if the .travis.yml file is still needed.

Co-authored-by: s-hertel <19572925+s-hertel@users.noreply.github.com>
2022-06-15 13:23:24 -04:00
46d86a882d Docsite: update links to community docs (#78043) 2022-06-15 10:14:41 -04:00
f4ad1c771e Create reusable role layout snippet for documentation (#78057)
* reuse role structure
* reuse role snippet in role docs
2022-06-15 06:08:27 -07:00
30a923fb5c Fix 'Permission denied' in user module while generating SSH keys (#78040)
* Fix 'Permission denied' in user module while generating SSH keys

Fix #78017
Use try/except for spwd usage to prevent "Permission denied".

Signed-off-by: Sagi Shnaidman <sshnaidm@redhat.com>
Co-authored-by: Abhijeet Kasurde <akasurde@redhat.com>
2022-06-14 11:19:23 -04:00
95df5cb740 Fix invalid-ansiblemodule-schema sanity errors.
The validate-modules sanity test expects a list not a dict_keys iterable.
2022-06-13 14:58:40 -07:00
561cf1956d Docsite: Updated style guide resources (#78048) 2022-06-13 15:06:08 -04:00
3fa377387e shell plugins give out user friendly type error (#77983)
shell plugins give out user friendly type error
# TODO: this should really have been taken care of via config or fieldattribute validation
2022-06-10 12:55:43 -04:00
1321d6ecd5 Update AZP test container to 3.0.0.
ci_coverage
ci_complete
2022-06-09 14:57:15 -07:00
614dc10ef0 With antsibull-changelog >= 0.14.0 and the sidecar docs feature, test and filter plugins are detected if they have version_added (#77871)
Co-authored-by: Brian Scholer <1260690+briantist@users.noreply.github.com>
2022-06-09 14:18:48 -04:00
556ac89664 Rephrase-community (#77985) 2022-06-09 14:08:05 -04:00
fa840d4c7c mention different results for password_hash depending on library used (#76863) (#77963) 2022-06-09 10:53:04 -04:00
85329beb90 update backport instructions to reflect stable-2.13 (#77958)
Co-authored-by: Divine Odazie <dodazie@gmail.com>
2022-06-09 10:49:44 -04:00
04c7abcbfe corrected version_added for new config option (#78013)
new option, not subs should have version, also it's 2.14
2022-06-09 09:12:27 -04:00
2f0530396b ansible-test - Clean up type hints and comments. 2022-06-08 23:31:58 -07:00
05fc96c927 facts: Add uptime fact for NetBSD (#75431)
* facts: Add uptime fact for NetBSD

This is copied from the current OpenBSD facts code.

Tested on the GCC compile farm: https://cfarm.tetaneutral.net/

* Added changelog fragment

Co-authored-by: Baptiste Jonglez <git@bitsofnetworks.org>
Co-authored-by: Jordan Borean <jborean93@gmail.com>
2022-06-09 06:45:39 +10:00
1b1c2c79cf Add configurable option for paramiko banner_ssh timeout (#68184)
* Add configurable option for paramiko banner_ssh timeout

This PR adds a configurable option for paramiko connection
to control the value of banner timeout in paramiko library.
The banner timeout value can be set in ansible.cfg file as
The default value of banner timeout is set to 30 seconds in
paramiko connection plugin.
```
[paramiko_connection]
banner_timeout = 30
```
or using enviornment variable
```
export ANSIBLE_PARAMIKO_BANNER_TIMEOUT=30
```

* Fix CI failure

* Fix review comments

* Fix review comment
2022-06-09 06:01:34 +10:00
570379ef98 Do not crash callbacks if exception is not a string. (#77781) 2022-06-09 05:58:55 +10:00
5f5c4ef2ef Remove incidental_inventory_foreman test. 2022-06-08 12:08:54 -07:00
a4e4413cde ansible-test - Update distro containers to 4.3.0.
The primary change in this update is removal of `/etc/ansible/hosts` from the containers.
2022-06-08 12:08:34 -07:00
5b3557f8ba ansible-test - Allow docstring in docs-only module 2022-06-08 10:41:01 -07:00
6e78425f8d fix pip module resolution (#78000)
* `importlib.util` appears to be lazily imported and is sometimes unavailable as an attribute of `importlib` without an explicit import
2022-06-08 09:56:17 -07:00
db335498d0 ansible-galaxy - ensure variable is defined for any error when getting the ansible-core distribution (#77993) 2022-06-08 12:05:17 -04:00
c2b36ba04d ansible-test - Update base and default containers. 2022-06-07 15:26:57 -07:00
23914d3f0b ansible-test - Adjust unit test mock usage. (#77961) 2022-06-07 14:42:31 -07:00
5a0b230e24 Make fuzzy plugin matching deterministic. 2022-06-07 14:38:25 -07:00
e059dde9fb Add missing inventory cache test (#77990)
Fix intentional coverage to replace incidental_inventory_foreman

ci_complete
ci_coverage
2022-06-07 17:12:04 -04:00
9d6cc7b576 unarchive - fall back to unzip -Z if zipinfo is not available (#76971)
Add a new handler class ZipZArchive to use unzip -Z as an alternative to zipinfo

Run 'unzip -Z' in can_handle_archive so we fall back to the next handler if it's not available (failing in is_unarchived is too late)

* Add a test for unzip -Z when zipinfo is not available

* Update test for missing binary altogether by removing /usr/bin from the PATH
2022-06-07 16:05:07 -04:00
a43112290a fix ansible-galaxy-collection test with revoked key (#77989)
* Remove unnecessary gpg passphrase
2022-06-07 15:39:33 -04:00
ca9be6e27e Fix docs links for the steering committee (#77974) 2022-06-07 15:04:11 -04:00
a30500144e docs: Update porting guide for ansible 6.0.0rc1 (#77991) 2022-06-07 14:37:27 -04:00
e89176caac Pin PyYAML version compatible with Python 3.8+ (#77936)
Co-authored-by: Brian Coca <bcoca@users.noreply.github.com>
Co-authored-by: Matt Clay <matt@mystile.com>
2022-06-07 12:26:56 -04:00
f9d4c26143 docs: Update porting guide for ansible 5.9.0 (#77982) 2022-06-07 12:01:40 -04:00
5e369604e1 Forked display via queue (#77056)
* Forked Display via queue

* Docs and simple code cleanup

* Only proxy Display.display

* Remove unused import

* comment

* Update deadlock comment, remove py3 check

* Don't flush display, and don't lock from forks

* clog frag

* ci_complete ci_coverage

* Add units for queue proxying

* Cleanup flush

* ci_complete

* Only lock the write, switch to RLock

* Remove unused import
2022-06-07 08:31:56 -07:00
0fae2383da Add macOS fork issue to FAQ (#77965)
* Add macOS fork issue to FAQ

* Remove colon from error msg
2022-06-07 11:07:59 -04:00
143e7fb45e ansible-galaxy - support resolvelib versions >= 0.5.3, < 0.9.0 (#77649)
* ansible-galaxy - support resolvelib versions >= 0.5.3, <= 0.8.1

Test incompatibilities are removed for resolvelib >= 0.6.0

Test against the latest 0.8.x version and fix requirements

* Fix tests - use a venv for testing the range of resolvelib versions

* Update temporary hardcoded fallback for ansible-test

* Update hardcoded upperbound for sanity tests

* Make error check more flexible
2022-06-07 09:49:43 -04:00
df765c0ecf ansible-test - Update Alpine, openSUSE containers 2022-06-06 19:55:49 -07:00
fe2d8b7066 Skip libuser tests on openSUSE 15.4+
The libuser package is not available.
2022-06-06 16:29:41 -07:00
e31e918e04 Don't install lgroupadd for SUSE tests.
It's not used by the tests and is not available as of openSUSE 15.4.
2022-06-06 15:48:40 -07:00
89c6547892 preserve add_host/group_by on refresh (#77944)
* preserve add_host/group_by on meta: refresh_inventory

Co-authored-by: Jordan Borean <jborean93@gmail.com>
2022-06-06 18:08:43 -04:00
52c8613a04 ansible-test - Skip mypy runs under Python 3.11. 2022-06-06 14:03:33 -07:00
11b6032e73 ansible-test - Ignore vendored code in mypy test. 2022-06-06 13:32:49 -07:00
6c6a7851ed Add inventory cache integration tests (#77895)
* Add intentional coverage for incidental_inventory_foreman coverage cache tests

ci_complete
ci_coverage
2022-06-06 16:03:13 -04:00
5391150b30 Integration tests for invalid group name. 2022-06-06 12:16:47 -07:00
0ff1ba3e12 Move AWS guidelines to collection (#77959) 2022-06-06 14:00:39 -04:00
1706d35fc4 ansible-galaxy-collection - use --pinentry-mode loopback for gpg key revocation (#77967) 2022-06-03 16:50:29 -04:00
39b3581316 Deprecate non lists lookups (#77875) 2022-06-03 12:42:54 +02:00
a01815f3ce added note to omit -t all (#77956) 2022-06-03 05:19:45 +10:00
c908d782fb get_url - permit to have a checksum only file (#77948)
checksum can also accept a checksum only file (no filename beside the checksum).
fixes #54390

Co-authored-by: Baptiste Mille-Mathias <baptiste.millemathias@gmail.com>
2022-06-03 05:19:02 +10:00
e589eba506 Docs: change community collection inclusion process (#77905) 2022-06-02 12:25:08 -04:00
16e0d4a121 fix: update button text to "Load token" (#77925) 2022-06-02 12:23:34 -04:00
15750aec52 ssh retry docs addition (#77930) 2022-06-02 12:21:40 -04:00
f270b4e224 Fix items2dict errors for incorrect list item type and missing keys (#77946)
* Fix items2dict errors for incorrect list item type and missing keys

* keep dict comprehension
2022-06-02 10:49:29 -04:00
89e4fb71e6 Issue #77681 revamp getting started guide (#77897) 2022-06-02 10:28:11 -04:00
058a69e6b0 Properly send a skipped message for empty templated loop (#77945)
Fixes #77934
2022-06-02 10:18:45 -04:00
81351022d8 ansible-test - Prefer unittest.mock for core. 2022-06-01 16:48:00 -07:00
f933314101 ansible-test - Fix shell target options handling. 2022-06-01 12:49:51 -07:00
86779cc903 ansible-test - Code cleanup.
This helps prepare for a future pylint upgrade.
2022-06-01 11:45:41 -07:00
b69eb28ed2 Migrate community.vmware Dev Guide to collection (#77723) 2022-06-01 12:23:10 -04:00
9767cda507 Make ignore_unreachable to count ignored counter
Fixes #77690
2022-06-01 16:10:59 +02:00
e6075109d0 Remove incidental_inventory_aws_ec2 and supporting plugins (#77877)
* Remove aws/2.7 and aws/3.6 from incidental test matrix entries

* Remove aws.sh symlink
2022-05-31 14:30:17 -04:00
bd849b3076 Fix ansible-runner integration tests. 2022-05-31 10:53:11 -07:00
f3c684564c Remove platform dev guides from core docs (#77915) 2022-05-31 13:35:16 -04:00
33beeace10 Fix lusermod using a group name and not id (#61965) (#77914)
* Fix lusermod using a group name and not id (#61965)
2022-05-31 13:07:06 -04:00
9f7956ba30 docs: add missing notes in porting guide for 6.0.0b1 (#77926)
There was an issue with the changelog in community.network 4.0.0, it's
been fixed in 4.0.1 and now properly included.
2022-05-27 12:52:23 -04:00
7c89562580 docs: update porting guide for ansible 6.0.0b1 (#77913) 2022-05-27 11:12:17 -04:00
e259317c3e Remove incidental_inventory_docker_swarm tests. (#77924)
ci_complete
ci_coverage
2022-05-26 17:55:19 -07:00
1214b63f4f Fix 'ansible-config dump --only-changed -t all' verbosity (#77898)
* Fix 'ansible-config dump --only-changed -t all' to only display headers if plugin options are changed

* changelog

* add a test
2022-05-26 12:03:29 -07:00
43d650f924 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>
2022-05-26 11:44:27 -07:00
dbbeea0686 more context on multiple facts modules (#77896) 2022-05-26 14:11:04 -04:00
45d930e9c1 Point to Kerberos as a safer winrm setup method (#77794) 2022-05-26 14:10:26 -04:00
74469bf54a [docs]Mention that global variables are not mapped to hostvars (#77783) 2022-05-26 14:06:25 -04:00
a99623bce1 add anchors for crossreferencing (#77800) 2022-05-26 13:55:34 -04:00
711b51fad6 Remove double spaces in errormessage (#77839) 2022-05-26 13:55:02 -04:00
9010f0fbe3 doc: Clarify stride/increment in inventory intro (#77893) 2022-05-26 13:40:50 -04:00
a2eb472fb6 Remove statement about dependencies and includes. Fixes #75055 (#77912) 2022-05-26 13:38:32 -04:00
289cba333b ansible-test - More multi-arch containers. 2022-05-25 14:55:17 -07:00
74eb8b779d Blockinfile multiline search (#75090) 2022-05-25 15:39:12 -05:00
813afcbbb4 swallow all exceptions in type annotation support shim imports (#77860)
* swallow all exceptions in type annotation support shim imports

* add changelog
2022-05-25 14:41:06 -05:00
e7e1d592a6 Incidental coverage 1 (#77846)
* Add find test to assert patterns with regex

* Add test to assert that nested includes with relative path work

* Add test to assert symmetric_difference supports unhashable types

* ci_complete ci_coverage

* Add test to assert JSON values are converted to Python

* Add test to assert how unexpected module failures behave

* Add test to verify remote_is_local

* ci_complete ci_coverage

* Get real path of local tmp

* ci_complete ci_coverage

* Expanded symmetric_difference tests

* ci_complete ci_coverage

* I don't even know

* ci_complete ci_coverage

* Revert mathstuff changes

* ci_complete ci_coverage
2022-05-25 13:57:31 -05:00
f7d7604454 Add uri, urn and url test plugins (#77423)
and docs!

Co-authored-by: Tabah Baridule <dulemartins07@gmail.com>
Co-authored-by: Felix Fontein <felix@fontein.de>
2022-05-25 10:33:49 -04:00
e4c0bbf885 apt: fix virtual package install version detection (#76781)
* apt: fix virtual package install version detection

Change 4a62c4e3e4 introduced version
matching in installation.

The problem stems from

 if version_installable or version:
     pkg_list.append("'%s=%s'" % (name, version_installable or version))

When the package is a virtual-package, package_status() is returning
the "version_installable" of the package *satisfying* the
virtual-package; but then this is trying to install the
virtual-package with this version pin.

For example, "yaml-mode" is a virtual package satisifed by
"elpa-yaml-mode" (currently 0.0.14-1) and trying to install it fails
with

 $ usr/bin/apt-get -y ... install 'yaml-mode=0.0.14-1'
 ... failed: E: Version '0.0.14-1' for 'yaml-mode' was not found ...

In the case of a virtual-package with nothing installed to satisfy it,
we should just return blank values to allow apt-get to do it's thing.

The tests are updated to install and remove this package.

Fixes: #76779
2022-05-25 10:26:02 -04:00
6fbc8bd2bc Fix boolean condition so that ansible-galaxy collection install works when a valid resolvelib is installed. (#77906) 2022-05-25 08:37:51 -04:00
82f3a57bee Fix ansible-galaxy traceback when unexpected version of resolvelib is installed (#77630)
* Fix traceback when a supported version of resolvelib is not installed

Try to read the supported version range from the package distribution info and fall back to a hardcoded lowerbound/upperbound (>=0.5.3,<0.6.0).

* Add tests for unsupported resolvelib versions

* Resolve remaining import sanity test issues.

Co-authored-by: Matt Clay <matt@mystile.com>
Co-authored-by: Matt Martz <matt@sivel.net>
2022-05-24 15:35:55 -04:00
621e782ed0 Add toggle to fix module_defaults with module-as-redirected-action on a per-module basis (#77265)
* If there is a platform specific handler, prefer the resolved module over the resolved action when loading module_defaults

Add a toggle for action plugins to prefer the resolved module when loading module_defaults

Allow moving away from modules intercepted as actions pattern

Fixes #77059
2022-05-24 13:38:46 -04:00
eecbaee7f4 Fix windows connection options (#77844)
* winrm, psrps added missing var entry

 this handles issue with the default being set to inventory_hostname
 but defaults not being templated implicitly

 fixes #77841
2022-05-24 09:11:35 -04:00
2595b42aca Prefer unittest.mock over mock. (#77886) 2022-05-23 12:00:10 -07:00
3a9a23fb1a Use unittest.mock instead of mock. (#77883)
This can only be done for controller tests.
2022-05-23 11:04:56 -07:00
1eb7f71f0e Replace incidental_inventory_aws_ec2 with intentional coverage (#77743)
* Add intentional test coverage for lib/ansible/plugins/inventory/__init__.py

* Add intentional (integration) test coverage for lib/ansible/module_utils/common/network.py

* Add ansible_release info test from https://github.com/ansible/ansible/pull/74673

ci_complete
ci_coverage

Co-authored-by: Rick Elrod <rick@elrod.me>
2022-05-23 09:40:16 -04:00
0f882d010f Supply 'dev' keyword for linux network facts discovery (#77793)
This avoids incorrect results when the device name conflicts with
another 'ip' keyword. For example, if the device name is 'primary'.

Closes #77792
2022-05-23 08:58:31 +02:00
400475acc0 validate meta/main.yml dependencies and meta/requirements.yml are both lists before concatenating them together (#77821) 2022-05-19 12:04:30 -07:00
e85e8ee00a set theory filter docs (#77801)
Co-authored-by: flowerysong <junk+github@flowerysong.com>
2022-05-19 14:42:15 -04:00
c83419627a apt_repository add falalback to deprecated apt-key usage (#77340)
New path uses gpg directly and the stated directories and keystores to use by debian docs

Co-authored-by: Matt Clay <matt@mystile.com>
2022-05-19 10:21:47 -04:00
a985021286 Switch CI from FreeBSD 13.0 to 13.1. (#77852) 2022-05-18 22:51:20 -07:00
13d03c3c22 ansible-test - Add RHEL 9 / FreeBSD 13.1 remotes. (#77851) 2022-05-18 18:24:18 -07:00
3d2c2e60aa ansible-test - Update distro containers. (#77847)
* ansible-test - Add a Ubuntu 22.04 container.
* ansible-test - Add a Fedora 36 container.
* ansible-test - Update distro containers.
* Fix dnf test on Fedora 36.
* Work around scp test issues.
2022-05-18 14:59:01 -07:00
ef3ea4cdc3 Incidental docker chip away (#77830)
* Add new templating target, test splitter

* Add test for host:port parsing in parse_address via add_host

* Test already notified listening handler

* Add test for gathering bridge network facts

* Add veth to bridge

* ci_complete ci_coverage
2022-05-18 14:34:49 -05:00
76ead1e768 ansible-test - Fix remote args restriction.
The platform-specific and global fallbacks were not working with the `--remote` option.

This regression was introduced by https://github.com/ansible/ansible/pull/77711
2022-05-18 12:19:07 -07:00
a415697d70 Allow result sha to be overriden with local sha (#77832) 2022-05-18 13:19:11 -05:00
66e92a3aff docs: Update porting guide for ansible 6.0.0a3 (#77842) 2022-05-18 14:03:44 -04:00
059204b871 docs: Update porting guide for ansible 5.8.0 (#77843) 2022-05-18 14:03:00 -04:00
185340e667 ansible-test - Update default containers.
These containers include Python 3.11 sanity test environments.
2022-05-18 01:28:26 -07:00
dfde4be444 Add Python 3.11 support.
ci_complete
ci_coverage
2022-05-17 23:52:47 -07:00
8ca28acd0d Fix unit tests for Python 3.11. 2022-05-17 23:32:35 -07:00
5f74350fd5 Avoid deprecated method in unit tests. 2022-05-17 23:02:13 -07:00
9600e3064a ansible-test - Improve requirements handling. (#77825)
The requirements for virtualenv and coverage are now kept in a requirements file for easier container builds.

The test-constraints sanity test has been updated to make sure the requirements file is kept up-to-date.
2022-05-17 11:11:58 -07:00
fecc78b5fb remove extra validate-modules ignore entry (#77826) 2022-05-17 13:45:47 -04:00
201aba3d0f Update PSF-license.txt to version from CPython 3.9.5. (#77805) 2022-05-17 11:46:36 -05:00
4706091a38 rename systemd module to services only (#77644)
* rename systemd module to services only

 disambiguates what it handles since systemd is now much more
 that a service manager, but the module is specific to services
2022-05-17 12:32:11 -04:00
c9ce7d08a2 template/__init__.py - fix KeyError when wantlist=False with non-list 2022-05-17 18:24:53 +02:00
5e50284693 Restrict role loading .. to role ... (#77683)
* Ansible will now error out if you try to use the `*_from` to load files from outside the role being loaded by `{import,include}_role`
2022-05-17 11:41:47 -04:00
290fb5e0ca ansible-test - Upgrade to coverage 6.3.3. (#77817) 2022-05-17 08:31:50 -07:00
e9af6efee6 Raise a proper error when include/import_role is used as a handler (#77807) 2022-05-17 17:25:18 +02:00
f6ac2b4f93 Update config dumping info to include 'all info' (#77802) 2022-05-17 17:19:56 +02:00
1e3cf9f732 ansible-test - Make distro containers multi-arch. (#77814) 2022-05-16 18:21:08 -07:00
cb448097e4 Minor typo fix (#77804) 2022-05-16 17:54:43 +05:30
0d6aa2e87e More information on doc parsing errors (#77685)
* More information on doc parsing errors

  fixes #77675
2022-05-13 12:18:31 -04:00
f5642cea28 update version switcher to include 2.13 (#77786) 2022-05-13 05:01:19 -07:00
f75bb09a8b Update url to quickstart video. (#77779) 2022-05-12 10:34:45 -04:00
654fff05e6 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>
2022-05-12 01:25:14 -07:00
524d30b8b0 distribution: add distribution_minor_version for Debian Distro (#74721)
* Added a fact about minor version details for Debian Distro

Fixes: #74481

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2022-05-11 17:21:47 -04:00
6230244537 core-2.13 - update release table (#77780) 2022-05-11 16:52:31 -04:00
46d2c9a988 document some 'dir' based filters (#77687)
Co-authored-by: flowerysong <junk+github@flowerysong.com>
Co-authored-by: Emmanuel Ugwu <32464178+ugwutotheeshoes@users.noreply.github.com>
2022-05-11 14:51:11 -04:00
449d82a521 ansible-test - Add RHEL 8.6 support. 2022-05-11 11:19:45 -07:00
8e91403412 revamp basic concepts docs (#77748) 2022-05-11 14:12:25 -04:00
836683a082 Stop making core docs build talk of (ansible-)'base' when meaning (ansible-)'core'. (#77728) 2022-05-11 14:04:43 -04:00
235f2598b1 docs: Update ansible-core release date in Ansible roadmap (#77775) 2022-05-11 13:51:36 -04:00
75bc630565 2.13 GA has been bumped up a week to release on May 16 (#77772) 2022-05-10 14:53:18 -05:00
9923e92d97 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>
2022-05-10 11:22:24 -04:00
97e574fe6e Docsite/communication.rst: fix formatting (#77760) 2022-05-09 13:55:30 -04:00
5e22fe21fd stub out ovirt dev guide with pointer to new location (#77751) 2022-05-09 02:38:38 -07:00
42086c14a3 Updated the playbook section in this docs (#77747) 2022-05-06 11:30:42 -04:00
18fe5a8835 Updated text in ini.py (#77746) 2022-05-06 10:00:22 -04:00
d352f2ec21 core branch descriptions (#76152) 2022-05-05 14:49:12 -04:00
0cfc291573 docs: update porting guide for ansible 6.0.0a2 (#77736) 2022-05-05 14:15:14 -04:00
fe349a1ccd ansible-test - Enhance the shell command. (#77734)
* ansible-test - Add shell --export option.

* ansible-test - Support cmd args for shell command.

Also allow shell to be used without a valid layout if no delegation is required.

* ansible-test - Improve stderr/stdout consistency.

By default all output goes to stdout only, with the exception of a fatal error.

When using any of the following, all output defaults to stderr instead:

* sanity with the `--lint` option -- sanity messages to stdout
* coverage analyze -- output to stdout if the output file is `/dev/stdout`
* shell -- shell output to stdout

This fixes issues two main issues:

* Unpredictable output order when using both info and error/warning messages.
* Mixing of lint/command/shell output with bootstrapping messages on stdout.

* ansible-test - Add changelog fragment.
2022-05-05 09:09:57 -07:00
52bd59c481 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
2022-05-05 08:44:57 -07:00
255745b3e6 simplify developing modules (#77647) 2022-05-05 10:35:05 -04:00
dd094a4413 Mention admin requirement for runas become (#77722) 2022-05-05 10:16:37 -04:00
fbc5b3f9c5 fix copy test for split controller/remote 2022-05-04 10:22:36 -07:00
3f4cacd355 Remove MacOSX-specific cleanup for unarchive test 2022-05-04 10:21:39 -07:00
5753fd2d8d docs: announce the PG working group (#77732) 2022-05-04 16:58:42 +01:00
ef2fe6823c 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>
2022-05-04 11:11:10 -04:00
cc5ac88c4c Update mypy test. Fix type hints for Python 3.9.
This also bumps the minimum controller version (for mypy only) to Python 3.9.
2022-05-03 18:55:39 -07:00
7471c036ec shift to ansible_core_version 2022-05-03 10:53:18 -07:00
a1ddb83fc1 Docsite: move a stepped down steering committee member to past members (#77715) 2022-05-03 09:54:36 +01:00
2cc74b04c4 ansible-test - Add multi-arch remote support. 2022-04-29 18:20:14 -07:00
de5d6820f8 ansible-test - Remove obsolete code. 2022-04-29 13:27:37 -07:00
a115a7fce2 Install acl on Ubuntu for copy integration test. 2022-04-29 13:27:18 -07:00
e2200e8dfc ansible-test - Fix remote completion validation. 2022-04-29 13:27:01 -07:00
4ff10fcd31 fix SELinux facts tests
* make the pre-flight sniffing more robust to different failure conditions (was failing on Ubuntu 22.04 VMs)
* remove skip aliases (the test needs to function everywhere to assert that the selinux facts bits behave properly when it's N/A)
2022-04-29 11:36:14 -07:00
6513453310 ansible-test - Add support for remote Ubuntu VMs. 2022-04-29 10:38:38 -07:00
dcda1e7239 Trim message in split integration test. 2022-04-29 10:21:11 -07:00
dbdbfe845a Remove deprecated subclassing DefaultCallback without doc_fragment (#77677) 2022-04-29 09:32:13 +02:00
a12e0a0e87 ansible-config added json/yaml output to list/dump (#77447)
fixes #733644
2022-04-28 19:58:58 -04:00
a3cc6a581e dont rely on path to set config defs for plugins (#77659) 2022-04-28 12:14:33 -07:00
fb2f080b42 document base64 filters (#77657)
* document base64 filters

* Update lib/ansible/plugins/filter/b64decode.yml

Co-authored-by: Sandra McCann <samccann@redhat.com>

* Update lib/ansible/plugins/filter/b64encode.yml

Co-authored-by: Sandra McCann <samccann@redhat.com>

Co-authored-by: Sandra McCann <samccann@redhat.com>
2022-04-28 12:12:29 -07:00
ec00c9c64e Deprecate FACT_PATH/GATHER_SUBSET/GATHER_TIMEOUT defaults (#77656) 2022-04-28 12:09:49 -07:00
ed30fc9a06 Remove deprecated loading cache plugins directly without cache_loader (#77655) 2022-04-28 12:08:20 -07:00
572bc1354a Fix lazy eval version in integration tests 2022-04-28 12:07:22 -07:00
749a105956 ansible-doc stay 3.8 python compatible (#77682)
pathlib with_stem will wait till 3.9
  also add tests by listing filters
2022-04-28 14:57:34 -04:00
c71faec595 typo in doc (#77672) 2022-04-28 14:31:43 -04:00
f633b62cbc clarify latest release (#77577)
* clarify latest release
* fix tables
2022-04-28 06:12:49 -07:00
f7c2b1986c Require blocking IO for ansible CLI. 2022-04-27 16:28:06 -07:00
cc872a57f2 Reduce output from ansible-doc integration test.
This removes about 20K lines of output which are not evaluated as part of the test.
2022-04-27 15:11:18 -07:00
5c2d830dea ansible-test - Fix subprocess management. (#77641)
* Run code-smell sanity tests in UTF-8 Mode.
* Update subprocess use in sanity test programs.
* Use raw_command instead of run_command with always=True set.
* Add more capture=True usage.
* Don't expose stdin to subprocesses.
* Capture more output. Warn on retry.
* Add more captures.
* Capture coverage cli output.
* Capture windows and network host checks.
* Be explicit about interactive usage.
* Use a shell for non-captured, non-interactive subprocesses.
* Add integration test to assert no TTY.
* Add unit test to assert no TTY.
* Require blocking stdin/stdout/stderr.
* Use subprocess.run in ansible-core sanity tests.
* Remove unused arg.
* Be explicit with subprocess.run check=False.
* Add changelog.
* Use a Python subprocess instead of a shell.
* Use InternalError instead of Exception.
* Require capture argument.
* Check for invalid raw_command arguments.
* Removed pointless communicate=True usage.
* Relocate stdout w/o capture check.
* Use threads instead of a subprocess for IO.
2022-04-27 14:07:15 -07:00
f6fb402d1f Update guide_vultr.rst (#77665) 2022-04-27 16:27:03 -04:00
cf5f0690f0 Typo fix (#77648) 2022-04-27 16:24:43 -04:00
b439e41a91 expand ansible-doc coverage (#74963)
* Expand ansible-doc to tests/filters and fix existing issues

  enable filter/test docs if in single file or companion yaml
  add docs for several filters/tests plugins
  allow .yml companion for docs for other plugins, must be colocated
  verify plugins are valid (not modules, cannot)
  fix 'per collection' filtering
  limit old style deprecation (_ prefix) to builtin/legacy
  start move to pathlib for saner path handling
  moved some funcitons, kept backwards compat shims with deprecation notice

  Co-authored-by: Abhijeet Kasurde <akasurde@redhat.com>
  Co-authored-by: Felix Fontein <felix@fontein.de>
  Co-authored-by: Sandra McCann <samccann@redhat.com>
2022-04-27 09:46:52 -04:00
a65fbfad5b 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
2022-04-27 02:05:05 -07:00
d321fa3f15 remove import_play examples from include module (#77597) 2022-04-26 14:23:24 -04:00
709ae7c050 docs: Update porting guide for ansible 5.7.0 (#77646) 2022-04-26 14:06:26 -04:00
af9f628ab5 Add python path to version output (#77631)
To further disambiguate 'which' python is the correct python
2022-04-26 11:44:29 -04:00
3980eb8c09 Prevent losing unsafe from lookups (#77609)
* 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
2022-04-26 11:16:22 -04:00
6fdec4a6ab Revert "Require blocking IO for ansible CLI. (#77639)"
This reverts commit e2d54d3594.
2022-04-25 15:48:01 -07:00
26fd5a8c3a Revert "ansible-test - Fix subprocess management. (#77638)"
This reverts commit 62d03c8e75.
2022-04-25 15:38:35 -07:00
e2d54d3594 Require blocking IO for ansible CLI. (#77639) 2022-04-25 15:29:56 -07:00
62d03c8e75 ansible-test - Fix subprocess management. (#77638)
* Run code-smell sanity tests in UTF-8 Mode.
* Update subprocess use in sanity test programs.
* Use raw_command instead of run_command with always=True set.
* Add more capture=True usage.
* Don't expose stdin to subprocesses.
* Capture more output. Warn on retry.
* Add more captures.
* Capture coverage cli output.
* Capture windows and network host checks.
* Be explicit about interactive usage.
* Use a shell for non-captured, non-interactive subprocesses.
* Add integration test to assert no TTY.
* Add unit test to assert no TTY.
* Require blocking stdin/stdout/stderr.
* Use subprocess.run in ansible-core sanity tests.
* Remove unused arg.
* Be explicit with subprocess.run check=False.
* Add changelog.
2022-04-25 12:39:09 -07:00
b8793fa48d Fix use of deprecated antsibull-docs option. 2022-04-25 12:21:09 -07:00
1802684c7b add link to deprecation warning (#77599)
* add link to deprecation warning

(cherry picked from commit f991470dd0)
2022-04-25 11:44:31 -04:00
578a815271 Fix issue probably-meant-fstring found at https://codereview.doctor (#77619) 2022-04-25 09:37:23 -04:00
841bdb74eb Replace antsibull with antsibull-docs (#77504) 2022-04-22 09:33:32 -04:00
d06d99cbb6 git fix docs and wrapper script (#77588)
* 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
2022-04-21 15:44:42 -05:00
1b947eaf92 arg_spec - Return aliases in validation result and update aliases (#77576)
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.
2022-04-21 15:06:31 -04:00
096393a221 add select distro installs to docs (#77567) 2022-04-21 13:58:34 -04:00
494f932773 Deprecate PlayContext.verbosity (#77507)
display.verbosity should be used instead
2022-04-21 10:26:08 -04:00
2c2a204dc6 varaiblemanager, more efficienet vars file reads (#77570) 2022-04-21 08:24:59 -05:00
3cbfee7852 community_steering_committee.rst: add new member (#77589) 2022-04-21 09:22:44 +01:00
b960641759 ansible-test - Support multiple coverage versions.
ci_complete
ci_coverage
2022-04-19 23:15:38 -07:00
4d69c09695 ansible-galaxy collection - ensure dependencies are a dict (#77561)
* fix traceback when installing collection with dependencies set to None
2022-04-19 15:54:45 -04:00
4faa576ee9 Add a test and changelog for non-string host names in yaml inventory files (#77569) 2022-04-19 15:17:36 -04:00
9280396e19 Fix error message for non-str hosts in yaml inventory (#77544) 2022-04-19 11:06:59 -04:00
abdd237de7 Yolo (#77554)
* Revert "Revert "Config, ensure templating happens at functions (#77483)""

This reverts commit 94c9106153.

* removed update configdata, which is unused
* removed test for action we don't perform anymore
* removed unused configdata
2022-04-18 15:57:00 -04:00
191d9a771a ansible-test - Remove more Python 2.7 support. 2022-04-18 11:57:50 -07:00
3b0d74c145 Add contributor path page (#77494)
Co-authored-by: Emmanuel Ugwu <32464178+ugwutotheeshoes@users.noreply.github.com>
2022-04-18 11:36:10 -04:00
0c1cb0e9d4 Fix a broken link and some grammatical errors (#77531) 2022-04-18 11:18:30 -04:00
94c9106153 Revert "Config, ensure templating happens at functions (#77483)"
This reverts commit 6e5f1d781d.
2022-04-14 19:13:49 -07:00
789d29e895 Update docs to recommend the TTY for prompts over stderr (#77533) 2022-04-14 15:29:30 -04:00
762d97f1b8 setup: remove 'any' as seemingly valid option (#77532)
fixes #59783
2022-04-14 15:28:47 -04:00
76273a6b80 Clean up integration tests (#77516) 2022-04-14 15:18:30 -04:00
2ba39fcf8c Update pip example with standard lowercase http[s]_proxy env vars (#77515) 2022-04-14 15:17:40 -04:00
2fc73a9dc3 update python devel docs (#77499)
* update python devel docs

Co-authored-by: Sandra McCann <samccann@redhat.com>
2022-04-14 15:05:03 -04:00
cbe42bff7f Allow for lazy evaluation of Jinja2 expressions (#56116) 2022-04-14 12:32:00 -05:00
f2ab920822 Better info sourcing (#77511)
Task is  authoritative
   also includes latest per loop info
   and fix tests
2022-04-14 13:07:27 -04:00
793bb200ec CLI now issues clearer error when 0 hosts selected (#77517)
fixes #77512
2022-04-14 13:06:34 -04:00
6e5f1d781d Config, ensure templating happens at functions (#77483)
move away from special templating in constants.py
 simplified main get, unified paths to get info

* Let native jinja deal with eval for type
* make constants available for templating defaults
* ensure we use config file
2022-04-14 13:05:30 -04:00
c3a3bc1d0d Allow strftime to display time in UTC (#70351) 2022-04-14 12:35:19 -04:00
a0dede5458 ansible-connection verboistery (#77509)
* ansible-connection verboistery

  for cli, just use normal parser creation
 this also adds --help, but that seems fine
 also some error cleanup

Co-authored-by: Nathaniel Case <this.is@nathanielca.se>
2022-04-14 11:24:33 -04:00
3b9592fcaf Move to display as single source of verbosity (#77498)
* Move to display as single source of verbosity

Co-authored-by: Sloane Hertel <19572925+s-hertel@users.noreply.github.com>
2022-04-14 11:23:06 -04:00
553a226da5 Steering Committee: add new member (#77529) 2022-04-13 16:53:39 +01:00
32d67ce998 Exclude Python 2.6 from interpreter discovery. 2022-04-13 08:30:02 -07:00
0d9a580f24 docs: Add porting guide for Ansible 6.0.0a1 (#77526) 2022-04-13 09:50:35 -04:00
fa7c5d9b10 Update reporting_bugs_and_features.rst (#77518) 2022-04-13 09:47:59 -04:00
727387ad76 2.14 Roadmap (#77387)
Co-authored-by: Matt Clay <matt@mystile.com>
2022-04-12 11:12:18 -05:00
460f842ae0 Remove openSUSE Python 2.7 from test matrix. 2022-04-11 18:45:47 -07:00
d7fbde4ea9 Make "~/.ansible" path configurable (#76114)
* replace hardcoded '~/.ansible' to C.ANSIBLE_HOME
* rename previously existing env ANSIBLE_HOME in env-setup script
* modify cache dir monkeypatching in galaxy api unit tests
* update "version_added" to 2.14 for ANSIBLE_HOME
* fix description of collections with proper use of ANSIBLE_HOME

Co-authored-by: htol <github@h-tol.net>
Co-authored-by: stefanwascoding <stefan@syntaxhelden.de>
2022-04-11 14:17:00 -04:00
538a19b748 Update developing_collections_structure.rst (#77496) 2022-04-11 14:11:09 -04:00
94138cf608 template override colon bugfixes (#77495)
* Proper error on missing jinja2 override separator

Properly catch the case when no (or a wrong) separator is used in a
jinja2 override, and return a useful error message to the user.

* Support colons in jinja2 override value

By limiting the split to 1, any colons in the value are preserved and
passed on.
2022-04-11 10:11:57 -04:00
94eff70030 PlayIterator - remove deprecated states (#77444) 2022-04-11 15:13:10 +02:00
477c55b0d2 Get git executable for collections in git repos (#77493)
* Fix traceback installing collections from git repos if git is not installed
2022-04-08 13:41:53 -04:00
eef0a1cef9 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
2022-04-08 10:56:28 -04:00
7126bfc61c Clarifying how handlers are handled (#77372) 2022-04-07 13:46:04 -04:00
d7d2afd203 avoid recursion in example (#77436) 2022-04-07 13:44:05 -04:00
a85261342a template module: document jinja2_native behavior (#77445) 2022-04-07 13:43:15 -04:00
6da4186f6e Update installing_collections_file.rst (#77439) 2022-04-07 13:42:38 -04:00
e8dbc84afe Trivial (#77467)
Co-authored-by: Iheanacho Amarachi Sharon  <58210919+Iheanacho-ai@users.noreply.github.com>
2022-04-07 13:33:02 -04:00
c7e198b907 Ensure correct environment_class is set on Template (#77485) 2022-04-07 16:52:12 +02:00
66c5844978 ansible-test - Don't fail if network cannot be disconnected (#77472)
* Don't fail if network cannot be disconnected

* add clog frag
2022-04-06 15:32:13 -05:00
62fe4718cb Fix ini section for INVENTORY_UNPARSED_WARNING (#77478) 2022-04-06 13:32:35 -04:00
1d9c68d27e honor use_proxy parameter (#77312)
* honor use_proxy parameter
* fix uri test with "use_proxy: no"
* fix urls.py module

Co-authored-by: Carlos <Juan.Carlos.Cardenas.Viera@ibm.com>
2022-04-06 13:21:49 -04:00
5b44035983 Hide "[WARNING]: No inventory was parsed" message (#65499)
* Add config option INVENTORY_UNPARSED_WARNING to hide the warning "No inventory was parsed, only implicit localhost is available"
2022-04-06 12:41:53 -04:00
6216c9fc93 Fix sanity test crash. 2022-04-06 09:36:23 -07:00
36371500b7 docs: Update porting guide for ansible 5.6.0 (#77466) 2022-04-05 16:39:24 -04:00
26631de88c Document how to release a collection (#77391)
Co-authored-by: Divine Odazie <dodazie@gmail.com>
2022-04-05 13:59:45 -04:00
dce30e2577 Remove deprecated Load-CommandUtils and Import-PrivilegeUtil (#77457) 2022-04-05 11:28:23 -04:00
cdf998fa79 cli - deprecated setting verbosity before sub command, cont'd (#77456)
Follow up on #75840
2022-04-05 11:27:40 -04:00
f41636b9b8 Remove deprecated UnsafeProxy (#77455) 2022-04-05 11:25:58 -04:00
3fe5f577e6 make collection warning message clearer (#74859) 2022-04-04 16:40:02 -04:00
82c622a26a community_steering_committee.rst: add chairperson (#77454) 2022-04-04 13:59:08 -04:00
2797dc644a Add test to assert that missing libyaml doesn't result in an error. Fixes #77437 2022-04-01 13:53:19 -07:00
ac56647f4a INI: values with spaces can be single or double quoted (#77369) 2022-04-01 12:10:56 -04:00
9f82fc204b apt_key: remove deprecated key module param (#77409) 2022-04-01 11:01:20 +02:00
f933f9a178 get_url: remove deprecated sha256sum module param (#77408) 2022-04-01 10:26:41 +02:00
21addac5da Docs cheatsheet - skeleton and ansible-playbook (#76655) 2022-03-31 15:19:21 -04:00
6557a60d08 Most Matrix channels are ansible.com and not .im (#77352) 2022-03-31 15:18:01 -04:00
e3aa73cb97 Catch ImportError when pyyaml doesn't have libyaml extension (#77434) 2022-04-01 05:16:47 +10:00
26149c45df import_playbook: remove deprecated free form params (#77431) 2022-04-01 05:13:28 +10:00
eeef3110b2 Switch to gender neutral terms (#77430)
* Switch to gender neutral terms

* Update _selectors2.py

* Update foreman.py

* Update foreman.py

Co-authored-by: inclusive-coding-bot <inclusive-coding-bot@github.com>
2022-04-01 05:13:13 +10:00
d4dd4a82c0 Remove deprecated default.plugin_filters_cfg config option (#77429)
* Remove deprecated default.plugin_filters_cfg config option

Fixes #77398

* Fix tests
2022-04-01 05:11:56 +10:00
a421a38e10 Remove deprecated NETWORK_GROUP_MODULES env var (#77428)
Fixes #77397
2022-04-01 05:11:42 +10:00
f2387537b6 Remove deprecated DISPLAY_SKIPPED_HOSTS env var (#77427)
Fixes #77396
2022-04-01 05:11:31 +10:00
ff8a854e57 Remove deprecated LIBVIRT_LXC_NOSECLABEL env var (#77426)
Fixes #77395
2022-04-01 05:11:20 +10:00
e918cfa588 Fix list formatting (#77354) 2022-03-31 15:09:43 -04:00
87a8fedd94 Fix type for ansible-galaxy server config definitions (#77424)
* Fix type for ansible-galaxy server config definitions

* changelog

* check attr without api call

* pep8
2022-04-01 05:09:10 +10:00
bf8e186c68 Example is a single play, not a playbook 2022-03-31 15:02:48 -04:00
8caa6efaab 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
2022-03-30 13:46:09 -07:00
4b51e61645 ansible-test - Fix origin host target filtering. 2022-03-30 11:16:15 -07:00
6d260ad967 Remove COMMAND_WARNINGS and warn (#77411)
* Remove COMMAND_WARNINGS and warn

Fixes #77394
2022-03-30 09:52:44 -04:00
e080bae766 Remove deprecated ALLOW_WORLD_READABLE_TMPFILES config option (#77410)
Fixes #77393
2022-03-30 09:46:57 -04:00
60b4200bc6 winrm - ensure callers PATH for kinit is set (#77401)
* winrm - ensure callers PATH for kinit is set

* Fix unit test expectations

* Fix type annotation
2022-03-29 17:36:56 -07:00
353511a900 Add script to handle more deprecations. (#77400)
* Add script to handle more deprecations.

This script currently supports deprecations from the following sanity tests:

* deprecated-config
* update-bundled

* Ignore script in package-data test.
2022-03-29 15:24:30 -07:00
f8ec660e62 [ansible-galaxy] Fix listing collections with null namespace/name/version metadata (#77014)
* Fall back to implicit namespace.name from the path if the metadata is invalid

* Test listing a collection with null namespace/name/version fields in its galaxy.yml
2022-03-29 15:18:06 -04:00
4ccc4c5aeb Report relative path in deprecated-config test. 2022-03-29 11:20:04 -07:00
87d52e0ce0 Only require a keyring if collections with signatures will be installed (#77355)
Fixes #77349
2022-03-29 17:03:43 +02:00
50d4cf931c Start of 2.14 development cycle. (#77378)
* Delete old changelog fragments.
* Add 2.14 changelog stub.
* Add porting guide.
* Update version and codename.
* Add temporary deprecated version ignores.
2022-03-28 16:07:24 -07:00
708e4c206a ansible-test - Update default test containers. 2022-03-28 15:27:04 -07:00
7075fa36a1 Bump requirements for antsibull to 0.42.0 (which depends on antsibull-changelog >= 0.14.0). (#77362) 2022-03-28 16:24:29 -04:00
93d0ea0215 Update core porting guide generation. 2022-03-28 13:16:28 -07:00
3e491db466 Porting guide fixes. (#77376)
* Update porting guide generation.
* Fix 2.13 porting guide link.
2022-03-28 11:57:10 -07:00
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
2022-03-28 11:47:09 -05:00
f03624e295 clarify how to customize ansible cli output (#77357) 2022-03-28 03:32:47 -07:00
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.
2022-03-26 09:14:57 -04:00
55f90ba31f ansible-test - Remove RHEL 9.0b support.
Support can be restored once RHEL 9 has been released.
2022-03-25 15:18:47 -07:00
afecc6400e Action Plugin argspec validation (#77013) 2022-03-25 11:53:32 -05:00
4635c75ef7 log results for get_best_parsable_locale (#77319)
* log locale outcomes from function
* also included variant forms of same prefs
2022-03-24 18:16:33 -04:00
2e69b5867e Creat steering committee docs (#77330)
Co-authored-by: Aine Riordan <44700011+ariordan-redhat@users.noreply.github.com>
2022-03-24 16:50:29 -04:00
ff184b0815 SID - Use literal UPN value when attempting a user to SID lookup (#77334) 2022-03-25 05:01:45 +10:00
27aa2612d9 Add what to look for in PyYAML documentation (#77323)
Co-authored-by: Martin Krizek <martin.krizek@gmail.com>
2022-03-24 14:24:24 -04:00
fa12af9042 Revision: "Address Docs: How to report bugs" #53520 (#77269) 2022-03-24 14:21:50 -04:00
1bdcb56249 Improve documentation to fix outdated file paths (#77341)
Co-authored-by: njthanhtrang <njthanhtrang@users.noreply.github.com>
2022-03-24 14:18:33 -04:00
ffda8ccbbd Incorrect parent role paths var description (#77342) 2022-03-24 14:11:36 -04:00
0a5b2e88f3 Fix quotes (#77346) 2022-03-24 14:07:19 -04:00
ea7f24a1d5 Support ignoring of certificates for ansible-galaxy during SCM cloning (#67616)
* Support ignoring of certificates for ansible-galaxy during SCM cloning

* Add integration tests installing a role from an untrusted repository

Test installing the role without --ignore-certs fails
Test installing the role with --ignore-certs is successful
2022-03-24 13:56:21 -04:00
2769f5621b Add find_spec and exec_module to RestrictedModuleLoader (#76427)
* Add find_spec and exec_module to RestrictedModuleLoader

* Fix getting new loader with correct path

Fix pep8 errors

* Use convert_ansible_name_to_absolute_paths instead of the loader path

* Apply suggestions from code review

* Fix type hints and test them in CI

* Fix error message for ansible.module_utils.basic if it's missing

Add mypy ignored missing imports for controller sanity tests

* Add mypy attr-defined ignore entries for python 3.8, 3.9, 3.10 for vendored six

Add mypy attr-defined ignore for python 2.7 in lib/ansible/utils/collection_loader/_collection_finder.py

* Just test controller python versions to simplify ignoring mypy errors
2022-03-23 13:55:37 -07:00
f96a661ada ansible-galaxy - add configuration options for more flexible collection signature verification (#77026)
* Add a toggle to control the number of signatures required to verify the authenticity of a collection

* Make the default number of required valid signatures 1

* Add option to make signature verification strict and fail if there are no valid signatures (e.g. "+1")

* Use a regex to validate --required-valid-signature-count

* Add a toggle to limit the gpg status codes that are considered a failure

* Update documentation and changelog

* Add unit and integration tests for the new options

* Fixes #77146

Fix using user-provided signatures when running 'ansible-galaxy collection verify ns.coll --offline'

Add a test for a user-provided signature when running ansible-galaxy collection verify with --offline

Fix displaying overall gpg failure without extra verbosity

Add a test for displaying gpg failure without verbosity

Improve documentation to be more clear that signature verification only currently applies to collections directly sourced from Galaxy servers
2022-03-23 16:41:27 -04:00
21827522dc Add quickstart testing docs for collections (#77290)
Co-authored-by: Divine Odazie <dodazie@gmail.com>
Co-authored-by: Emmanuel Ugwu <32464178+ugwutotheeshoes@users.noreply.github.com>
2022-03-23 16:07:32 -04:00
82e5f368e1 Reduce intro install to just pip (#77178) 2022-03-23 15:56:45 -04:00
8a86fa602d Simplify documentation for search paths (#73818) 2022-03-23 15:55:40 -04:00
bf00a14f91 linux networking facts: Provide IPv4 prefix (#77193)
For IPv6 addresses, Ansible already provides the prefix length for IP
addresses in the `prefix` fact. This patch adjusts the facts for IPv4
addresses to also contain the prefix length in the prefix fact. This
makes it easier to use the facts consistently when the CIDR notation is
needed.

Signed-off-by: Till Maas <opensource@till.name>
2022-03-24 04:47:01 +10:00
14098d9b04 typo variable reference (#77327) 2022-03-22 16:25:46 +01:00
4baf18c573 Remove more Python 2.x compatibility code from controller. (#77320) 2022-03-22 16:19:53 +01:00
c1a34d5a63 Update systemd strategy to not confuse NetworkManager (#77243)
* Update systemd strategy to not confuse NetworkManager. Fixes #76958

* Add tests
2022-03-21 09:32:41 -05:00
1100289a45 docker_util: Handle error in JSON parsing (#77298)
While getting hostname from container, podman command
fails to return JSON so wrap exception and return
hostname as 'None'

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2022-03-21 08:45:45 -05:00
68b5db328f Update ansible extension information (#77235)
Co-authored-by: Abhijeet Kasurde <akasurde@redhat.com>
2022-03-17 16:55:52 -04:00
34e60c0a7a ansible_distribution: Add support for Uos/Deepin (#77275)
* ansible_distribution: Add support for Uos/Deepin

* Add changelog fragment.
2022-03-18 05:22:23 +10:00
4d984613f5 validate-modules for plugins: do some more schema validations so that some issues that are currently reported for modules are also reported for plugins (#77268)
* Add more sanity tests on schema level (so they also work for plugins).

* Fix various issues the sanity test reported.

* Add changelog fragment.

* Fix function name.
2022-03-18 05:16:40 +10:00
e3c72230cd unarchive: fix io_buffer_size option, remove ignore.txt entry (#77271)
* Fix io_buffer_size option.

* Remove ignore.txt entry by adding action plugin only options to module's argument spec.

* Add changelog fragment.

* Adjust unit tests.
2022-03-18 05:15:13 +10:00
c555ce1bd9 Update intro_patterns.rst (#77300)
Describe difference between targeting a single host using -i vs. --limit.  In particular, pointing out the behavior difference that -i will not rad inventory variables.
2022-03-17 14:57:37 -04:00
94b73d66d5 inventory manager respect --flush-cache (#77083) 2022-03-17 14:15:03 -04:00
c9db73f04e Add a YAML representer for NativeJinjaText (#77282)
Fixes #77280
2022-03-16 11:24:21 +01:00
d8687bd015 docs: Update porting guide for Ansible 5.5.0 (#77287) 2022-03-15 16:06:07 -04:00
dfda04894f stub out ipaddr page and point to new home (#77281) 2022-03-14 13:27:06 -07:00
6546c484f4 Address Docs: How to report bugs #53520 (#77214) 2022-03-11 10:22:40 -05:00
1a923e307e After 2.10 Collections can use vars plugins (#77216) 2022-03-11 10:17:10 -05:00
e8afdac06e ansible-test - Fix delegation inventory path. 2022-03-10 18:17:49 -08:00
b60a5eefb2 Include links to the modern homes of the windows modules (#77220) 2022-03-10 16:53:57 -05:00
496f51ceac get_url fix word emphasis on documentation (#77247) 2022-03-10 16:23:31 -05:00
3c72aa32d6 Add ansible devtools working group in community communication 2022-03-10 11:19:08 -08:00
7cb581ed2c Support podman-remote in ansible-test (#75753) 2022-03-09 15:59:29 -06:00
1ba3ead0a0 Update developing_modules_general_aci.rst (#73925) 2022-03-09 15:49:02 -05:00
0c514bcf54 ansible-test - Fix PS coverage --all generation. 2022-03-09 12:35:23 -08:00
6f445ca6e5 Remove obsolete Python 2.x controller code. 2022-03-08 16:32:06 -08:00
f68c66a3ef Remove collections compat from controller code. 2022-03-08 16:11:40 -08:00
822fddd627 Fix yaml loader and compat. 2022-03-08 12:51:33 -08:00
f43c54d890 ansible-test - Update default containers to 5.7.0. 2022-03-08 12:51:10 -08:00
3d5637beec Initial mypy sanity test support for core. 2022-03-08 09:26:14 -08:00
27923aad7e Add inline type hint ignores. 2022-03-07 16:45:19 -08:00
2a2b7dc42a Update include role to match the base class.
Use frozenset instead of tuple.
2022-03-07 16:45:03 -08:00
4867ac217b Code cleanup for type hinting issues. 2022-03-07 13:24:39 -08:00
8063643b4c Fix collection redirects for filter and test plugins (#77210)
* Fix collection redirects for jinja2 filters/tests

* Handle recursive redirects

Co-authored-by: Matt Martz <matt@sivel.net>
2022-03-07 15:39:56 -05:00
50d28de9ba Make ansible_index.rst more readable (#77225) 2022-03-07 13:55:59 -05:00
7c81a652c0 Type hint fixes. 2022-03-07 10:26:40 -08:00
3a3c496ade Remove obsolete Python 2.x compat code. 2022-03-07 09:21:46 -08:00
0c4c18bc04 Type hint fixes. 2022-03-04 17:09:50 -08:00
e6f63be7a4 Honor --quiet parameter properly in fish shell (#77180)
* The `^` stderr redirection is deprecated
* Setting `-q` for `setup.py` in `gen_egg_info` is redundant
2022-03-05 07:04:54 +10:00
8b2e628565 galaxy - Clean up type hints and imports. 2022-03-04 10:33:02 -08:00
0990c4ca7c Extend validate-modules to also validate plugins (#71734)
* Let validate-modules also validate plugins.

* Support 'option' in 'cli'.

* Use DOCUMENTABLE_PLUGINS instead of UNDOCUMENTED_PLUGIN_TYPES.

* Support 'keyword', clean up error codes.

* Call settings.process_errors only once; remove __version__.

* Add changelog fragment.
2022-03-04 09:08:34 -05:00
7d234a40ee Point to AH docs (#77200) 2022-03-04 02:33:31 -08:00
af2b1361ff ansible-test - Simplify type hints. 2022-03-03 16:34:25 -08:00
ea66cf189b Fix ansible console to respect ANSIBLE_STDOUT_CALLBACK (#77182)
* Fix ansible console to respect ANSIBLE_STDOUT_CALLBACK

This makes the ansible-console able to customize the stdout callback.
Ansible console currently uses statically minimal callback.

* Add changelog

* Move the fragment changelog in the right directory
2022-03-04 09:40:23 +10:00
871b2ca73a Simplify existing type hints. 2022-03-03 14:26:47 -08:00
ccdb552d90 More type hint fixes for module_utils. (#77198)
* Type hint fixes for module_utils.
* Fix type hints in module_utils.facts.
2022-03-03 11:20:29 -08:00
86f00bd156 Update example to work (#77191)
`with_first_found` only takes a list of things, it's not like `tags`
where it can take a thing or a list of things.

Inspired by locally discovered breakage and then finding
https://github.com/ansible/ansible/issues/77136 where someone was also
doing this and getting into trouble.
2022-03-04 05:09:13 +10:00
e314f4e666 Add typing to module_utils.compat. (#77197) 2022-03-03 10:48:42 -08:00
5a1b891917 Additional type hinting cleanup. (#77188) 2022-03-02 16:10:44 -08:00
74a204e6f1 first_found: allow spaces in names (#77141)
* first_found: allow spaces in names

Fixes #77136
2022-03-02 16:16:47 -05:00
1286513947 module_utils - Fix type hinting issues. 2022-03-02 13:09:07 -08:00
8e45925415 hostname - Use base class on UnimplementedStrategy
This requires moving UnimplementedStrategy below BaseStrategy and Hostname below UnimplementedStrategy.
2022-03-02 12:14:10 -08:00
35ef2af0ce Fix type hints and variable usage in modules. (#77184)
* Remove unused variables.
* Fix conflicting variable name.
* Add type hints.
2022-03-02 11:52:51 -08:00
6de04e8be6 Fix module exception handlers.
Exception handler variable names should not conflict with other variables.

Use Python 2.6+ exception handler syntax.
2022-03-02 11:34:11 -08:00
d31730d781 Fixes for type hinting issues. (#77170) 2022-03-01 17:14:26 -08:00
7b0fb114be Data tagging and sidecar docs are delayed, and will be retargeted for 2.14 (#77173) 2022-03-01 11:37:55 -06:00
b667409d6d ansible-test - Correct a typo in comments (#77148) 2022-03-01 16:04:38 +01:00
a06fa496d3 ansible-test - Code cleanup and refactoring. (#77169)
* Remove unnecessary PyCharm ignores.
* Ignore intentional undefined attribute usage.
* Add missing type hints. Fix existing type hints.
* Fix docstrings and comments.
* Use function to register completion handler.
* Pass strings to display functions.
* Fix CompositeAction handling of dest argument.
* Use consistent types in expressions/assignments.
* Use custom function to keep linters happy.
* Add missing raise for custom exception.
* Clean up key/value type handling in cloud plugins.
* Use dataclass instead of dict for results.
* Add custom type_guard function to check lists.
* Ignore return type that can't be checked (yet).
* Avoid changing types on local variables.
2022-02-28 14:37:09 -08:00
8291dbdf81 add accessibility guidelines to docs style guide (#77145)
Co-authored-by: Jill R <4121322+jillr@users.noreply.github.com>
2022-02-28 16:40:32 -05:00
27fe26edbf Update setup_pexpect to prefer pip user installs.
This works around issues on RHEL 7.9 when an old version of pexpect is installed from an OS package.
2022-02-28 13:22:56 -08:00
7657caa072 Fix 'ansible-galaxy collection verify' to display new files/dirs (#76690)
* Fix 'ansible-galaxy collection verify' to report files/directories not listed in the FILES.json

* changelog

* Fix bug in 2.13+
2022-02-28 16:15:10 -05:00
0d4219f265 Fix IPs for ipaddr filter in user_guide (#77151)
* Fix IPs for ipaddr filter in user_guide

* Apply suggestions from code review

Co-authored-by: Sandra McCann <samccann@redhat.com>
2022-02-28 13:52:19 -05:00
28a278ee48 fix spelling error in details (#77152)
correct inventory_hostname spelling error in include_vars and set_fact
modules

Signed-off-by: jbpratt <jbpratt78@gmail.com>
2022-02-28 13:22:17 -05:00
c3999d89f4 Clarify docs for using tests as filters (#77155) 2022-02-28 13:21:03 -05:00
43c2c983cc Fix type hints in galaxy. 2022-02-28 08:49:37 -08:00
68601601ce Docsite: update communication.rst (#77135)
\
2022-02-25 10:26:59 -05:00
22ba18d7b0 add links to remote_user docs (#77140)
* add links to remote_user docs
* shorten link name
2022-02-25 02:59:11 -08:00
dc6b0d4857 ansible-test - Remove obsolete display of MAXFD.
Use of ``subprocess.MAXFD`` only worked on Python 2.x, which is no longer supported.
2022-02-24 14:12:56 -08:00
3f924b59f2 use same timeout for galaxy api interactions (#77088)
Also, bump the default. A number of people have reported problems with
this 20 second timeout for a couple of years on
https://github.com/ansible/galaxy/issues/2302

It is mentioned in the issue that resolving dns can sometimes take up to
30 seconds, and that this timeout includes dns resolution.

Includes a changelog message
2022-02-24 15:58:13 -05:00
4f48f375a0 parameters: handle blank values when argument is a list (#77119)
Fixes: #77108

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2022-02-25 05:08:33 +10:00
d60efd9768 hostname module - fix TypeError in FileStrategy (#77025) (#77074)
* Use file_get_content() to read the file containing the host name
2022-02-25 05:05:52 +10:00
6a7009a84f use present tense in changelog example (#77138) 2022-02-24 11:05:02 -08:00
749063968b Temporarily remove RHEL 9.0b from the test matrix.
AppStream modules are currently missing.
2022-02-24 10:54:14 -08:00
5f258d2c64 move collection pr quickstart over (#77087)
* move collection pr quickstart over
* add link
* fix CI
* fix formatting
2022-02-24 09:30:00 -08:00
71dfe32ab6 76134 DOCS:Uninstall all packages before Ubuntu reinstall (#77137) 2022-02-24 09:29:06 -05:00
0bb70b6b9f AL2022 package-manager detection support (Amazon Linux) (#77050)
* AL2022 package-manager detection support (Amazon Linux)

* try/except

* use major_version

* check if dnf exists + add changelog fragment

* analogue logic
2022-02-23 15:30:58 -08:00
3f0d5bc351 Fix LooseVersion and StrictVersion refs in docs. 2022-02-23 14:52:45 -08:00
bdf37336c8 Update pylint deprecated plugin to use ansible-invalid* symbols (#77086) 2022-02-23 12:42:45 -08:00
143904f49b More informative playbook attribute errors (#77082)
* More informative playbook attribute errors

Co-authored-by: Sloane Hertel <19572925+s-hertel@users.noreply.github.com>
2022-02-23 15:16:03 -05:00
8cbe1435c2 Use full python package for ansiballz cache filenames (#77090)
* Use full python package for ansiballz cache filenames

* Be a little more explicit about test goals
2022-02-23 14:10:43 -06:00
4f9c7fd509 ansible-test - Remove validate-modules symlink. 2022-02-23 10:47:14 -08:00
1a5853d794 Remove obsolete units.compat.mock compat layer. (#77118)
* Remove obsolete units.compat.mock compat layer.
* Update remaining units.compat.mock references.
2022-02-22 18:20:11 -08:00
5a6e05affb More strict pylint checking of ansible-test code. 2022-02-22 17:55:14 -08:00
b613808277 Remove obsolete unit test builtins compat. 2022-02-22 17:55:00 -08:00
2cd6cdc6a7 Fix duplicate unit test function names. (#77115)
* Fix duplicate unit test function names.
* Disable faulty tests.
2022-02-22 16:41:57 -08:00
0bd8106d15 Remove unused mock compat code.
The code is unreachable since Python 3 versions before 3.5 are not supported.
2022-02-22 16:09:22 -08:00
30d1a93d93 update changelog fragment guidance with examples (#77040)
Co-authored-by: Alicia Cozine <879121+acozine@users.noreply.github.com>
2022-02-22 14:02:39 -05:00
36121aeee7 docs: Update porting guide for ansible 5.4.0 (#77107) 2022-02-22 13:03:42 -05:00
0f41682473 Remove use of distutils in docs Makefile.
The current usage only works if `python` is Python 2.x since the syntax is invalid on Python 3.x.

When running on Python 3.x it would either be missing, or if Python 2.x was also present, incorrect.
2022-02-22 08:23:56 -08:00
ff25b51178 Fix example return value in docstring. (#77076) 2022-02-22 10:20:39 -05:00
b2bafc054e remove list of container images (#77089)
* remove list of container images
* remove some more centos8
2022-02-22 02:22:22 -08:00
92800a04c2 Add missing integration test dependency. 2022-02-21 19:06:39 -08:00
88bfb7193e Use --no-deps when installing amazon.aws and not testing dependencies (#77091) 2022-02-21 19:07:21 -05:00
901e3d43b1 describe how to generate a sample ansible.cfg (#77053)
* describe how to generate a sample ansible.cfg
* correct commands used
2022-02-21 06:53:14 -08:00
de9a3bda2c Fix warning in unit tests for _yaml import. 2022-02-17 17:48:27 -08:00
d3d5244912 ansible-test - Fail sanity test on distutils use. 2022-02-17 17:48:07 -08:00
c1a271c792 Remove unused task from template integration test. 2022-02-17 17:47:37 -08:00
d286c2e8b3 ansible-test - Fix CParser import in yamllint. 2022-02-17 17:47:18 -08:00
c27fd777f4 ansible-test - Use quay.io containers in plugins. 2022-02-17 13:31:44 -08:00
addb9baec2 ansible-test - Clean up venv code. 2022-02-17 10:52:25 -08:00
f2612ce169 apply owner/group permissions to top folder with unarchive module (#73024)
* apply owner/group permissions to top folder
* remove unused var unarchive30
* fix permissions for top folders if the tarball include multiple top folders
* added test for top folder ownership
2022-02-17 12:17:51 -05:00
84b85a5b5a more explicit moustache docs (#77051) 2022-02-17 10:28:12 -05:00
e620b96f49 Create collection maintainer's guide (#76976)
* initial merge of maintainer guide
* Apply suggestions from code review

Co-authored-by: Aine Riordan <44700011+ariordan-redhat@users.noreply.github.com>

Co-authored-by: Aine Riordan <44700011+ariordan-redhat@users.noreply.github.com>
2022-02-17 01:29:54 -08:00
177336a9d3 Avoid system-site-packages in AZP coverage venvs.
The use of `--venv-system-site-packages` was an optimization to use the `coverage` package pre-installed in the AZP test container.
However, now that the venv is bootstrapped by ansible-test that optimization no longer makes sense, since other downloads are already taking place.

ci_coverage
ci_complete
2022-02-16 23:33:49 -08:00
13d5381e56 ansible-test - Update base and default containers. (#77033) 2022-02-16 17:33:14 -08:00
494cb4e211 Ensure tests that need to validate higher verbosity messages run with vvvv 2022-02-16 16:59:49 -08:00
c688eb824b Add basic support for "apt-get clean" operation to apt module (#76758)
* adding apt-get clean functionality

 documentation and example
2022-02-16 12:01:26 -05:00
68fb3bf90e ansible-test - Fix consistency of managed venvs. (#77028) 2022-02-15 17:06:16 -08:00
fb01616c5a Revert "Temporarily remove RHEL 9.0b from test matrix."
This reverts commit a5eadaf3fd.
2022-02-15 15:36:09 -08:00
18251f3685 dnf: ensure releasever is passed into libdnf as str (#77024)
Fixes #77010
2022-02-15 10:12:47 -05:00
af7c9deb4e add crosslinks for changelog fragments (#77022) 2022-02-15 02:40:50 -08:00
1480503326 Update complex_data_manipulation example uptime in days/h/m/s (#77019) 2022-02-14 16:01:27 -05:00
f82b1ba67c Update indentation for example in playbooks_handlers.rst (#75348) 2022-02-14 15:08:52 -05:00
3779c1f278 restore inadvertently deleted default for convert_data. Fixes #77004 (#77016) 2022-02-14 08:21:17 -06:00
c9d3518d2f Fix final fact delegation (#77008)
* fix facts delegation loop overwrite

 partial revert of change to allow facts to be present in each loop iteration
 was not needed in final results as result processing alreayd had the disctiontion
 and ended up breaking the assumptions in the calling code.

 fixes #76676
2022-02-11 18:19:38 -05:00
56edbd2bbb Handle connection dissonance (#77005)
* play_context, compensate for existing plugins

 some connection plugins are not fully using the correct configuration,
 but this was previously hidden from them as play_context was providing
 the info instead, now play_context provides the 'correct' info, but hitting
 these bad configurations.
2022-02-11 16:26:02 -05:00
32f7490a2c Add note to serial docs (#77006)
* add note to serial docs
* add keyword directly
Fixes #76820
(cherry picked from commit de20f1bae8)
2022-02-11 11:15:12 -08:00
3a662ef2c1 Fix package-data sanity test for newer setuptools. 2022-02-11 10:45:01 -08:00
ef4c5cd61b ansible-test - Use newer pip to bootstrap FreeBSD. 2022-02-11 10:08:04 -08:00
8939f4d2f7 add tasks (#75489) 2022-02-10 16:20:23 -05:00
43e55db208 ansible-galaxy - add signature verification of the MANIFEST.json (#76681)
* ansible-galaxy collection install|verify:

  - Support verifying the origin of the MANIFEST.json when the Galaxy server has provided signatures.
  - Allow supplemental signatures to use during verification on the CLI/requirements file.

* ansible-galaxy collection install:

  - Support disabling signature verification. This silences the warning provided by ansible-galaxy if the Galaxy server provided signatures it cannot use because no keyring is configured.
  - Store Galaxy server metadata alongside installed collections for provenance. This is used by 'ansible-galaxy collection verify --offline'.

* Add unit tests for method that gets signatures from a Galaxy server

* Add integration tests for user-provided signature sources

- Test CLI option combinations
- Test installing collections with valid/invalid signature sources
- Test disabling GPG verification when installing collections
- Test verifying collections with valid/invalid signature sources

* Make signature verification advisory-by-default if signatures are provided by the Galaxy server

- Make the default keyring None
- Warn if the keyring is None but the Galaxy server provided signatures
- Error if the keyring is None but the user supplied signatures
- Error if the keyring is not None but is invalid

* changelog

* add ansible-galaxy user documentation for new options

Co-authored-by: Matt Martz <matt@sivel.net>
Co-authored-by: Sviatoslav Sydorenko <wk.cvs.github@sydorenko.org.ua>
Co-authored-by: Martin Krizek <martin.krizek@gmail.com>
Co-authored-by: Sandra McCann <samccann@redhat.com>
Co-authored-by: Andy Mott <amott@redhat.com>
Co-authored-by: John R Barker <john@johnrbarker.com>
2022-02-10 10:48:49 -05:00
d35bef68f5 replace - always return rc (#71963)
* Return rc=0 on success.

Error handling in playbooks generally expects `rc` to be set to 0 when a module has not failed.  Playbook authors should not have to check for the existence of `rc` first.

* Use single definition and added changelog

* Fix up tests with new return value

Co-authored-by: Jordan Borean <jborean93@gmail.com>
2022-02-10 06:23:04 +10:00
b145732973 Resubmit: Use SystemdStrategy for Debian in the hostname module (#76929)
* add DebianStrategy tests
* ensure hostname can be changed by using become
* use Systemd strat for debian and Base for generic.
* add test to ensure all strategies are available

Signed-off-by: Thomas Sjögren <konstruktoid@users.noreply.github.com>
2022-02-09 10:26:42 -05:00
522f9d1050 Make builtin.file modification times support check_mode (#76973)
* Make builtin.file modification times support check_mode
* Add integration test
2022-02-08 17:19:36 -05:00
0d40423f1c ansible-test - Fix collection loader import. (#76986)
* ansible-test - Fix collection loader import.

Resolves https://github.com/ansible/ansible/issues/76960
2022-02-08 11:38:00 -08:00
699ecb8308 improve warnings from service_facts (#76921)
be more permissive, allow query more statuses
might create a slew of warnings though, but can depend on
how individual services are permissioned
2022-02-08 13:05:21 -05:00
47faa6e206 clean_facts only show variable name (#76974) 2022-02-08 11:27:40 -05:00
eb093ae7c3 Added a powershell example for ansible.builtin.script (#76980)
* Added a powershell example

None of the examples are of a form that actually works with powershell/windows hosts. The added last example actually works with Windows hosts and Ansible. Inspired by: https://devops.stackexchange.com/questions/15409/ansible-how-to-run-local-powershell-script-on-remote-hosts

* Trivial PEP fix
2022-02-08 10:38:49 -05:00
8582df36c5 Remove misleading note in template doc fragment. Fixes #61233 (#76955) 2022-02-08 10:26:37 -05:00
0d5401d950 ansible-test - Remove unused code.
This was overlooked in a previous commit that removed FreeBSD 12.2 support.
2022-02-07 14:36:14 -08:00
00a2b7788e ansible-test - Remove cap on cryptography version. 2022-02-07 14:35:52 -08:00
e27b94c467 ansible-test - Update alpine3 container to 3.3.0.
This updates the base image from 3.14.2 to 3.15.0, which includes support for installing binary wheels using pip.
2022-02-07 14:02:58 -08:00
d4c9c103e2 ansible-pull handlle empty node/hostname return (#76965) 2022-02-07 16:10:30 -05:00
6d2d476113 avoid polluting vars with incorrect settings (#76590)
avoid polluting vars with incorrect settings

 simplify variables and templars
  - variables, original, only updated with final results, reset are copies of this
  - tempvars used for preliminary templating
  - cvars used for connection/shell/become plugins, delegation aware
  - vars_copy ignore tempvars updates and use connection plugin to get 
    finalized version per loop item/delegation,  also used to store temp results
    till we are ready to update 'variables'
 - fine tune nolog just cause we are here
 - also fix inventory_hostname_short for IP addresses
2022-02-07 16:09:28 -05:00
b493c590bc Bypass fragile git ssh wrapper (#73404)
git module now uses env vars exclusively

  - updated docs to clarify usage
  - now env vars append instead of overwrite to allow existing custom setups to keep working
    fixes #38104, #64673, #64674
  - added note for hostkeychecking more securely
    fixes #69846
  - keep script cause old versions still choke on env
  - env var cannot hold more than 'command' for older versions
  - all ssh_opts in one place
2022-02-07 16:05:16 -05:00
be19863e44 ssh connection: use 'correct' host in all cases (#76017)
ssh plugin, use 'correct' information source in all cases
  * still fallback to pc
  * added inventory to new test
  * undef var can still show as parser error on pc
    now task_exectuer has a  more accurate error handling
2022-02-07 15:13:40 -05:00
a5eadaf3fd Temporarily remove RHEL 9.0b from test matrix.
Installation of `gcc` is failing while trying to install dependencies:

```
[MIRROR] libxcrypt-devel-4.4.18-3.el9.x86_64.rpm: Interrupted by header callback: Server reports Content-Length: 32565 but expected size is: 33101
```
2022-02-07 10:56:19 -08:00
5bddecb048 gather_facts sees collection networking connection (#76954)
needed to properly propagate some arguments by convention: subset, filter

Co-authored-by: Sloane Hertel <19572925+s-hertel@users.noreply.github.com>
2022-02-07 09:57:38 -05:00
9a4ff01a4f Cleanup of cannned responses (#76689)
* removed those made obsolete by bot
 * tried to rephrase to be more informative and require less updates in the future

Co-authored-by: Sandra McCann <samccann@redhat.com>
Co-authored-by: John R Barker <john@johnrbarker.com>
Co-authored-by: Alicia Cozine <879121+acozine@users.noreply.github.com>
2022-02-04 10:37:53 -05:00
394d216922 add_host/group_by: fix using changed_when in a loop (#71719)
Fixes #71627
Fixes #75971
2022-02-04 12:35:23 +01:00
2749d9fbf9 incidental - remove win_lineinfile coverage (#76952) 2022-02-04 11:59:35 +10:00
e2d4c41ac0 Update codecov download URL.
ci_complete
ci_coverage
2022-02-03 13:59:27 -08:00
65987e86a9 Added package reference for Debian to resolve error (#76876) 2022-02-03 16:22:39 -05:00
17dd9ff924 ansible-test - Update default containers to 5.5.0. 2022-02-03 13:12:37 -08:00
5448661aec Update 'Ansible and BSD' section 'Setting the Python interpreter'. (#76825) 2022-02-03 15:40:04 -05:00
a1af1d94cd vmware: Migrate VMware Scenario Guides (#76640)
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2022-02-03 15:32:03 -05:00
0ca19a5b73 Update windows_winrm.rst (#76835)
Co-authored-by: Jordan Borean <jborean93@gmail.com>
2022-02-03 15:30:21 -05:00
9a9ef01997 Update 'Installing Ansible on FreeBSD'. (#76849)
Co-authored-by: Abhijeet Kasurde <akasurde@redhat.com>
Co-authored-by: Sandra McCann <samccann@redhat.com>
2022-02-03 15:29:25 -05:00
3108c51764 Add note about installing python on macOS (#76873) 2022-02-03 15:16:57 -05:00
53e4760b8c More accurate help message for verbosity setting (#76887) 2022-02-03 15:09:26 -05:00
a926b1dbab Stop publishing code coverage to the AZP UI.
Azure Pipelines only supports publishing a single code coverage file.
This limits us to reporting on either Python or PowerShell.
It also prevents us from reporting coverage per test command without further aggregation.
Most of our users are only aware of the reports published to codecov.io.
2022-02-03 11:53:18 -08:00
e1cf6af06d add undef() keyword to core 2.12 porting guide (#76880) 2022-02-03 14:45:11 -05:00
10fd7bf12c docs: update porting guide for Ansible 5.3.0 (#76917) 2022-02-03 14:31:52 -05:00
1f4e50f178 Ansible 6 roadmap: simplify collection inclusion process (#76932)
Co-authored-by: Andrew Klychkov <aaklychkov@mail.ru>
2022-02-03 14:30:49 -05:00
2767a4cf4a docs - remove broken link in ACI scenario guide (#76940) 2022-02-03 14:29:15 -05:00
bc1e29d722 Bump antsibull version from 0.40.1 to 0.41.0 and ansible sphinx theme version to fix HTML generation in return value tables (#76759)
* Use Jinja2 comment instead of HTML comment to avoid W3C validator warning (-- inside comment).

(For those interested in the history of this: http://www.howtocreate.co.uk/SGMLComments.html#doubledash)
2022-02-03 13:53:22 -05:00
b568e0db6f ansible-test - Remove outdated remote support. 2022-02-03 10:27:36 -08:00
7e64c4fe55 ansible-test - Update bootstrap URL to not use S3. 2022-02-02 18:43:03 -08:00
6c29028f05 Update ci-files URL in integration tests.
This uses the CloudFront URL instead of going directly to S3.
2022-02-02 17:56:50 -08:00
cbb994f174 make Ansible.Basic work on non-Windows (#76924) 2022-02-02 12:48:33 +10:00
41db6d8d35 Fix task path unicode error in junit callback. 2022-02-01 09:58:02 -08:00
3c8861d1ba Fixed handling of sleep arguments during service restarts on AIX (#76878)
Fixes #76877
2022-02-01 16:18:38 +01:00
ea34fdbfe2 Misc typo fixes in plugins directory (#76566) 2022-02-01 07:18:33 +05:30
995d7e4db3 ansible-test - Limit installed pyopenssl version. 2022-01-31 16:12:32 -08:00
2bd074b486 doc: fix Jinja2 doc link templating playbook (#76889)
Signed-off-by: Stephen Lawrence <stephen.lawrence@renesas.com>
2022-01-31 16:15:43 -05:00
fbb5d56bd2 ansible-test - Use relative paths in junit output. (#76871)
* ansible-test - Use relative paths in junit output.

Also fix a traceback in the junit callback during automatic fact gathering.

* ansible-test - Handle out-of-tree JUnit paths.
2022-01-31 11:19:23 -08:00
fee90b15a2 Misc typo fixes in module_utils (#76564) 2022-01-31 22:53:06 +05:30
b1d6750e8b fix block var inheritance (#75287)
* updated tests to conform to new block inheritance

Co-authored-by: Brian Scholer <1260690+briantist@users.noreply.github.com>
Co-authored-by: Sloane Hertel <19572925+s-hertel@users.noreply.github.com>
2022-01-31 12:21:50 -05:00
29b5eb6ba9 updated metadata dump to do full docs dump (#76170)
* minor refactor in other options by pushing common code into functions
 * consolidate coll_filter
 * more normalizing loader
 * dont pass plugin_loader, its global import
 * Also dump roles and collections
 * adjusted tests to new err msg
 * disable namespace filter (unused)
2022-01-31 10:48:16 -05:00
d19b506ce8 ansible-test - Clean up future boilerplate. (#76874)
* ansible-test - Clarify need for empty __init__.py
* ansible-test - Update code-smell boilerplate.
* Update code-smell boilerplate for core.
* Update future boilerplate test for ansible-test.

All ansible-test code (except for targets) and core-specific sanity tests now use the same boilerplate.

The test also checks for unwanted `__future__` and `metaclass` boilerplate.

* Relocate target tools to the correct directory.

Several tools used on target Python versions were incorrectly placed in the controller directory.
2022-01-28 13:48:34 -08:00
3816815db0 Track failures in the includes results to avoid special handling of include errors (#53688)
* Make include_role/include_tasks work with any_errors_fatal v2

Fixes #50897

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

* Add failed to results in free strategy too

* Fix

* Avoid duplicating results

* ci_complete

Co-authored-by: Matt Martz <matt@sivel.net>
2022-01-28 13:35:19 -06:00
f501b579e5 ansible-vault encrypt_string: fix --output to write into file (#76856)
Fixes #75101
Fixes #59590
2022-01-28 09:34:59 +01:00
18ed2c64e5 ansible-test - Add default for Windows remotes. 2022-01-27 18:14:15 -08:00
26b43f425f ansible-test - Validate collection ns and name.
Resolves https://github.com/ansible/ansible/issues/62079
2022-01-27 17:24:40 -08:00
de5f60e374 ansible-test - Improve help for unsupported cwd. (#76866)
* ansible-test - Improve help for unsupported cwd.

* The `--help` option is now available when an unsupported cwd is in use.
* The `--help` output now shows the same instructions about cwd as would be shown in error messages if the cwd is unsupported.
* Add `--version` support to show the ansible-core version.
* The explanation about cwd usage has been improved to explain more clearly what is required.

Resolves https://github.com/ansible/ansible/issues/64523
Resolves https://github.com/ansible/ansible/issues/67551
2022-01-27 12:32:11 -08:00
07bcd13e6f Replace file handling with context managers in files-modules and parsing vault. (#65371) 2022-01-28 06:11:28 +10:00
029c991b0d ansible-test - Update outdated links in comments. 2022-01-27 11:33:18 -08:00
3cf71ddf69 The final output_dir pr (#76862) 2022-01-27 11:26:30 -06:00
bc5672d9ba Update developing_modules_general_windows.rst (#76846) 2022-01-27 09:28:25 +10:00
a5283d67ee add quoted examples (#76858) 2022-01-26 14:12:07 -05:00
ee80e856c2 Remove more whitelist and blacklist occurances (docs only). (#76845) 2022-01-26 14:08:20 -05:00
ebea751805 Roadmap for Ansible 6 (#76772)
Co-authored-by: John R Barker <john@johnrbarker.com
2022-01-26 13:26:20 -05:00
e9af4195be update ansible.legacy docs (#76839)
* update ansible.legacy docs

* correct role description

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

* Update docs/docsite/rst/dev_guide/developing_locally.rst
2022-01-26 12:17:18 -05:00
6bca0a5dc2 docs: add fqcn to module examples (#73546)
Co-authored-by: Felix Fontein <felix@fontein.de>
2022-01-26 11:57:58 -05:00
29de2cccba Fix task debugger to work with run_once using linear strategy (#76814)
* Fix task debugger to work with run_once using linear strategy

Fixes #76049

* Fix clog

* Add integration test
2022-01-26 08:43:12 -06:00
cad200406a group2 - switch to setup_remote_tmp_dir instead of using output_dir (#76853)
* group2 - switch to setup_remote_tmp_dir instead of using output_dir

* output_file needs to be in the tmp dir

* Use comparison that should work with macos

* remove unused dep
2022-01-26 08:31:19 -06:00
73dd2c3607 Added restart to the argument condition for AIX (#76841)
* Added restart to the argument condition for AIX

This should fix the issue https://github.com/ansible/ansible/issues/76840
2022-01-26 09:29:01 -05:00
e9ffcf3c85 ansible-test - Defer loading of completion entries. (#76852)
* ansible-test - Defer loading of completion entries.

This avoids a traceback when running ansible-test outside of a supported directory.
2022-01-25 13:24:17 -08:00
ddc4b1716b Mention ansible-core 2.11 RPM package in Ansible Core Installation Guide (#76801) 2022-01-25 13:56:52 -05:00
61bd779335 add core roadmaps to ansible docs (#76818)
* add core roadmaps to ansible docs
* make older roadmaps also show up
2022-01-25 03:14:55 -08:00
dbde2c2ae3 user module password expiration fixes (#75390)
* allow inputting 0 for password_expire_{min|max}
   0 is meaningful for min days (any time)   
   0 is technically valid for max_days
* add test for setting both min and max expiry
* [0] return result of execute_command from set_password_expire*
* [1] better return for set_password_expire
* [2] handle returns from set_password_expire*
* only set password expiry if user exists
* collect return-handling code
* combine password min and max into one execution
* handle case where spwd is not present like on macOS and FreeBSD

Co-authored-by: Sam Doran <sdoran@redhat.com>
2022-01-24 14:52:38 -05:00
5a69023941 remove ansibot from collection docs (#76817)
* remove ansibot from collection docs
* Update docs/docsite/rst/community/collection_development_process.rst
Co-authored-by: Felix Fontein <felix@fontein.de>
2022-01-24 10:50:21 -08:00
3889ddeb4b iptables - added a `chain_management` parameter to control chain (#76378)
creation and deletion

fixes #25099
closes #32158
2022-01-24 12:31:20 -05:00
d5a740ddca doc_fragments/files.py: fix "objecs" typo (#76822) 2022-01-24 10:14:20 -05:00
04d4900518 config, moved 'choices info to keys (#76569)
* config, moved 'choices' from wall of text, to keys
* updated to ensure all pythons handle the 2 modes correctly
* Update lib/ansible/config/base.yml

Co-authored-by: Sandra McCann <samccann@redhat.com>
2022-01-21 12:50:24 -05:00
864c2591b6 Use explicit keyword for plugin config (#75158)
* go back to keyword being explicit for plugin configs instead of using option name as implicit match
* switch spec to singular, no changes needed since no one used
2022-01-21 12:48:42 -05:00
96ce4804ee Resolve perf issue with async callback events (#76783)
* Don't send full task with async callback events. Fixes #76729

* Use args for async_status task, instead of k=v

* Make sure we send back the async task attrs for polling

* Add clog frag

* load is a staticmethod
2022-01-21 11:47:32 -06:00
d7d1bd6269 Fallback to os family for interpreter discovery distro map. Fixes #75560 (#76815) 2022-01-21 11:46:45 -06:00
cfe4bdc1b9 Create separate core vs collection contributor guides (#76764)
* updated core guides
* ansible package docs guides
* add core guide to Ansible docs
* Update docs/docsite/rst/community/maintainers.rst
2022-01-21 08:31:52 -08:00
8c06aada10 Module Logging with WSL2 (#76375)
* adding systemd daemon import

* adding coments and AttributeError exception

* adding minor fix to repeated syntax

* adding changelog
2022-01-21 10:27:36 -06:00
8febd37f32 Attach concat func to an environment class (#76282)
* Attach concat func to an environment class

ci_complete

* clog and docstrings
2022-01-21 09:34:15 -06:00
9f46f6eb30 Attempt 2: Catch errors getting filters and tests (#76806) 2022-01-21 05:30:42 +10:00
374720fc97 Do not require SystemdStrategy subclasses for every distro (#76800) 2022-01-21 05:25:52 +10:00
36519ff95e Parameterize disable_lookups (#76770)
Allow inventory plugins to enable/disable lookups in the compose templating
2022-01-19 10:49:50 -05:00
553e75df95 Remove obsolete skip/windows test aliases. 2022-01-18 17:20:25 -08:00
29bdb8bf1e Compare FQCN also in lockstep logic. Fixes #76782 (#76787) 2022-01-18 13:57:42 -06:00
6de06377d0 Fix documentation around the password parameter of builtin.user (#76702) 2022-01-18 13:14:51 -05:00
2e0fb34937 Change "fatal" to "error" in config docs to match actual behaviour (#76760) 2022-01-18 10:38:34 -05:00
7cd94dd452 Fix unsafe handling of variable PYTHON_BIN (#76767)
The previous state lead to errors, when cloning the repo to a path with spaces in it.
2022-01-18 16:13:33 +01:00
a0f6747f07 ansible-test: fix typo in validate-modules (#76765)
The correct error strategy for the to_text method is surrogate_or_strict

Signed-off-by: Dimitri Savineau <dsavinea@redhat.com>
2022-01-18 16:12:34 +01:00
89c884e2a2 include_vars initialize failed (#76754)
* include_vars initialize failed

  if source dir is given, but not present and traversal is empty you
  can end up trying to access failed w/o it ever being defined.

  also future proof for more corner cases in decision tree
2022-01-18 16:04:41 +01:00
4676c08f18 prevent fact gathering from breaking on bad caps (#76691)
* prevent fact gathering from breaking on bad caps

 fxies #75832
2022-01-14 13:24:50 -05:00
2246ed9678 ansible-config avoid _terms and _input in --only-changed (#76597)
dont display _terms or _intput on only changed
 those always change and it expected for the plugins that support them


Co-authored-by: Abhijeet Kasurde <akasurde@redhat.com>
2022-01-14 13:21:57 -05:00
0ff80a15ba ssh connection avoid parsiing own debug (#76732)
- Avoids false positives on become strings being echoed back 
   by ssh cli itself
  - added test for debug lines
  - also simplified some of existing test code
2022-01-13 16:28:09 -05:00
9142be2f6c Allow specifying specific python via shebang (#76677)
modules with python were always normalized to /usr/bin/python,
  while other interpreters could have specific versions.

* now shebang is always constructed by get_shebang and args are preserved
* only update shebang if interpreter changed
* updated test expectation
* added python shebang test
2022-01-13 15:05:58 -05:00
7fff408652 ansible-test - Remove azure support for Sherlock. 2022-01-13 10:38:22 -08:00
c8dd96b076 fact gathering, prevent "UnboundLocalError: local variable 'datafile' referenced before assignment" when open(path) fails. (#76751)
Co-authored-by: jean kahrs <j.kahrs@hosting.de>
2022-01-13 13:08:10 -05:00
e33e7233d0 docs: Update porting guide for ansible 5.2.0 (#76746) 2022-01-13 10:46:54 -05:00
3a891827b7 ansible-test - Remove AIX provisioning support. (#76747)
* ansible-test - Remove AIX provisioning support.
* Remove `skip/aix` integration test aliases.
* Remove build for AIX binary module.
2022-01-12 14:27:05 -08:00
bab315b780 ansible-test - Add support for FreeBSD 12.3. (#76745)
* ansible-test - Add support for FreeBSD 12.3.
* Use OS package for yaml if available with CLoader.
* Make sure libyaml is available.
2022-01-12 13:00:03 -08:00
20cc87f059 Expect upper case message 'levels' for galaxy publish results (#63530) 2022-01-13 06:36:51 +10:00
71f3996778 Added AIX CA certs search paths (#69776) 2022-01-13 06:19:40 +10:00
c1df36e3ae Update dnf tests to reflect new behavior. (#76743)
* Update dnf tests to reflect new behavior.

Previously dnf would report there was nothing to do when trying to install a package from the cache when it was not present.

A recent update to dnf has changed this behavior to match yum, resulting in a failure instead.

* Allow dnf to fail or report no changes.
2022-01-12 11:27:20 -08:00
665e3dc629 remove outdated note on limitations of R() in module docs (#76736) 2022-01-12 03:07:37 -08:00
b1ebc192b5 ansible-test - Update default containers. 2022-01-11 15:42:42 -08:00
d6588293fb ansible-test - Limit paramiko to < 2.9.0 2022-01-11 13:47:29 -08:00
76220c4a7b ansible-galaxy - fix the --ignore-certs flag for the implicit galaxy server (#76735)
* ansible-galaxy - fix the --ignore-certs flag for the implicit galaxy server

* changelog

* Add a test without the server config

* Fix respecting --ignore-certs for individual --server URLs also

* Update changelogs/fragments/76735-ansible-galaxy-fix-ignore-certs.yaml
2022-01-11 13:46:45 -06:00
01ba6d4a45 Fix C&P error (#76673) 2022-01-11 13:06:15 -05:00
f2c8b59eb1 Add Rocky to INTERPRETER_PYTHON_DISTRO_MAP (#76728) 2022-01-11 10:45:54 -05:00
f78deccec2 end_play: end the current play only (#76674)
Fixes #76672
2022-01-11 10:27:42 -05:00
4a62c4e3e4 apt: add support for package version >= (#75002)
This adds the ability to specify a package version using >=. This will ensure the package is at the specified version or above.

* If the package is not installed, the latest version will be installed.
* If the package is installed and less than the specified version, it will be upgraded.
* If the package is installed and greater than or equal to the specified version, it will be left alone.

The version selection is handled by Apt itself, so things like the system policy, pinning, etc, are considered.
2022-01-11 09:41:12 -05:00
a5bea8b2f5 fix typo (#76699) 2022-01-11 09:12:27 -05:00
0b6d3312dd enable module defaults for implicit gather_facts (#76053)
* deprecated default fact path setting
* subset and timeout on same boat
* avoid pushing module args when none

Co-authored-by: Sloane Hertel <19572925+s-hertel@users.noreply.github.com>
2022-01-10 17:25:00 -05:00
c53e6d94e9 Use antsibull 0.40.1 for docsite build (#76675) 2022-01-10 16:30:47 -05:00
c24c479061 Fix markup. 2022-01-10 12:36:19 -08:00
aa022dba2d ssh connection, handle 'fun' control paths (#76424)
* handle 'fun' control paths by quoting the option when passed to ssh cli

Co-authored-by: Matt Clay <matt@mystile.com>
2022-01-10 12:29:35 -05:00
0ef5274a3c Don't assert stdlib behavior, just assert that urllib was called 2022-01-10 08:55:31 -08:00
aaa7944b02 Fix tests failing on pytest 7 (#76670)
* Fix pytest 7 failures with leaky fixture
2022-01-07 15:53:44 -08:00
b30b8fb79c ansible-test - Set pytest rootdir option. 2022-01-07 15:52:55 -08:00
eaeec8a65c ansible-test - Use --forked instead of --boxed
The `--boxed` option is deprecated.
2022-01-07 12:50:45 -08:00
97104f1221 Avoid deprecated TestCase functions in unit tests. (#76678)
* Avoid deprecated TestCase functions in unit tests.
* Add assertRaisesRegex for Python 2.7.
* Fix indentation.
2022-01-07 12:31:11 -08:00
ace04087e7 Make all pipelining agree on ini entries (#76573)
* Make all pipelining agree on ini entries, corrected descriptions
2022-01-07 14:47:18 -05:00
b17557ae8e Add check_mode tests for shell/command/script and make skipped=True/changed=True mutually exclusive (#76429)
* Add additional tests for check_mode with shell/command/script
* update check_mode documentation: if a module/action is not skipped in check mode and accurately reflects whether a change is made to the remote support should be 'full'
* Make reporting skipped in check mode mutually exclusive with 'changed: True'
* Add missing documented attributes
* Fix tests to expect skipped=True and changed=True do not occur together
* Fix script check_mode support documentation
* Fix earlier changelog
* document platforms attribute
* Use tasks's check mode since the value from PlayContext does not reflect loop items

Co-authored-by: Brian Coca <bcoca@users.noreply.github.com>
2022-01-07 14:15:05 -05:00
a08bcca934 Update local_mods in git.py to show destination of conflict (#72405)
Git module, specify that the local modification is in the destination directory so that some of the users clearly understand this..
2022-01-07 14:13:04 -05:00
094a0746b3 ansible_concat: return strings only unless eval (#76634)
Fixes #76610
2022-01-07 17:13:34 +01:00
b984dd9c59 package_facts: Support pkg_info OpenBSD, FreeBSD and NetBSD (#76580) 2022-01-07 09:59:21 -05:00
0502a03579 hostname: add support for openEuler distro (#76619) 2022-01-07 11:51:31 +05:30
2285483a59 Remove obsolete incidental tests from matrix.
The removed matrix entries no longer run any tests.
2022-01-06 19:41:41 -08:00
aa67ff2cf2 Remove shebangs from core Python modules. (#76664)
* Remove module shebangs.
* Relax shebang check in validate-modules.
* Add changelog fragment.
2022-01-06 17:33:14 -08:00
ffd0343670 add systemd alias check (#76608)
* add systemd alias check

* add .yml

* Delete 75538-systemd-alias-check

* Update lib/ansible/modules/systemd.py

Co-authored-by: Abhijeet Kasurde <akasurde@redhat.com>

Co-authored-by: Abhijeet Kasurde <akasurde@redhat.com>
2022-01-07 06:10:29 +10:00
4d380dcbaa More auto info (#76598)
* make auto invenory plugin a bit more informative

* clog
2022-01-07 05:21:13 +10:00
66e392d4e2 user: Update logic to check if user exists in macOS (#76592)
'dscl -list' returns 0 even if the user does not exists. This
leads to errorenous condition in user module.
Using 'dscl -read UniqueID' can return if user exists or not.

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2022-01-07 05:18:39 +10:00
8e0654504f stat document 'version' return doc (#76589)
* stat document 'version' return doc

	fixes #76588

* str

* no output_dir for you!
2022-01-07 05:16:01 +10:00
15ace5a854 ansible-galaxy - validate version for directories and collections in git repos (#76579)
* Ensure the version is valid for directories and collections in git repos before installing

Fix the error message for invalid semantic versions

* Make requested changes

* Add a test case for unhandled ValueError exception

* Add changelog

* Update lib/ansible/galaxy/collection/galaxy_api_proxy.py

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

* Reword error message

Include link to learn how to compose a semver version

* Move version validation into the caller, find_matches

* Add tests for more invalid version types

* Remove unused import

Fix raising unexpected error

* Update lib/ansible/galaxy/collection/__init__.py

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

* Update lib/ansible/galaxy/dependency_resolution/providers.py

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

* Update lib/ansible/galaxy/dependency_resolution/providers.py

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

Co-authored-by: Sviatoslav Sydorenko <wk.cvs.github@sydorenko.org.ua>
2022-01-07 05:05:20 +10:00
6e57c8c084 Add missing typing import for _distro.py.
See: 116cdad222/distro.py (L42-L72)
2022-01-05 10:55:04 -08:00
7e814dd4db ansible-test - Fix plugin loading.
This fixes a traceback when loading plugins that use dataclasses.
2022-01-05 10:04:32 -08:00
d2daa67b00 ansible-test - Fix type hints. 2022-01-05 10:04:06 -08:00
16def8050a facts - Set correct OS family for EuroLinux (#76624)
Co-authored-by: Abhijeet Kasurde <akasurde@redhat.com>
2022-01-05 09:57:29 +05:30
a5f4a25d32 Fix wait_for integration test.
Pin the `psutil` package to 5.8.0 since 5.9.0 is broken on macOS.
2022-01-04 11:29:43 -08:00
a1d0e60703 Fixed documentation: "[a] ini file" -> "an ini file" (#76627) 2022-01-04 10:57:37 -05:00
fdf12542b2 Fix typo in task name (#76642) 2022-01-04 10:35:40 -05:00
aa4f23dc97 Fixed documentation: "do not needed -> do not need" (#76617) 2021-12-29 11:40:13 +05:30
594b11dc0c unarchive: Keep stderr when pick_handler fails (#76365)
* fixes #28977

* Include the original error message when pick_handler fails

* Add a test to unarchive a tar file with an invalid extra option

* add a changelog
2021-12-23 16:01:56 -05:00
fa617fcd7b Disable the _distutils_hack in newer setuptools (#76600)
* Disable the _distutils_hack in newer setuptools. Doesn't fix the underlying issue of the venv finding the _distutils_hack of a setuptools that is not its own.

ci_complete

* re-throw blanket
2021-12-23 10:20:24 -08:00
eedf2e476c check for indirect service in systemd (#76462)
* check if service is indirect status / add integration test

* Update changelogs/fragments/76453-indirect-systemd-status.yml

Co-authored-by: Abhijeet Kasurde <akasurde@redhat.com>

* simplify indirect check / remove integration test restriction on rhel9

* add dummy indirect service for integration tests
2021-12-23 10:35:28 -05:00
43e99e4132 Adding modularity tag to task modularity.yml (#76557)
Co-authored-by: Martin Banas <mbanas@redhat.com>
2021-12-22 14:55:09 -05:00
e2d1dbbdc5 Docs: update porting guide for ansible 5.1.0 (#76595) 2021-12-21 13:35:53 -05:00
67e5649a26 Adds documentation about when/why to use roles (#76560)
Co-authored-by: Brian Scholer <1260690+briantist@users.noreply.github.com>
2021-12-21 11:15:48 -05:00
4c738b08b4 Add docs on Windows module util requirements (#76583) 2021-12-20 14:19:34 -05:00
8a4090f749 Do not format the choice as a definition list for non-mapping values (#76568) 2021-12-20 14:18:04 -05:00
7dd22b8b4b Update Windows host requirements (#76582) 2021-12-20 13:43:01 -05:00
5db1d11c19 Replace "Encrypt" with "Hash" for prompt documentation (#76584)
Co-authored-by: Sviatoslav Sydorenko <wk.cvs.github@sydorenko.org.ua>
2021-12-20 11:53:56 -05:00
66720460d0 more exact wording of system_tmpdirs (#76587) 2021-12-20 11:51:12 -05:00
47e2a26959 Update playbook_tests with type testing (#72732) 2021-12-20 09:48:30 -05:00
601d66c7e5 k8s: Migrated scenario guides to collection (#75249)
Kubernetes scenario guides are moved to
``kubernetes.core`` collection.

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2021-12-17 13:49:26 -05:00
ee777567bc Update intro_inventory.rst (#76340) 2021-12-14 16:36:41 -05:00
f9c24c2899 Document get_url module check_mode support right (#76433) 2021-12-14 16:07:05 -05:00
e5967c02f5 Fix typos in docs (#76526) 2021-12-14 15:54:32 -05:00
29d57b5b97 Clarify include parameter in unarchive (#76543)
Co-authored-by: s-hertel <19572925+s-hertel@users.noreply.github.com>
2021-12-14 15:36:55 -05:00
9d1898b1ef Use correct markup in documentation (#76545) 2021-12-14 15:30:58 -05:00
6ee58056da docs: Update porting guide for ansible 4.10.0 (#76559) 2021-12-14 15:18:10 -05:00
49e1cb9f42 unarchive: fix non-english locales (#76542)
* unarchive: fix non-english locales

For GNU Gettext, the LANGUAGE environment variable takes precedence over LANG or LC_ALL. On systems where LANGUAGE was set to a non-english locale, the output of the tar command therefore not understood and the module failed silently ("changed": false, but the archive was not extracted).

* add tests

* changelog
2021-12-14 12:31:01 -05:00
146a4bcd0d Fix docs for installing from a git repo (#76350) 2021-12-14 10:34:32 -05:00
9dac51f25a Update special_variables.rst (#76360) 2021-12-14 10:32:20 -05:00
ac2bdd6834 Fix AttributeError when providing file via --conn-password-file (#76534)
Fixes #76530
2021-12-14 10:07:36 -05:00
8a562ea14a Resolves #76449 Misplaced added version info (#76539)
`.. versionadded::` are coming right after the section tittle, and was misplaced here
2021-12-13 15:23:50 -05:00
461f30c160 yum: avoid storing unnecessary cache data (#76345)
Fixes #76336
2021-12-13 17:38:20 +01:00
4e70156d7e ansible-test - Code cleanup. (#76540)
* Add missing typing imports.
* Remove unnecessary non-capturing group.
* Whitespace.
* Add type hints.
* Ignore PyCharm false positives.
* Remove Python 2.x plugin loading logic.
* Remove Python 2.x exception handling.
* Remove Python 2.x display logic.
* Add changelog.
2021-12-10 15:49:51 -08:00
21b9389a02 ansible-test - Remove invalid type hint. 2021-12-10 12:54:12 -08:00
470c89518c ansible-test - Fix delegation from install. 2021-12-10 12:29:13 -08:00
aaa10cd506 plugins/dnf, plugins/yum: implement sslverify option (#76356) 2021-12-10 11:53:21 +01:00
2058ea5991 Clarify unroll in _finalize (#76436)
Clarifies that unrolling in _finalize is actually necessary. Also using
decorator directly.
2021-12-10 11:35:40 +01:00
ed6581e4db check finder type before passing path (#76448)
* check finder type before passing path

ci_complete

* Reduce nesting

* Test find_module does not cause a traceback with Python 3 FileFinder

* Update lib/ansible/utils/collection_loader/_collection_finder.py
2021-12-09 16:05:58 -08:00
c819c1725d Remove withought typo (#76524)
Found on https://github.com/ansible/ansible-navigator/issues/689 as
we are using codespell, maybe Ansible core could benefit from it.
2021-12-09 16:43:10 -05:00
d0de3d3dc2 change keyword return to results (#76515)
value is getting associated to python keyword return
2021-12-09 14:23:07 -05:00
894fbd6990 pkg_mgr: prohibit pkg5 usage on Altlinux (#76457)
Filter out the /usr/bin/pkg because on Altlinux it is actually the
perl-Package (not Solaris package manager).
Since the pkg5 takes precedence over apt, this workaround is
required to select the suitable package manager on Altlinux.
2021-12-09 12:47:27 -05:00
bc753c0518 Add openrc support to service_facts (#76373)
* Add openrc support to service_facts

Co-authored-by: Clément Martin <clement.martin@onespan.com>
2021-12-09 12:38:41 -05:00
0cec4d1cfc remove aws from the azure note (#76518) 2021-12-09 09:05:45 -08:00
16cdac66fe ansible-test - Use ansible-core for docs links. 2021-12-09 08:58:14 -08:00
19a58859d6 AnsibleJ2Template should be based on NativeTemplate (#76471)
Fixes #76442

ci_complete
2021-12-09 17:29:38 +01:00
37c80ea893 template lookup: jinja2_native has no effect if global is off (#76385)
This is documented behavior that was unintentionally changed in #75587.
2021-12-09 10:04:19 -06:00
e56e47faa7 ansible-test - Fix import test for collections. 2021-12-08 15:53:38 -08:00
0df60f3b61 per marketing request - add note for AAP on Azure availability (#76512) 2021-12-08 14:17:50 -08:00
82f59d4843 ansible-test - Hide ansible._vendor in import test (#76503) 2021-12-08 12:04:45 -08:00
bccfb83e00 add intersphinx mapping for Ansible 5 (#76470)
* add intersphinx mapping for Ansible 5

* add the other files
2021-12-08 06:10:05 -08:00
c45989c76f ansible-test - Remove RHEL 8.4 support. 2021-12-07 19:00:52 -08:00
97ef1d031c Revert "ansible-test - Fix import test when vendoring."
This reverts commit 33a8d06332.
2021-12-07 17:22:54 -08:00
8482ee4e9a galaxy build - ignore existing MANIFEST and FILES (#76479) 2021-12-07 16:37:28 +01:00
7830e5308e add tencentos fact distro (#76459)
Fixes #76459

Co-authored-by: Abhijeet Kasurde <akasurde@redhat.com>
2021-12-07 16:20:07 +01:00
472028c869 catch the case that cowsay is broken (#76326)
* catch the case that cowsay is broken

fixes https://github.com/ansible/ansible/issues/72582

  add changelog
  raise Exception for broken cowsay
  add test for broken cowsay

Co-authored-by: Matthias Bernt <m.bernt@ufz.de>
2021-12-07 09:11:06 -05:00
60d094db73 Docsite/dev_guide: add note about ansible-test utility installation ways (#76128)
* Docsite/dev_guide: add note about ansible-test utility installation
* Add link to Testing Ansible page
2021-12-07 03:18:32 -08:00
41ee4a5b12 ansible-test - Fix traceback in validate-modules test. 2021-12-06 15:45:57 -08:00
33a8d06332 ansible-test - Fix import test when vendoring. 2021-12-06 14:31:55 -08:00
47448f1458 Add 'default' to 'env' lookup (#76327)
* Add 'default' to 'env' lookup

Co-authored-by: Sloane Hertel <19572925+s-hertel@users.noreply.github.com>
2021-12-02 17:06:36 -05:00
3fe42e106c Remove finalize from globals (#76439) 2021-12-02 12:00:27 -08:00
4e7be293a5 Properly set finalize for the new environment (#76435)
* Properly set finalize for the new environment

Fixes #76379

* Fix sanity
2021-12-02 11:55:28 -08:00
eca97a19a3 Handle HTTPError being partially initialized due to the error. Fixes #76386 (#76421) 2021-12-02 11:42:29 -08:00
82ff7efa94 Fix how/what+look/like grammar in dev process doc (#76410) 2021-12-02 11:37:44 -08:00
5b2334983c Fix more 'playbook'/'play' conflation (#76387) 2021-12-02 11:26:25 -08:00
d22bdcfdc7 ansible-test - Update NIOS container to 1.4.0. 2021-12-02 11:04:48 -08:00
bf1e1d286d docs: Update porting guide for Ansible 5.0.1 (#76444) 2021-12-02 13:27:45 -05:00
b02168d644 better handling of sudo flag replacement (#76389)
* better handling of sudo flag replacement
2021-12-02 11:58:01 -05:00
480d47d071 reset defaults for json filters (#76349)
* reset defaults for json filters

  these had change on unification of json parsing/dumping
  now they behave like before, but are still controllable by user.
2021-12-02 11:02:38 -05:00
de11a1ce78 fix shell/command/script tasks skipping in check mode (#76353)
* fix shell/command/script tasks skipping in check mode

* changelog
2021-12-01 15:58:15 -05:00
b50f16db91 Update collection loader for Python 3.10 (#76225)
* Implement find_spec and exec_module to remove reliance on deprecated methods in the collection loader

ci_complete

* Move module execution to exec_module

Remove extra sys.modules handling

Use default module initialization by returning None from loader.create_module

Refactor

ci_complete

* Remove ansible-test's copy of the collection loader

ci_complete

* Fix metaclass for Python 2.x

ci_complete

* Fix Py2/Py3 syntax compatibility

* Refactor

ci_complete

* update collection_loader comments

ci_complete

* simplify find_module

ci_complete

* Fix Py2 compatibility - don't get loader from nonexistent spec

Remove unnecessary PY3 checking

* Refactor common code in load_module and exec_module

ci_complete

* tidy diff

ci_complete

* Include collection_loader in target paths for 'compile' sanity test

* add changelog

* Add "return None" instead of doing it implicitly

Remove get_filename

short-circuit exec_module if it's a redirect

ci_complete
2021-12-01 09:47:10 -08:00
1d1597ffd9 Docs: Update porting guide for Ansible 5.0.0 (#76404) 2021-11-30 10:52:58 -05:00
392b16c21c Test integration of loop and until options (#44927)
Ref #44741
Ref ansible/proposals#140

* Replace select filter with a more portable thing
* Add context
    This is needed for split controller/remote

Co-authored-by: Sam Doran <sdoran@redhat.com>
2021-11-30 10:11:27 -05:00
862a2a3599 set latest Ansible version to 5 (#76304) 2021-11-30 06:41:20 -08:00
a1205d52ce update release and maintenance for Ansible 5 (#76301) 2021-11-30 06:40:44 -08:00
b9b69c1135 Docs: Update porting guide for ansible 4.9.0 (#76363) 2021-11-29 11:16:26 -05:00
cd2d8b77fe apt - add allow_change_held_packages option (#73629)
* Add changelog fragment and integration tests
* Break up function signature into multiple lines
    It passed the 160 character width. Change it to multi-line for easier reading
    and better diffs in the future.
* Remove unused import
* Update version added for new feature
* Move changelog fragment to correct location

Co-authored-by: Thomas Stähle <thomas.staehle@check24.de>
Co-authored-by: Sam Doran <sdoran@redhat.com>
2021-11-29 10:31:54 -05:00
0afc0b8506 Add a link to the Ansible 5.x changelog (#76352)
The 5.x changelog is available, add a link to it.
2021-11-23 09:25:51 -08:00
23414869e2 update Edit on Github hint (#76341) 2021-11-22 08:28:34 -08:00
f59d0456e1 galaxy: raise error when inaccessible path is specified multiple times (#76318)
Fixes #76316
2021-11-22 13:28:02 +01:00
0ddaf6edd6 Reduce number of iterations through PlayIterator (#74175)
* Reduce number of iterations through PlayIterator

ci_complete

* Use the new set method

ci_complete
2021-11-22 10:23:34 +01:00
d8aeffc8b7 Add macOS 12 to CI (#76328)
* Disable lookup_url test of macOS 12
2021-11-19 21:18:31 -05:00
5cbcf7c7bf Fix galaxy.collection.galaxy_api_proxy types 2021-11-19 16:36:25 -08:00
0360728b7f Fix typo in docs for "globbing" (#76324)
Constent with the rest of the documentation including fileglob.
2021-11-19 09:37:15 -08:00
1b34933414 Fix ansible-doc -l ansible.builtin / ansible.legacy (#76235) 2021-11-19 10:29:47 -05:00
c379e61b8b Update docs build requirements to most recent versions of dependencies (#76283)
* align requirements files to more recent versions

* bump up to latest antsibull

* update sphinx in rstcheck requirements

* update to dependency versions that sphinx 4.2 pulls in

* use same no-cap spelling
2021-11-19 03:17:50 -08:00
04698b0c41 Add porting guide entry for fetch_url change in behavior (#76314) 2021-11-19 05:05:32 +10:00
c8a14c6be8 ansible-test - Update base and default containers. 2021-11-17 17:03:14 -08:00
bb63c97c16 ansible-test - Update import test and sanity requirements. (#76308)
* Add script to freeze sanity requirements.
* Declare sanity test requirements and freeze
* Use pinned requirements for import.plugin test.
* Expand scope of import test for ansible-core.
* Add ignores for galaxy import errors.
* Update test-constraints sanity test.
2021-11-16 18:16:42 -08:00
21ac52435b ansible-test - Add support for RHEL 8.5 instances. (#76305)
* ansible-test - Add support for RHEL 8.5 instances.
* Clear libdnf checksum cache from unsigned package in dnf integration test.

Co-authored-by: Matt Martz <matt@sivel.net>
2021-11-16 16:35:00 -08:00
d0ec236d4a Update porting guide for Ansible 5.0.0b2 (#76303) 2021-11-16 11:56:08 -05:00
4073a22d55 uri module improvements (#50771) 2021-11-16 10:44:44 -06:00
c9d4b6bfb0 Removed local variable 'lowered_choices' because the value is never used (#76295) 2021-11-16 10:24:44 -05:00
a71ba817b0 ansible-test - Remove unused test constraint. 2021-11-15 13:50:52 -08:00
5e3d469738 ansible-test - Remove near-EOL test containers.
- fedora33
- centos8
2021-11-15 13:40:37 -08:00
0668538a3e Default callback result format (#76166)
* First pass of adding yaml result format output to default callback

* Add clog frag

* flow style always false

* Further normalization of results across distros

* no lossy, now pretty

* Fix env var in runme.sh

* Rename variable to better self document

* include NativeJinjaUnsafeText

* Linting cleanup

* Add tests specific to the prior yaml callback

* Make data munging more exact, following the checks in libyaml/pyyaml

* Remove unused import

* Extend comment

* more correct and some comments

* Fix consistency of tab vs space in this section of the file

* Add str representer

* be cooler

* faster character filtering

* Clarify None as a sentinel for default behavior

* Flip filtering logic to avoid CRLF issues with 'space break' filtering

* Py3 change and comment about the use of __call__

Co-authored-by: Matt Davis <mrd@redhat.com>
2021-11-15 13:19:11 -08:00
fd4460c1e4 docs/best_practices: all contained vault passwords required when using inventory (#75976) 2021-11-15 16:18:48 -05:00
08af0fbf95 Unbreak hostname.RedHatStrategy (#76032)
- On Python 3, decode bytes to str
- Tolerate whitespace around the line.
- Report a missing HOSTNAME line as an error.
- Don't clobber line separators when setting a new hostname.
- Add some tests for this strategy to verify correct operation.
2021-11-15 07:15:20 +01:00
abac141122 fix support containers under podman (#76292)
* `podman inspect` falls back to a same-named image if the named container is not present; since eg `http-test-container` is both the name of the image and container, it wasn't working properly under podman in many instances. Switching to `docker|podman container inspect` limits the query to containers only for both podman and docker, allowing the support container detection/creation to work properly.
2021-11-12 16:59:09 -08:00
382a353234 No longer needed to fall back to sha (#76281) 2021-11-12 08:32:31 +01:00
fb55d878db psrp - remove deprecated psrp put_file code (#76252)
* psrp - remove deprecated psrp put_file code

* Removed unused import and fix missing var
2021-11-12 10:57:28 +10:00
a734da5e82 Restore documentation on M() and R() (#76284)
* Undo most of bf9944266c, add note on where R() does not work.
Co-authored-by: Brian Scholer <1260690+briantist@users.noreply.github.com>
2021-11-11 15:26:26 -05:00
b7a5fd6be9 Fixed typo in keyword_desc.yml (#76280)
The description of 'max_fail_percentage' had a typo.
2021-11-12 05:17:08 +10:00
95e120ed02 Keep pre Python 3.10 literal_eval behavior (#76261) 2021-11-12 05:12:46 +10:00
fe77bc9e3c Validate some markup in documentation in validate-modules (#76262)
* Validate some markup in documentation.

* Add changelog fragment.

* Use urlparse instead of URL regex.

* Document new error code.

Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
2021-11-11 13:44:15 -05:00
9985b8a975 ansible-test pssa update and new rules (#76256) 2021-11-10 17:04:39 -08:00
90de24da7b Docs: Link to valid data types for role parameters (#76276) 2021-11-10 10:06:33 -05:00
b6725ec6c9 Fix pip integration test.
- Use `fallible==0.0.1a2` instead of `black==19.10b`
- Test on both Python 2 and 3.
2021-11-09 14:35:39 -08:00
be2bd2f1af Documentation for other types in collection requirements.yml (#75872) 2021-11-09 15:18:51 -05:00
55dc75b8c8 Update porting guide for Ansible 5.0.0b1 (#76263) 2021-11-09 14:05:28 -05:00
22eb4a9ce0 Remove edit on github from collection pages (#76259)
* remove main index page from Edit on Github
* remove all collection index pages from Edit on Github
2021-11-09 06:51:54 -08:00
f6ec773e6e Update porting guide Python 2.7+ wording. (#76258) 2021-11-09 09:22:16 -05:00
5c225dc0f5 Introduce public methods to access PlayIterator._host_states (#74416) 2021-11-09 08:07:51 +01:00
d7fbb209b4 ansible-test - Fix collection import test priming.
The bug was introduced in https://github.com/ansible/ansible/pull/76137
2021-11-08 17:50:02 -08:00
74dc830dd4 Use new codecov uploader (#75938)
* Use new codecov uploader
* Rewrite coverage uploader in Python
2021-11-08 14:50:54 -08:00
54f64982fb apt - remove obsolete documentation (#76243)
The lock_timeout feature was recently added to the apt module making
this section in the documentation no longer necessary
2021-11-08 16:29:21 -05:00
b16d5ff7a7 set 2.12 to latest (#76191)
* set 2.12 to latest
* add 2.10 back
2021-11-08 08:07:22 -08:00
d0c1e5a46d Update release/maint page for 2.12 release (#76205)
* make changelogs more visible and fix a broken link

* add 2.12 changelogs

* add eol column
2021-11-08 10:28:50 -05:00
f42ffe16d2 ansible-test - Add Fedora 35 test container. (#76228)
* ansible-test - Add Fedora 35 test container.
* Added Fedora 35 to CI and removed Fedora 33 from CI.
* Fix dnf integration test.
* Fix connection_paramiko_ssh test.
2021-11-04 17:20:17 -07:00
57989c2bcb Remove install of setuptools in venv for pip test.
This task was previously added in https://github.com/ansible/ansible/pull/25243 as a work-around for a setuptools bug.

The pinned version does not work with Python 3.10, and the task should no longer be needed.
2021-11-04 14:12:13 -07:00
39509ff216 Fix pip test to use setup_remote_tmp_dir. 2021-11-04 13:47:20 -07:00
a861cb5607 ansible-core 2.12 dropped support for galaxy.yaml. (#76179) 2021-11-04 15:15:22 -04:00
a1236a582c Stop using "checksumming" instead of "encrypting" in the docs (#76168)
* Hashing is not encrypting

All encryption systems have a formal inverse function to decrypt
A hash is a one way function without inverse by definition

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

Co-authored-by: Sandra McCann <samccann@redhat.com>
2021-11-04 20:06:02 +01:00
730194e2b6 ansible-test - Add RHEL 9 support. (#76217)
* Move RHEL pip package install into function.
* Add RHEL 9 support to bootstrap script.
* ansible-test - Add RHEL 9 support.
* Add install and uninstall instructions for RHEL9 to paramiko tests
* Skip incidental_inventory_docker_swarm on RHEL 9.
* Update dnf tests for rhel9
* Fix prepare_http_tests on RHEL 9.
* fix RHEL9 Python discovery tests to match distro map
* Skip subversion test on RHEL 9.0b.

Co-authored-by: Matt Martz <matt@sivel.net>
Co-authored-by: Matt Davis <mrd@redhat.com>
2021-11-04 10:48:34 -07:00
1b43298316 Update dev guide for vars plugins in collections (#75861) 2021-11-04 10:22:55 -04:00
17ec2d4952 check /.dockerenv and /.dockerinit to guess a dockercontainer (#74349)
* use os.path.exists for docker-check

Co-authored-by: Jacob Floyd <cognifloyd@gmail.com>
2021-11-03 15:26:36 -04:00
636b317a4f update backport instructions for 2.12 (#76209) 2021-11-03 10:10:57 -07:00
27a5116e19 Explicitly require iptables for incidental_setup_docker on RHEL8 (#76212) 2021-11-03 12:03:45 -05:00
c56d98e738 Fix broken M() refs. (#76202) 2021-11-02 15:22:16 -04:00
db2aee558b LinkUtil - ignore LIB env var (#76184) 2021-11-03 04:47:28 +10:00
2fd26ea35a docs: Update porting guide for Ansible 5.0.0a3 (#76201) 2021-11-02 14:17:10 -04:00
2de7c59930 docs: Update porting guide for Ansible 4.8.0 (#76197) 2021-11-02 14:15:03 -04:00
150faf25d3 dnf: add more specific error message for GPG check (#76194)
Fixes #76192
2021-11-02 15:01:12 +01:00
fdc3348859 Docs: Add skeleton roadmap for Ansible 6 (#76130)
* add skeleton roadmaps
* fix spacing
* correct link
* remove skeleton
2021-11-02 04:55:50 -07:00
444f5ff74e Remove redundant docs targets from Makefile. (#76059)
All of the targets, with the exception of `alldocs`, simply run the same target from `docs/docsite/Makefile`.
2021-11-01 13:07:14 -04:00
b5ed41edb3 Skip recursive suboption validation if sub_parameters is not a dict (#75635)
* Skip recursive suboption validation if sub_parameters is not a dictionary

* Ensure sub parameter elements is a sequence to prevent iterating over string characters and causing duplicate error messages for the same param
2021-11-01 12:06:49 -04:00
7bec196061 loop/fact delegation fix (#75768)
now set_fact and include_vars intermediate results are congruent with delegation
2021-11-01 11:25:10 -04:00
8bbecc7cac exhaust list of vault ids before failing (#75540)
* Try to find any valid vault id before raising an exception
* Apply the same logic during vault password file loading
* Also. Improve the warning msg and tests
2021-11-01 11:15:50 -04:00
47ee282227 Parser errors from within includes should not be rescueable (#73722)
* Parser errors from within includes should not be rescueable
* Also fixes unit tests
Fixes #73657
2021-11-01 11:05:39 -04:00
d23226a6f4 deprecate scp_if_ssh (#75218)
* deprecate scp_if_ssh

Co-authored-by: Matt Martz <matt@sivel.net>
2021-11-01 10:49:48 -04:00
dd220ddc2f Add a YAML representer for NativeJinjaUnsafeText (#76186) 2021-11-01 08:31:49 -05:00
e84d660140 Update playbooks_tests.rst (#76047) 2021-10-29 16:27:57 -04:00
2955ff57a7 Fix module name (#76058) 2021-10-29 16:26:51 -04:00
765924a3a4 Add reminder about groups default behavior in user module (#76096) 2021-10-29 16:01:21 -04:00
f92830d16e Fix zip content filtering in unarchive module (#76069)
When we introduced an include parameter to the unarchive module, we
inadvertenly flipped the exclusion logic. This flip meant that the
unarchive module started rejecting files that should be extracted.

This commit flips the bad logic and adds some tests that will make
sure things do not go bad again.
2021-10-29 15:12:24 -04:00
173550f932 use filesystem object instead of specific objects (#76054)
since the fragment is imported by different modules that support
 different set of filesystem objects

 fixes #72375
2021-10-29 11:41:12 -04:00
d17f9a523d Docs: fedora32 is no longer supported (for integration tests) (#76159) 2021-10-29 11:29:32 -04:00
e0e6464873 Docs: Fix text for contributing to collection link (#76174) 2021-10-29 11:17:12 -04:00
360a3d2431 Clarify that "requires_ansible" means Ansible Core (#76100)
Clarify that the `requires_ansible` field in meta/runtime.yml refers to the version of Ansible Core (ansible-core), not any package called "ansible" e.g. https://pypi.org/project/ansible/
2021-10-29 08:01:51 -07:00
0b0acef423 bug fix: using non-FQDN in plugin choices fails plugin name verification (#75991)
* enable both non-FQDN and FQDN plugin name
* add info about matching requirement of plugin name in config and plugin source file
2021-10-28 11:06:51 -04:00
3a9e42cfde Docs: Change API endpoint for hub to console.redhat.com in user guide (#76080)
The cloud.redhat.com has changed to console.redhat.com
2021-10-28 05:57:38 -07:00
e50ad6f118 ansible-test: Set max number of open files in containers to 10240 (#75498) 2021-10-27 14:00:14 -07:00
1ab2443e2d ansible-test - Update default containers. 2021-10-27 13:25:38 -07:00
19c8790251 2.13 schedule (#75843) 2021-10-27 15:12:30 -05:00
4abc669c24 Update module documentation about ref links (#76088)
* Update module documentation about ref links
2021-10-27 14:23:45 -04:00
cc3f1d238c Add Jinja2 version runtime check (#76141) 2021-10-27 11:41:11 -05:00
26707a3c6b Heisen jinja2_native (#75587)
* Use NativeEnvironment for all templating

ci_complete

* Keep Templar.copy_with_new_env for backwards compat

* Mention that AnsibleUndefined.__repr__ changed in the porting guide

* Templar.copy_with_new_env backwards compat

* ci_complete
2021-10-27 11:36:33 -05:00
caec2b9d29 Revert "Revert AnsibleCollectionConfig Py3 only change (#76104)"
This reverts commit 04e30d9002.
2021-10-26 16:31:28 -07:00
97f729c3d6 Fix Windows CI scripts.
The scripts now use `--list-targets -v` instead of `--explain` to evaluate changes.

This is faster and does not trigger parsing of a non-existent inventory file.
2021-10-26 15:26:34 -07:00
6b8ed23926 Update argcomplete install via apt command (#76139)
To install `argcomplete` on Ubuntu 21.10 we need to update the install line to use Python3
2021-10-26 11:29:23 -04:00
395e5e20fa PlayIterator: use enums for states (#74511) 2021-10-26 10:16:17 +02:00
cd64e0b070 ansible-test - Fix import test on old Pythons. (#76137) 2021-10-25 17:53:05 -07:00
cae7d2a671 Overhaul ansible-test integration tests. (#76111)
* Overhaul ansible-test integration tests.
* ansible-test - Fix import test pyyaml usage.
* ansible-test - Remove unused import.
* ansible-test - Fix traceback when pip is unavailable.
* ansible-test - Fix typo in port forwarding message.
* ansible-test - Fix controller logic in requirements install.
* Fix unit tests in ansible-test integration test.

Unit tests are now run for available Python versions which
provide `virtualenv` (Python 2.x) or `venv` (Python 3.x).
2021-10-25 16:32:15 -07:00
b9694ce4fb ansible-test - Remove duplicate code. 2021-10-25 15:30:06 -07:00
9b4f9e9fd3 Drop python2.6 support in module execution (#76106) 2021-10-25 08:41:51 -05:00
b4cbe1adcf ansible-test - Fix Python real prefix detection. 2021-10-21 15:28:48 -07:00
0bf7b3f4ef Fix ansible-galaxy collection verify subcommand help message. (#76108)
* Fix ansible-galaxy collection verify subcommand help message.

* changelog
2021-10-22 07:50:33 +10:00
e40a0e5c90 Don't use output_dir in target tests (#76107)
* Don't use output_dir in user tests

* Move blockinfile tests from using output_dir to depending on setup_remote_tmp_dir

* Don't use output_dir in git tests

* Don't use output_dir in uri tests
2021-10-21 10:59:48 -05:00
04e30d9002 Revert AnsibleCollectionConfig Py3 only change (#76104) 2021-10-21 08:07:23 -05:00
0f95371131 Start of moving away from six (#75863)
ci_complete
2021-10-21 10:40:04 +02:00
7621784b94 Require Jinja2 3.0.0 (#75881)
* Require Jinja2 3.0.0

ci_complete

* Fix sanity

* Remove Jinja min/max tests

* ansible-test changes

* ci_complete

* More cleanup

ci_complete

* Revert _count_newlines_from_end :( and other stuff

* Fix sanity

* It's using host_vars ...

* Unused import

* Remove overridden groupby filter

* environmentfilter -> pass_environment

* Explain preserve_trailing_newlines

* Add changelog

* ci_complete

* Deprecated ANSIBLE_JINJA2_NATIVE_WARNING

* native_helpers.py cleanup

* More cleanup in the find intgration test
2021-10-20 12:22:29 -05:00
835fe71828 Docs: fix link to 2.12 changelog (#76091) 2021-10-20 08:28:39 -07:00
66a83314b9 Modernize install (#76021)
Co-authored-by: Matt Clay <matt@mystile.com>
Co-authored-by: Matt Davis <mrd@redhat.com>
Co-authored-by: Sviatoslav Sydorenko <wk.cvs.github@sydorenko.org.ua>
2021-10-19 14:24:57 -05:00
43d09710c8 Update porting guide for Ansible 5.0.0a2 (#76083) 2021-10-19 13:30:42 -04:00
afb8a008c2 Remove incidental_deploy_helper 2021-10-19 08:46:49 -07:00
2f3fbaac3c Remove unused test/support plugins (#76078) 2021-10-19 08:45:15 -07:00
227f4398c2 Fix choices for return values. (#76070) 2021-10-19 17:22:32 +02:00
6e6f846db1 Add space to error message output (#76063) 2021-10-19 17:18:30 +02:00
3add434269 add missing space to --playbook-dir help string (#76062) 2021-10-19 17:17:49 +02:00
0c1b839c10 Remove incidental_win_copy
ci_complete
ci_coverage
2021-10-18 13:18:35 -07:00
90f670090c Remove incidental_setup_tls
ci_complete
ci_coverage
2021-10-18 11:42:09 -07:00
7e79411701 Remove incidental_cs_common 2021-10-18 11:40:19 -07:00
d099e19796 ansible-test - Move constants to remove symlink. 2021-10-18 10:25:15 -07:00
23f95300bd Intentional tests (#76051)
ci_complete
ci_coverage
2021-10-18 10:28:20 +02:00
58744acb84 Remove centos8 from CI matrix. 2021-10-15 16:06:18 -07:00
80f4b67f43 Removed unused test/support modules (#76048) 2021-10-15 09:48:14 -07:00
817e1045bb Update network_resources.rst (#76040)
* Update network_resources.rst

I am not sure a fully qualified URL should be here... but teach me great documentation gods

* Change platform index external link to internal ref

Co-authored-by: Aine Riordan <44700011+ariordan-redhat@users.noreply.github.com>
2021-10-15 08:48:30 -04:00
96372cecea Remove unused variables from Makefile. 2021-10-14 18:29:32 -07:00
2af4d30b9b Remove incidental mongodb tests.
They no longer provide unique coverage.

ci_complete
ci_coverage
2021-10-14 17:41:37 -07:00
cca9013df8 Remove incidental_win_data_deduplication test.
It no longer provides unique coverage.

ci_complete
ci_coverage
2021-10-14 15:39:04 -07:00
4cf290918f docs: clarify skip_broken option in dnf/yum (#76038) 2021-10-14 12:10:53 -07:00
9a0fe18915 allow override of PYTHON variable (#76023) 2021-10-14 12:04:52 -07:00
7cf29ded9c Intentional tests
ci_complete
ci_coverage
2021-10-14 11:52:06 -07:00
609cba5017 Remove incidental_win_dsc test.
It no longer provides any unique test coverage.

ci_complete
ci_coverage
2021-10-14 11:01:53 -07:00
fae0cf4c51 Remove unofficial packaging.
Unofficial packaging should be maintained externally since
it is not tested in CI or used in the official release process.

Maintainers of unofficial packages are better equipped with the necessary
expertise and testing resources to support alternative packaging.
2021-10-14 09:52:26 -07:00
319b50f04c Fix subversion test.
Switch to a different repo that isn't giving 503 errors since GitHub hasn't fixed the issue yet.
2021-10-14 09:48:00 -07:00
ff792d252e Docs: dash - character invalid in playbook names in collections(#75891)
* collection playbooks, note no -
fixes #75890
2021-10-14 08:25:14 -07:00
9eeaf1c5b5 Docs - add code-block:: wrapping for playbooks filter doc (#75953)
* Add code-block
Co-authored-by: Abhijeet Kasurde <akasurde@redhat.com>
2021-10-14 08:11:24 -07:00
aff5e5dfc6 _run_loop: Add the task name to the warning (#76012)
Prepend the task name to the warning "The loop variable 'item' is
already in use", so that you can get some context even if stdout and
stderr go to separate places.
2021-10-14 10:31:04 -04:00
64506c7d15 Docs: Change note for rackspace cloud guide (#75898)
* Fix rackspace cloud guide docs
* Fix syntax error
2021-10-14 05:29:07 -07:00
67c12fc4eb Docs - Fix "kubernetes.core" typos in code snippets (#75930)
Replace "kuberernetes.core" with "kubernetes.core" in filter examples.
2021-10-14 05:23:14 -07:00
93a6299cd3 docs: Update porting guide for Ansible 4.7.0 (#76034) 2021-10-14 06:54:39 +01:00
3d46670622 Remove incidental_win_ping test. (#76031)
It no longer provides any unique test coverage.

ci_complete
ci_coverage
2021-10-13 12:58:30 -07:00
2437fb3718 Add more ansible-test cloud tests. 2021-10-12 17:10:18 -07:00
b1211429d5 Fix executing includes in the free strategy (#75649)
Fixes #75642
2021-10-12 18:15:37 +02:00
7a28246248 validate_modules: allow 'choices' for return values (#76009)
* Allow 'choices' for return values.
2021-10-12 11:29:27 -04:00
1ea74f4dd6 Misc typo fix (#76008)
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2021-10-12 11:28:20 -04:00
e53982cd09 The apt module won't work with python-apt < 0.8.9 (such as on Ubuntu 10.04) (#75993)
* Check if deb file to deploy has architectures attribute, fixes ansible#47277
2021-10-12 11:24:40 -04:00
f7b7cf6753 Add vim undo files to .gitignore (#75979) 2021-10-12 11:13:59 -04:00
fa4a92f221 Docs: Add code-block:: to examples in ipaddr filters doc(#75951)
* Add code-block elements to playbooks_filters_ipaddr
* Add punctuation to lead-in sentences for code blocks
2021-10-12 05:08:52 -07:00
2a3aa66fbd docs - wrap examples in code-block:: in sample setup (#75964)
* docs: Use code-block to format code in sample setup
Fixes #75905
Co-authored-by: Abhijeet Kasurde <akasurde@redhat.com>
2021-10-12 04:21:30 -07:00
4444692436 Docs: add code-block:: to playbook variables doc in user guide(#75985)
* update code-block formatting changes.
2021-10-12 03:09:11 -07:00
6bf65f6246 Docs - Added code-block:: wrappers in playbook tests doc (#75952) 2021-10-12 02:39:52 -07:00
6319a0f415 docs - Wrap examples in code-block:: in loops guide (#75916)
* docs - Use code-block to format examples in loops guide
Resolves #75900
2021-10-12 02:25:13 -07:00
afbef70bad documenting_modules_network.rst: Add missing space (#75972) 2021-10-12 11:42:10 +05:30
d6dbc1a26f docs - Change :: to code-block:: in error handling guide (#75978)
Fixes #75908
2021-10-11 15:18:07 -07:00
4d8a724071 docs - Replace :: with code-block:: in playbooks_conditionals doc (#75965)
Fixes #75906
2021-10-11 14:40:01 -07:00
d26ff4e376 Docs: changed :: to code-block:: in 9 files (#75994)
* Fixed 9 files in user guide
2021-10-11 14:28:07 -07:00
221c7373db docs - Add code-block to code examples in playbooks_strategies.rst (#75960)
Fixes ansible#75911.
2021-10-11 13:53:45 -07:00
fd346565d3 docs - wrap examples in code-blocks in playbooks_vars_facts.rst (#75961)
Fixes ansible#75912.
2021-10-11 13:28:35 -07:00
37eefb47c5 Docs: Add code-blocks to examples in Windows-WinRM guide (#75974)
Co-authored-by: Holger Dörner <h.doerner@bitexpert.de>
2021-10-11 13:15:10 -07:00
84ec976378 Docs: Add code-blocks to Playbooks-Delegation in user guide(#75973)
Co-authored-by: Holger Dörner <h.doerner@bitexpert.de>
2021-10-11 12:59:42 -07:00
d0edf69fe0 docs: code-block wrapping for playbooks_debugger.rst (#75968)
* code-block wrapping for playbooks_debugger.rst #75919
Co-authored-by: Abhijeet Kasurde <akasurde@redhat.com>
2021-10-11 12:43:22 -07:00
cd540544fd Docs: add code block elements in user_guide/playbooks_async.rst (#75947)
* Fix for code block
2021-10-11 11:30:39 -07:00
fffa9412f4 Docs: add code blocks elements for user_guide/vault.rst (#75963)
* feat:(docs) add code blocks elements for user_guide/vault.rst
Addresses issue #75921
Co-authored-by: Abhijeet Kasurde <akasurde@redhat.com>
2021-10-11 11:09:18 -07:00
71811407c5 Docs: code-block wrapping for playbooks_checkmode.rst #75925 (#75931)
* code-block wrapping for playbooks_checkmode.rst #75925
* Fixes typo in previously introduced code-block
Co-authored-by: Abhijeet Kasurde <akasurde@redhat.com>
2021-10-11 10:42:06 -07:00
22a540e109 Docs: Code-block wrapping for playbooks_startnstep.rst #75934 (#75943)
* Code-block wrapping for playbooks_startnstep.rst #75934
Co-authored-by: Abhijeet Kasurde <akasurde@redhat.com>
2021-10-11 10:07:16 -07:00
5c4bbed2de Docs: Add code-blocks to user guide doc (#75928)
* Add code-block elements to 5 examples

* Add :
2021-10-11 08:48:45 -07:00
81eec4a05a Docs: code-block wrapping for playbooks_module_defaults.rst #75936 (#75942) 2021-10-11 05:14:56 -07:00
a2ff765e06 Docs: add code-blocks to User Guide modules_intro (#75932) 2021-10-11 04:26:53 -07:00
a4a7a34893 Docs: Add code-blocks to user_guide/intro_patterns.rst (#75941) 2021-10-08 14:12:06 -07:00
4381336fbb Docs: issue 75922 add code-blocks to user_guide/playbooks_environment.rst (#75929)
Add code-blocks in the 6 outlined examples from the Issue
2021-10-08 13:27:33 -07:00
b03afeec6c Adding code-block elements in user_guide/playbooks_prompts.rst (#75935) 2021-10-08 13:01:50 -07:00
d0b88eecd8 Code block format user guide/windows setup.rst #75914 (#75956)
* set changes for code boxes.

* post changes to attempt to fix seealso links.

* attempting to fix seealso tag

* fix un-indention for sanity check.
2021-10-08 10:49:45 -07:00
89bc7ebfe6 code-block wrapping for playbooks_advanced_syntax.rst (#75981)
* code-block wrapping for playbooks_advanced_syntax.rst

* fixed spacing
2021-10-08 10:13:46 -07:00
8e77943a97 remove fest banner (#75901)
* remove fest banner

* fix nit
2021-10-08 08:30:19 -07:00
5cb1210f82 ansible-test - Update base and default containers.
- The containers are now based on Ubuntu 20.04 instead of Ubuntu 18.04.
- The default Python version used for the containers is now Python 3.10.
- The included version of PowerShell was upgraded to version 7.1.4.
- The included version of shellcheck was upgraded to version 0.7.0.

ci_complete
2021-10-07 23:04:31 -07:00
801eb73ccb ansible-test - Update Python constraints. (#75959)
* Remove obsolete constraints.
* Simplify constraints.
* Add changelog fragment.
2021-10-07 18:10:34 -07:00
7e19957afa ansible-test pslint - fix warning with nested objects (#75792)
* ansible-test pslint - fix warning with nested objects
2021-10-08 06:30:30 +10:00
8c3e576cd5 Fix docs get_url dest comment. Checksum does not prevent download if dest is dir. (#73185) 2021-10-07 15:35:43 -04:00
8510db4935 Allow ca_path to point to a bundle (#75894)
* Allow ca_path to point to a bundle. Fixes #75015
2021-10-08 05:04:48 +10:00
23b9d197eb ansible-doc: ignore plugin deprecation warnings (#75674)
Fixes #75671
2021-10-07 13:01:45 -05:00
8cef40f839 ansible-test - Fix inventory path. 2021-10-07 10:19:34 -07:00
801db758d3 code-block wrapping for playbooks_best_practices.rst #75937 (#75939) 2021-10-07 09:56:24 -07:00
bc0caad2ad Fix parsing of device serial number for RHEL8 (#75876)
* Fix parsing of device serial number for RHEL8

* Add tests and changelog

Co-authored-by: Miroslav Brabenec <miroslav.brabenec@memsource.com>
2021-10-06 17:24:09 -04:00
9a4346bae3 Docs: Moves the AWS Scenario Guide out of the main docs (#74704)
* removes AWS scenario  guide, moving to collection

* first attept to replace TOC entries

* not sure what I did, but saving it

* updates TOCs to reflect new location of aws guide

* reinstates original page as a stub

* adds links to new location for AWS guide, updates header

Co-authored-by: Alicia Cozine <acozine@users.noreply.github.com>
2021-10-06 12:34:44 -07:00
2f531d73dd ansible-test - Update base and default containers.
The containers now include Python 3.10.0 instead of Python 3.10.0rc2.
2021-10-06 11:40:54 -07:00
8a295b8ada Remove incidental_cloud_init_data_facts integration tests (#75885)
* Remove incidental_cloud_init_data_facts integration tests

* Remove cloud_init_data_facts.py

* ci_coverage ci_complete
2021-10-05 16:14:37 -05:00
0c8b62b527 Update the porting guide for a new ansible version (#75893) 2021-10-05 15:17:10 -04:00
000ae00cfd Docs: Clarify adding newlines in YAML folded block scalar (#75875)
* Removed translatable words from code blocks

##### SUMMARY
Removed translatable words from codeblocks as per #59449

##### ISSUE TYPE
- Docs Pull Request

+label: docsite_pr

* Maintaining intend as well as clearity

* Preserving "save_as" as the key

* showing equivalence and keeping same context
2021-10-05 04:13:49 -07:00
19fce0527a docs - Use code-block to format code examples in Developer Guide (#75849)
Fixes #75663
2021-10-04 13:55:00 -07:00
8988f8ab5d Corrected mytask.yml file name (#75860) 2021-10-04 16:39:55 -04:00
20904c2fb6 Move ansible-5.1 to 2021-12-21 (#75865)
We moved the target date for ansible-5.0 one week back so there's now
time to do 5.1 before the holidays start.
2021-10-04 16:37:50 -04:00
4aede377d2 docs - Use code-block to format code examples in Community Guide (#75847)
Fixes #75675
2021-10-04 10:46:43 -07:00
4d398ca3a4 docs - Use code-block to format examples in Network Guide (#75850)
Fixes #75676
2021-10-04 10:29:14 -07:00
f4d4391a1f ansible-test - Update distro test containers. 2021-10-01 11:20:49 -07:00
1932f0008b ansible-core - Remove support for Python 2.6. (#75853) 2021-10-01 01:16:37 -07:00
099d80829f ansible-test - Fix inventory generation. 2021-09-30 19:03:09 -07:00
68ab92e22a ansible-test - Remove support for Python 2.6.
Deferring removal of obsolete constraints until container updates are required.
2021-09-30 14:13:50 -07:00
827981c7dd Add support for distinct collection skeleton configuration (#75845)
Signed-off-by: Jeremy Kimber <jeremy.kimber@garmin.com>

Co-authored-by: Jeremy Kimber <jeremy.kimber@garmin.com>
2021-09-30 14:13:15 -07:00
3ef8782b90 Fix sanity test ignores. 2021-09-30 13:58:27 -07:00
e9c27c99dd Fix up deprecation removal changelog headers (#75848) 2021-10-01 06:37:45 +10:00
9de4f24d7a test support ec2_ami_info: remove ec2_ami_facts name deprecation (#75841)
Fixes #75829
2021-09-30 12:50:48 -07:00
f774292439 cli - remove deprecated setting verbosity before sub command (#75840)
* cli - remove deprecated setting verbosity before sub command

Fixes #75823

* Fix tests
2021-09-30 12:50:18 -07:00
239dbcb24f copy: remove deprecated thirsty alias (#75839)
Fixes #75824
2021-09-30 12:48:48 -07:00
44095caca9 url_argument_spec: remove deprecated thirsty alias (#75838)
Fixes #75825
Fixes #75826
2021-09-30 12:48:10 -07:00
13e535c3bc Remove deprecated Templar.set_available_variables() (#75836)
Fixes #75828
2021-09-30 12:46:07 -07:00
963a272b28 uri: add documentation for return value path (#75795) 2021-09-30 12:26:33 -07:00
bb59d9afe9 bump devel to 2.13 (#75833) 2021-09-30 09:18:32 -05:00
927ffe26b7 Docs: add install link for windows (#75811) 2021-09-29 08:04:35 -07:00
5d1abdbf6b correct runas comment (#75806) 2021-09-28 18:02:01 -04:00
a9bd8b6cff No Ansible Engine (#75812) 2021-09-28 12:25:15 -05:00
79e9dae292 Don't show params when there is an issue with set_option(s) (#75805) 2021-09-28 11:25:25 -05:00
8643db5ac3 Bump antsibull version to get support for attributes and CLI options (#75787)
* Bump antsibull version to get support for attributes and CLI options.

* Include fix for attributes.

* Include fix for rst_epilog collision and for #75799.
2021-09-27 16:52:05 -04:00
a160eeedd8 2.13 changelog cleanup (#75800) 2021-09-27 10:21:22 -05:00
2934c4f710 ansible is now ansible-core in AUR too (#75145) 2021-09-27 10:46:42 -04:00
872fda8815 attribs last PR for now ... i hope (#75778)
* attribs last PR for now ... i hope

* thatsallfolks!

* fixes

* Update lib/ansible/modules/template.py

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

* Update lib/ansible/modules/validate_argument_spec.py

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

* moar fixes

* asldf

* missing import

* iswearihadaddedthese

Co-authored-by: Matt Martz <matt@sivel.net>
2021-09-24 15:55:44 -07:00
a22964609e Fix lineinfile test (#75785)
* fix remote test after controller split

* other files had it too!
2021-09-24 15:43:22 -07:00
0d5a9f2138 ansible-test - More PEP 484 type hints. 2021-09-24 15:17:21 -07:00
263fd64759 updated ansible.cfg to guide stray link devel link (#75782)
* updated ansible.cfg to guide stray link devel link
2021-09-24 16:25:41 -04:00
e66e2e25c8 ansible-test - Update default containers. 2021-09-24 13:19:10 -07:00
845935f74f Revert "Compile role with parents in the task's dependency chain (#75165)" (#75779)
This reverts commit 440cf15aeb.
2021-09-24 15:30:35 -04:00
6a5d6896fd ansible-test - Warn about stale sanity venvs. 2021-09-24 12:16:35 -07:00
b70077364a ansible-test - More PEP 484 type hints. 2021-09-24 11:57:25 -07:00
6981237130 ad-hoc: add documentation about pattern (#73303)
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2021-09-24 14:40:13 -04:00
e2ad9f1c85 Changed to file instead path for touch choice in state parameter docs (#75282) 2021-09-24 14:36:28 -04:00
0cb7a4d260 clarify order (#75338) 2021-09-24 14:35:35 -04:00
e021a65403 using FQCN also for ansible.builtin collection (#75644) 2021-09-24 14:34:20 -04:00
e5a52c1e9d added section about parallelism to delegation (#74158) 2021-09-24 14:21:13 -04:00
d3ebbef075 correct dedupe scope (#75422) 2021-09-24 14:20:43 -04:00
f4cdea9645 docs - add some info on plugin option source precedence (#75754)
* docs - add some info on plugin option source precedence

##### SUMMARY
Add some clarity on precedence, especially from sources of the same type.


##### ISSUE TYPE
- Docs Pull Request

+label: docsite_pr

* update RST formatting

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

Apply review suggestions

Co-authored-by: Aine Riordan <44700011+ariordan-redhat@users.noreply.github.com>

Co-authored-by: Aine Riordan <44700011+ariordan-redhat@users.noreply.github.com>
2021-09-24 10:50:32 -07:00
5183a2e585 Add note about loop_control.extended memory impact (#75759)
* Add note about `loop_control.extended` memory impact

* moar correct
2021-09-24 10:35:44 -07:00
65b5472ad1 Update roadmap to indicate branching happens at feature freeze (#75777) 2021-09-24 11:59:58 -05:00
a5e7ed0cc5 Update ansible porting guide for 4.6.0 release. (#75752) 2021-09-24 11:07:15 -04:00
58b03be417 ansible-test - Code cleanup. (#75774)
* ansible-test - Remove unused code.
* ansible-test - More PEP 484 type hints.
2021-09-24 00:38:56 -07:00
6c133da45e ansible-test - Fix code coverage reporting. (#75771) 2021-09-23 21:24:01 -07:00
43e1cba8c1 Fix up validate-modules sanity check for PowerShell - ci_complete 2021-09-23 20:39:05 -07:00
b51e62f6e5 ansible-test - Add minimum constraints for pytest.
Use `--strict` for `pytest` on Python 2.6 since `--strict-markers` is not available.
2021-09-23 17:18:57 -07:00
a2d4a8a9f3 PowerShell - Support optional module util imports (#75187) 2021-09-23 16:47:10 -07:00
e3fd9b0769 ansible-test - Add --prime-containers option.
Resolves https://github.com/ansible/ansible/issues/75320

The option `--prime-containers` was chosen over `--docker-pull-only` to match the recently added `--prime-venvs` option for sanity tests.
It would also fit well with a future `--prime-requirements` option for pre-installing requirements for unit and integration tests.
2021-09-23 15:52:34 -07:00
28a094c5de ansible-test - Remove unused constraints.
ci_complete
2021-09-23 12:48:44 -07:00
67ca455829 attributes: support extra value 'not applicable' for support (#75751)
* Support two extra values 'unknown' and 'not applicable' for support.

* Simplify to only one new state: 'n/a'

* Adhere to the IBM style guide.
2021-09-23 15:02:59 -04:00
c5d8dc0e11 Add attributes 2/x (#75619)
* Added attribute information to more modules

 rearranged the shared data
 platform revamped
 use 'details' and avoid overriding description

Co-authored-by: Sloane Hertel <19572925+s-hertel@users.noreply.github.com>
Co-authored-by: Felix Fontein <felix@fontein.de>

* Update lib/ansible/plugins/doc_fragments/action_core.py

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

* Update lib/ansible/plugins/doc_fragments/action_core.py

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

* Update lib/ansible/plugins/doc_fragments/action_core.py

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

* Update lib/ansible/plugins/doc_fragments/action_core.py

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

* Update lib/ansible/plugins/doc_fragments/action_core.py

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

* Update lib/ansible/modules/fail.py

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

* Update lib/ansible/modules/debug.py

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

* Update lib/ansible/modules/command.py

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

* Update lib/ansible/modules/assert.py

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

* Update lib/ansible/plugins/doc_fragments/action_core.py

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

* Update lib/ansible/modules/gather_facts.py

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

* Update lib/ansible/modules/include_vars.py

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

* Update lib/ansible/modules/meta.py

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

* Update lib/ansible/modules/meta.py

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

* Update lib/ansible/plugins/doc_fragments/action_common_attributes.py

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

* Update lib/ansible/plugins/doc_fragments/action_common_attributes.py

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

* Update lib/ansible/plugins/doc_fragments/action_common_attributes.py

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

Co-authored-by: Sloane Hertel <19572925+s-hertel@users.noreply.github.com>
Co-authored-by: Felix Fontein <felix@fontein.de>
2021-09-23 12:48:28 -05:00
78ff1ab546 Add constraints to prepare_http_tests target. 2021-09-23 00:14:43 -07:00
46c7b24188 ansible-test - Update distro test containers. (#75762) 2021-09-22 19:41:08 -07:00
5cb54e8c58 ansible-test - Create injector scripts at runtime. (#75761)
* ansible-test - Create injector scripts at runtime.
* Set bootstrap.sh shebang at runtime.
* Remove shebang and execute bit from importer.
* Update shebang sanity test.
* Preserve line numbers.
2021-09-22 16:01:42 -07:00
440cf15aeb Compile role with parents in the task's dependency chain (#75165)
* Use the task dependency chain to compile the role instead of the parent role's _parents list

* keep existing role inheritance, but limit it to roles in the current task dependency chain

* Test getting role parents recursively by using the current task dependency chain

* changelog
2021-09-22 17:08:00 -04:00
7a76130502 ansible-test - Update default containers.
ci_complete
2021-09-22 09:59:55 -07:00
96b221b344 Update vendored copy of distro to 1.6.0 (#75732)
* Update vendored copy of distro to 1.6.0

* copy pasta mistake

* ci_complete
2021-09-22 11:43:25 -05:00
7a4b5d14fc ansible-galaxy role install: download from API response location (#73114)
* download role from api response location

* include changelog fragment

* add unit test for role download url

Co-authored-by: Sam Doran <sdoran@redhat.com>
2021-09-22 10:39:58 -04:00
57359d0174 use passlib default if password_hash option isn't set (#75043)
* add changelog fragment
* password_hash|length == 120
* mention the new default bcrypt format in the porting guide
2021-09-21 17:35:53 -04:00
7ecc227488 ansible-galaxy: Clone git collections using shallow clones (#75722)
* ansible-galaxy: Clone git collections using shallow clones

This ensures the collection obtained via git url is a result of a
shallow git clone (git clone --depth=1). The git history of the
collection is not used by ansible, and as such, cloning the entire
history of the repo is unnecessary.

Signed-off-by: Tomas Babej <tomas@tbabej.com>

* ansible-galaxy: Only perform shallow clones on non-versioned git urls

In general, the version can be anything we can checkout (branch, tag,
but also a commit hash). In particular for commit hashes we cannot
perform a shallow clone.

Err on the safe side and only perform shallow clones for non-versioned
git urls (cloning HEAD).

* galaxy-install: Make shallow cloning compatible with older Python versions

Signed-off-by: Tomas Babej <tomas@tbabej.com>

* Pass args as a tuple

Add tests for the git command created from different repo and version combinations

* changelog

Co-authored-by: Tomas Babej <tomas@tbabej.com>
2021-09-21 15:45:28 -04:00
724800cd3f Python 3.8 Controller Minimum (#74013) 2021-09-21 13:43:31 -05:00
4ab90f3afc Re-enable old_style_cache_plugin test target (#75748)
Fix tests for cache plugins written before ConfigManager
2021-09-21 14:20:50 -04:00
4652d6ee43 ansible-test - Remove deprecated environments. 2021-09-21 08:38:12 -07:00
94410789d1 ansible-test - Add --prime-venvs option. 2021-09-21 00:03:33 -07:00
178a67fd40 ansible-test - Add support for windows/2022 (#75743)
ci_complete
2021-09-21 13:51:13 +10:00
4ea8d9a782 ansible-test - split controller/target testing (#75605) 2021-09-20 18:39:07 -07:00
989eeb243f Add an undef global Jinja function (#75435)
* add tests for fail filter

also tests that fail does not block inspectability

* add fail filter

fallback message is a bit clunky,
since you can't invoke a filter without specifying an input.
That is, "{{ fail }}" doesn't work,
so you have to do "{{ None | fail }}"

* document 'fail' filter

* add changelog fragment

* fail filter uses default message on Undefined or emptystring

makes it slightly easier to use the default message:
```diff
- "{{ None | fail }}"
+ "{{ '' | fail }}"
```

and the user sees a slightly more relevant message
if the message itself is undefined:

```diff
- The error was: {{ failmsg | fail }}: 'failmsg' is undefined
+ The error was: {{ failmsg | fail }}: Mandatory variable has not been overridden
```

* rebuild as the builtin `Undefined`

* harmonise `hint` parameter for make_undefined with jinja

* use code block for documentation item

[ref](https://github.com/ansible/ansible/pull/75435#discussion_r707661035)

* rename to `undef` to expose less Python into the Jinja

[ref](https://github.com/ansible/ansible/pull/75435#pullrequestreview-757799031)

* explicitly instantiate undefined value now that it's possible

see I knew we would break something with reflection

* preserve test coverage of undefined variable

Co-authored-by: Matt Davis <nitzmahone@users.noreply.github.com>
2021-09-20 15:37:36 -07:00
47b644570f facts: Add uptime fact for FreeBSD and Darwin (#75432)
This is a bit more complicated than on OpenBSD/NetBSD.

The code is inspired in part from https://github.com/Cairnarvon/uptime

Tested on the GCC compile farm: https://cfarm.tetaneutral.net/

Co-authored-by: Baptiste Jonglez <git@bitsofnetworks.org>
2021-09-20 16:57:52 +02:00
61f5c22551 Remove (only) user-facing use of ANSIBLE_ASYNC_DIR (#74249)
Change:
- Remove only user-facing use of ANSIBLE_ASYNC_DIR.
- Remove two comments saying to change things that, apparently, we
  aren't going to change...

Test Plan:
- ci_complete

Tickets:
- Fixes #74139
- Fixes #74138
- Refs #74226

Signed-off-by: Rick Elrod <rick@elrod.me>
2021-09-17 14:58:17 -05:00
1353678f23 Enable ansible-galaxy to specify client id override with Keycloak Token (#75601)
* Enable ansible-galaxy to specify client id override with Keycloak Token

* Specify ability to provide override of client_id

* Test client_id can be configured for individual servers

* Add issue link to changelog

* Document client_id as a config option and add an example

Co-authored-by: s-hertel <19572925+s-hertel@users.noreply.github.com>
2021-09-17 12:10:10 -07:00
54a795896a Integration test and sanity index generation fixes. (#75731)
* Fix test usage of `which python`.

Also use `command -v` instead of `which` where needed.

* Fix testing_formatter.sh file checking.

The index is longer expected to exist when generating it.
The generation script is run with `set -eux`.
2021-09-17 11:05:19 -07:00
b281f84bc4 Ignore support code in update-bundled test. 2021-09-17 10:42:30 -07:00
45459346ed Document diff mode support for apt_repository and cron (#75709) 2021-09-17 11:19:47 -04:00
f0d43cfffc Document validate_certs option for Galaxy server configuration (#75728)
Added in #75710
2021-09-17 10:58:31 -04:00
2346f93961 Docs: Fix section header notation in Style Guide (#75720) 2021-09-17 10:55:05 -04:00
17122edfc5 Docs: Fix section header notation in Developer Guide (#75721) 2021-09-17 10:52:46 -04:00
8dc5516c83 getent, fix returning mulitple results for key (#75620)
* getent, fix returning multiple results for key
* added return docs

Co-authored-by: flowerysong <junk+github@flowerysong.com>
2021-09-17 10:09:40 -04:00
097bc07b66 PowerShell - Ignore LIB env var when building C# code (#75698)
* PowerShell - Ignore environment variables when building C# code

* Just unset LIB for now

* Fix sanity issue
2021-09-17 08:07:40 +10:00
a11bb8b4d3 Revert "user - consistently create user home directory on Linux (#71952)" (#75704)
This reverts commit 2f7e0b8489.
2021-09-16 12:05:32 -07:00
72ba2bdc82 ansible-galaxy - add a per-server validate_certs option (#75710)
* Add a validate_certs option to galaxy server configuration

* Add a unit test for cert validation

* changelog
2021-09-16 13:54:52 -04:00
9558f53a58 Fix git submodules path issue (#75655)
* Fix git path used for submodules

* Fix git submodules integration test
2021-09-16 09:46:50 -04:00
3d081b6ca5 Docs: Edit list of locations to search for roles (#75703)
* Docs: Add playbook base dir to roles search

* Docs: Add link to default roles path
2021-09-16 06:42:14 -07:00
c3fc8fb99a apt module: add option to allow package downgrades (#74852)
* apt module: add option to allow package downgrades

* Add new option to module so users don't have to force downgrades which
  is insecure and dangerous

* Add integration tests similar to upgrade integration tests

* Changelog

* Update changelog fragment

* Update changelogs/fragments/74852-apt-allow-downgrade.yaml

Co-authored-by: Amin Vakil <info@aminvakil.com>

* Update lib/ansible/modules/apt.py

Co-authored-by: Amin Vakil <info@aminvakil.com>

* Update lib/ansible/modules/apt.py

Co-authored-by: Amin Vakil <info@aminvakil.com>

Co-authored-by: Amin Vakil <info@aminvakil.com>
2021-09-14 17:46:56 +02:00
b1527dcf63 Small typo in vars plugin example. (#75702) 2021-09-14 10:18:04 -05:00
208014422d Fix markdown links that were errantly formatted as rst (#75697) 2021-09-14 10:15:37 -05:00
3d83c325dd Fix metadump (#75668)
* ensure dump produces json

* clog and tests

* remove library additions since they are not usable

* avoid any/all dirs

* ensure we dont use local dir as playbookdir
2021-09-14 10:05:21 -05:00
469b559ebe Try all galaxy servers when locating available versions for a collection (#75468)
* If an exception occurs when getting a collection's metadata, continue to the next in the server list.

* Warn for unknown exceptions when finding versions of a collection

* Test that an invalid server is no longer fatal if a subsequent server has the collection

* Fix server for verify tests - compare checksums against the server from which it was installed

* Add tests for verify and fix that code path to mirror install/download behavior for server errors

Co-authored-by: Sviatoslav Sydorenko <wk.cvs.github@sydorenko.org.ua>
2021-09-14 09:40:48 -04:00
01f0c38aa5 Docs: Update cross reference tag syntax in User Guide (#75693) 2021-09-13 10:19:48 -04:00
3e7a622204 Fix unexpected exception when a role has an empty argument_specs.yml (#75604)
* Fix role with empty argument_specs.yml

* Use try/except and add changelog fragment

* Always return a dict

* Add test for empty argument_specs key
2021-09-10 14:35:41 -04:00
55d448baa7 Run apache via async (#75682) 2021-09-10 12:02:58 -05:00
649a5bbda2 Fix cleaning up user for unarchive tests (#75681)
Become root to clean up user

Clean up users with force and remove enabled

Co-authored-by: Matt Martz <matt@sivel.net>
2021-09-10 12:44:42 -04:00
05464a0ff7 Ensure we set perms on htpasswd file to avoid permissions errors (#75679) 2021-09-10 11:06:43 -05:00
7cbb53fe9a Fix test interactions by cleaning up users with the same uid by using 'force: yes' and 'remove: yes' (#75670)
Co-authored-by: Matt Martz <matt@sivel.net>
2021-09-09 18:32:21 -04:00
63413dd483 Remove incidental_win_security_policy (#75654)
* Add an intentional test for diff.prepared

ci_complete
ci_coverage

* Remove incidental_win_security_policy

* Forgot to remove this
2021-09-09 12:17:48 -07:00
c2fa71c4e8 Fix various typos in documentation (#75662)
* docs/docsite/rst/dev_guide/developing_modules_general_aci.rst: fix typos

* docs/docsite/rst/dev_guide/testing/sanity/no-get-exception.rst: fix typos

* docs/docsite/rst/dev_guide/testing_units_modules.rst: fix typos

* docs/docsite/rst/network/dev_guide/developing_resource_modules_network.rst: fix typos

* docs/docsite/rst/porting_guides/porting_guide_2.0.rst: fix typos

* docs/docsite/rst/porting_guides/porting_guide_2.10.rst: fix typos

* docs/docsite/rst/porting_guides/porting_guide_2.4.rst: fix typos

* docs/docsite/rst/porting_guides/porting_guide_3.rst: fix typos

* docs/docsite/rst/porting_guides/porting_guide_4.rst: fix typos

* docs/docsite/rst/reference_appendices/glossary.rst: fix typos

* docs/docsite/rst/reference_appendices/release_and_maintenance.rst: fix typos

* docs/docsite/rst/scenario_guides/vmware_rest_scenarios/collect_information.rst: fix typos

* docs/docsite/rst/scenario_guides/vmware_rest_scenarios/vm_tool_information.rst: fix typos

* docs/docsite/rst/scenario_guides/vmware_scenarios/vmware_inventory_vm_attributes.rst: fix typos

* docs/docsite/rst/user_guide/playbooks_debugger.rst: fix typos

* docs/docsite/rst/user_guide/playbooks_filters.rst: fix typos

* docs/docsite/rst/user_guide/windows_performance.rst: fix typos

* docs/docsite/rst/scenario_guides/vmware_scenarios/vmware_inventory_vm_attributes.rst: fix typos
2021-09-09 08:34:46 -07:00
8d84f3c593 Fix fetch integration test. (#75661) 2021-09-08 22:11:40 -07:00
12734fa21c yaml dumper: Add YAML respresenter for AnsibleUndefined (#75078)
Fixes: #75072

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2021-09-07 10:21:47 +05:30
de01db08d0 pip - Use pip from the current Python interpreter. (#75634)
* pip - Use pip from the current Python interpreter.

If `executable` and `virtualenv` were not specified, and
the `pip` Python module is available for the current interpreter,
use that `pip` module instead of searching for a `pip` command.

* Add comment about needing `__main__` to run `pip`.

* Fix unit test.

* Add porting guide entry.

* Update changelog to match porting guide description.

ci_complete
2021-09-03 15:17:43 -07:00
fc8197e326 AnsiballZ - Make sure cwd is accessible. (#75636) 2021-09-03 08:31:20 -07:00
e60ee82343 docs: clarify that known_hosts path must exist (#75615)
* docs: clarify that known_hosts path must exist

Fixes #75606

* Clarify clarification.
2021-09-02 12:43:19 -07:00
ccf8a7da82 Modify getent example; closes #75624. (#75633)
* Adds "ansible_facts." in front of each getent example.
2021-09-02 15:27:17 -04:00
7ff2a55f3f psrp - fix typo (#75617)
psuedo -> pseudo
2021-09-02 15:17:26 -04:00
90518d8bb5 added vault/unvault docs (#75140) 2021-09-01 16:49:21 -04:00
5ecbc199f8 ssh connection added option priority note (#75219) 2021-09-01 16:48:06 -04:00
8af54a0355 Added info about playbooks for collection (#75535)
*
2021-09-01 16:40:03 -04:00
2c67954f9b Docs: adds warning about utf-8 in templates (#75504) 2021-09-01 16:21:18 -04:00
0ef9b9ee49 Update the porting guide for a new ansible version (#75610) 2021-09-01 15:44:07 -04:00
dcd31da01a clarify cacheable (#75085)
* clarify cacheable

* Update lib/ansible/modules/set_fact.py

Co-authored-by: Abhijeet Kasurde <akasurde@redhat.com>

Co-authored-by: Abhijeet Kasurde <akasurde@redhat.com>
2021-09-01 15:42:24 -04:00
f38a97cece Fix build_ignore when installing a collection from source (#75547)
* Make individual dirs that should exist instead of using shutil.copytree

* Test build_ignore when installing collections in git repos

* changelog

* Fix assertion
Fix git directory

* Fix nested content while building the collection dir

Test installing a collection from a git repo and artifact have the same result

Refactor to use variables
2021-09-01 18:36:09 +02:00
d6dededab8 Use context manager for file handling in some system modules. (#65227) 2021-09-01 11:29:35 -04:00
9c2f44b884 Fix templating task action with host-specific vars (#75600)
Fixes #75568
2021-08-31 17:33:57 +02:00
bee5e02232 Rename integration test targets.
Improve consistency with naming of tests for Ansible CLI commands.
Fix naming of module_utils tests to match the files under test.
2021-08-30 17:11:07 -07:00
388760eef6 Docs: Add more Matrix documentation (#75588)
* Refs #75478 - On the communicating page, add Matrix links to first 4 chat spaces, improve introduction, update working groups with Matrix and IRC locations, add a link to the community FAQ, add localised community translations, and remove Lightbulb room, the GitHub project has been archived

Co-authored-by: Alicia Cozine <879121+acozine@users.noreply.github.com>
2021-08-30 18:44:27 -05:00
2462ec74a0 validate_args_spec, use combine vars and in precedence (#75471)
* combine vars and in correct precedence
* add examples
2021-08-30 13:56:23 -04:00
e5f6c2d141 Fix rekey_on_member when key is undefined (#75131)
* Fix rekey_on_member when key is undefined and add a test case

* Add documentation about error handling in filter and test plugin sections
2021-08-30 12:03:42 -04:00
051a257092 Add attributes a-c (#75561)
* removed redundant notes
2021-08-30 11:28:00 -04:00
bbf5bbd8e4 removing out of date example ansible.cfg (#75193)
removing  out of date example ansible.cfg, show user how to generate from ansible-config

Co-authored-by: Alicia Cozine <879121+acozine@users.noreply.github.com>
2021-08-30 11:25:13 -04:00
db3e8f2c1c import_role - support templating _from_files with --extra-vars (#75269)
* Support templating _from_files with --extra-vars for imported roles

* Add tests for templating the filenames for import_role, import_playbook, and import_tasks

* Add documentation

Co-authored-by: Alicia Cozine <879121+acozine@users.noreply.github.com>
Co-authored-by: Martin Krizek <martin.krizek@gmail.com>
2021-08-30 10:34:16 -04:00
d36116ef1c dnf: ensure we use the correct locale for dnf API (#75264)
Fixes #75021
2021-08-30 14:22:00 +02:00
e35e8ed2ec makes Fest link from docs trackable (#75594)
Co-authored-by: Alicia Cozine <acozine@users.noreply.github.com>
2021-08-27 15:51:57 -05:00
747789787b added a caveat to say check individual module documentation for compatibility (#75582) 2021-08-27 20:33:31 +05:30
74f5367673 Ensure heuristic_log_sanitize returns correct data if no password found (#75570)
* Ensure heuristic_log_sanitize returns correct data if no password found. See #75542

* Need to allow code to flow through
2021-08-26 12:13:51 -07:00
d83acc1c4c Slip ansible 5 release [alternative] (#75529)
* Fix link to core roadmap

* Slip ansible 5 release to account for ansible-core slip.
2021-08-26 13:53:01 -04:00
3d7f2a1366 Fix an exception when passlib library is used with a wrapped algo (#75527)
* Test a passlib wrapped algo with a password lookup

* Fix error when passlib is used with a wrapped algo

The exception was:

     An unhandled exception occurred while running the lookup plugin 'password'.
     Error was a <class 'TypeError'>, original message: issubclass() arg 1 must be a class

and can be reproduced using the following command:

    ansible localhost -i localhost, -mdebug -amsg="{{ lookup('password', '/dev/null encrypt=ldap_sha512_crypt') }}"

The concerned algo are: bsd_nthash, django_argon2, django_bcrypt, ldap_bcrypt,
ldap_bsdi_crypt, ldap_des_crypt, ldap_hex_md5, ldap_hex_sha1, ldap_md5_crypt,
ldap_pbkdf2_sha1, ldap_pbkdf2_sha256, ldap_pbkdf2_sha512, ldap_sha1_crypt,
ldap_sha256_crypt, ldap_sha512_crypt, roundup_plaintext
2021-08-26 09:58:42 +10:00
baa20fba2f allow vars_files to use dwim (vars/) and vaults (#75526)
* allow vars_files to use dwim (vars/) and vaults

*  also fixed bug with temp file cleanup, some pythons dont like it when you alter loop

Co-authored-by: Brian Scholer <1260690+briantist@users.noreply.github.com>
2021-08-25 14:04:27 -04:00
bb2e45873c updated 'Installing Ansible on Debian' details (#75567) 2021-08-25 13:43:48 -04:00
b37a0630da Revert "use versioned doclink for url references (#74245)" (#74782) 2021-08-24 12:35:37 -05:00
59dd5704ca Allow make docs to use PYTHON variable (#75559)
The GENERATE_CLI command does not take into account a user overriding
the PYTHON variable.

Signed-off-by: Paul Belanger <pabelanger@redhat.com>
2021-08-24 11:29:28 -04:00
2ba9e35d09 yum: fix yumstate when wildcards are used in list arg (#75545)
Fixes #74557

* map is not available on centos 6's jinja...
2021-08-24 11:17:08 -04:00
3ca50a2200 Clarify get_bin_path error message (#75544) 2021-08-24 11:16:12 -04:00
ff72908b4d Fix --list-hosts when undefined var is used (#75533)
fixes #75354
2021-08-23 15:17:19 -04:00
a661e44f6e Update the porting guide for a new ansible version (#75457) 2021-08-20 11:53:23 -04:00
1dc495405f Added missing colon in note (#75465)
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2021-08-20 11:49:28 -04:00
51f2f1ac5e yum: fix parsing of check-update with subsequent empty lines (#75452)
Rather than adding further complexity to the regex, preprocess the output to
remove any empty lines. Now the only purpose of the regex is to fix
wrapped lines.

Fixes #70949
2021-08-20 11:30:33 -04:00
9505f8c75d dnf: allow for download_only to be run without root (#75532)
Fixes #75530
2021-08-20 05:20:53 +10:00
91319c5cfc Avoid accessing delegated vars when you dont have a host (#75524)
* avoid getting delegated vars w/o inventory host

 fixes #75512

 In the case of imports, we don't have a host, so getting host vars for
 the delegated host makes no sense and should be avoided.

* also avoid error on vars_files with per host vars

* test

* testing given case

* oops
2021-08-20 05:10:00 +10:00
b554aef3e1 More options for password passing (#73117)
* add 'file options' for become and connection pass
* implemented getting passwords from file or script
* added config entry
* fixed env var name and noted executable behaviuor

Co-authored-by: Rick Elrod <rick@elrod.me>
2021-08-19 12:18:30 -04:00
214f0984a9 Dump keyword data (#75446)
* Add keywords to ansible-doc dump

  also fixed issue with async
2021-08-19 11:42:23 -04:00
1c34492413 dnf: align the return value of the list argument with yum (#75501)
* dnf: align the return value of the list argument with yum

Fixes #75483

* Add integration test
2021-08-17 11:11:07 -04:00
13e6bd9232 ssh: Update docs (#75253)
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2021-08-16 11:03:50 -04:00
99a79e1969 ansible-test - Move code from _data to _util. (#75495)
* Update paths to match relocated files.
* Update ansible-test symlink paths.
* Update path classification.
* Update MANIFEST.in
* Update sanity test context paths.
* Update sanity ignores.
* Update shebang sanity test.
* Update configure-remoting-ps1 sanity test.
* Update BOTMETA.yml to reflect new paths.
* Update paths in collection loader comments.
* Update Makefile for ansible-test.
* Update docs.
* Add changelog fragment.
2021-08-12 15:07:06 -07:00
394860560a remove core docs build warnings (#75496) 2021-08-12 15:58:54 -05:00
bc22f70a21 Add host information to the retry print statement (#75494)
* Add host information to the retry print statement

* Add changelog fragment reflecting retry print change
2021-08-12 12:57:30 -07:00
7a9246a219 ansible-pull, restore repo options (#75491) 2021-08-12 12:52:24 -07:00
3ecf438e66 jinja2_native: short-circuit literal_eval for non-strings (#75484) 2021-08-12 12:47:33 -07:00
351f122e24 Update playbooks_tags.rst (#75472)
##### SUMMARY
When I used this example it complains with:

ERROR! The tasks/main.yml file for role 'myrole' must contain a list of tasks

The error appears to be in 'ansible/roles/myrole/tasks/main.yml': line 2, column 1, but may
be elsewhere in the file depending on the exact syntax problem.

The offending line appears to be:

---
tasks:
^ here

Removing "tasks:" fixes it.


##### ISSUE TYPE
- Docs Pull Request

+label: docsite_pr
2021-08-12 12:43:20 -07:00
a88741cf14 dnf: properly capture transaction error (#75444)
Fixes #72651
2021-08-12 12:14:23 -07:00
d652b19e11 Docs: clarify dir names for local plugins (#75157)
Co-authored-by: Alicia Cozine <acozine@users.noreply.github.com>
Co-authored-by: Toshio Kuratomi <a.badger@gmail.com>
Co-authored-by: Sandra McCann <samccann@redhat.com>
2021-08-12 11:47:27 -04:00
3c3e30a610 Docs: Add Matrix as a chat option (#75406) 2021-08-12 11:47:02 -04:00
03083c3139 setup module, dont truncate hpux interfaces (#75423)
* setup module, dont truncate hpux interfaces

  fixes #70533

 no hpux to test so relying on man page and users that reported successful testing
2021-08-12 10:13:36 -04:00
3d872fb5e8 Add new comment attribute to template plugin (#69253)
* Add new comment attribute to template plugin

Add comment_start_string and comment_end_string attribute to template
plugin


Co-authored-by: Hossein Zolfi <h.zolfi@inside.sahab.ir>
2021-08-12 09:46:02 -04:00
2b463ef197 ansible-test - Upgrade pylint to 2.9.3. (#75480)
* ansible-test - Upgrade `pylint` to 2.9.3.
* Update pylint ignores due to rule name change.
* Disable pylint deprecated-class for compat code.
* Add pylint ignores for test support content.
* Add ignores for arguments-renamed in lib/ansible/
* Add pylint ignores for collection_loader.
* ansible-test - Ignore deprecations in legacy collection loader.
* ansible-test - Suppress pylint consider-using-with
* ansible-test - Suppress pylint false positive.
* ansible-test - Suppress pylint consider-using-with.
* ansible-test - Suppress pylint deprecated-module
* Disable some of the new pylint suggestions.
* Remove unnecessary six usage from string_format pylint plugin.
* Remove obsolete ignore entry.
2021-08-11 21:04:42 -07:00
5af0420cab hacking - account for job names that contain separators (#75454)
Some job names contain '/' which causes the download job to fail.

Example job name: `Post-job: Checkout ansible/ansible@refs/pull/75445/merge to ansible.log`
2021-08-11 20:33:23 -07:00
7450e87615 Fix up string splitting to prepare for pylint update. (#75479)
* Use rsplit with maxsplit in BaseCacheModule.
* Use maxsplit for accessing first item.
* ansible-test - More efficient splitting.
2021-08-11 15:44:50 -07:00
ce6d8a143c Code cleanup to prepare for pylint update. (#75475)
* user - Remove unused code.
* Replace deprecated abstractproperty decorator.
* Fix __all__ to be a tuple.
* Use a generator in subelements lookup.
* Use from import in basic.py
* Add changelog fragment.
* Fix selinux unit test.
2021-08-11 17:47:23 -04:00
dc6878007b Add AnsibleFest banner (#75476)
* add AnsibleFest banner

* fix nit
2021-08-11 15:40:18 -05:00
a5b0626176 Cleanup hacking scripts to prepare for pylint update. (#75474)
* Use generator in get_recent_coverage_runs.py
* Use from import in test-module.py
2021-08-11 13:18:40 -07:00
04009a77e6 Clean up unit tests to prepare for pylint update. (#75473)
* Fix argument name in mocked function.
* Use from import in unit tests.
* Remove unused imports.
2021-08-11 13:08:31 -07:00
ca2d2c5f38 ansible-test - Cleanup to prepare for pylint update. (#75469)
* ansible-test - Fix use of abstractproperty
* ansible-test - Use dict.items() where possible.
* ansible-test - Remove unused code.
* ansible-test - Cleanup issues reported by pylint.
* ansible-test - Use dict.items() where possible.
* ansible-test - Use generator.
2021-08-11 11:47:18 -07:00
39605cdcce docs: missing colon for a note (#75453) 2021-08-11 16:58:43 +05:30
e24eb59de5 Improve ansible-galaxy error for InconsistentCandidate exception (#75235)
* Improve error for InconsistentCandidate exceptions

* Add test case for installing a collection with an inconsistent version

* Add test case for installing a collection that has a dependency with an inconsistent version

Co-authored-by: Abhijeet Kasurde <akasurde@redhat.com>
Co-authored-by: Sviatoslav Sydorenko <webknjaz@redhat.com>
2021-08-10 18:00:03 -04:00
0055a328b3 Also allow .yml. (#75439) 2021-08-10 14:11:16 -05:00
cea4886c7c Update test container versions (#75447)
* Update test container versions to use the most recent which contain Python 3.10.0 RC1
2021-08-09 17:52:57 -07:00
377becd609 add diversity working group to list of working groups (#75228) 2021-08-10 00:09:09 +02:00
61b81bcd10 Docsite: improve reporting_bugs_and_features.rst (#75234)
* Docsite: improve reporting_bugs_and_features.rst

* Add clarification
2021-08-09 16:49:25 -05:00
c127843698 Fix typo in porting_guide_4.rst (#75442)
paramater -> parameter
2021-08-09 16:42:19 -05:00
fae299708f plugin attributes: make validate-modules strict again, improve version_added support (#74602)
* Add basic schema for attributes.

* Support attributes for version_added_collection adding mechanism.

* Add changelog fragment.

* Support new attribute properties from #74331.

* Require additional properties strictly.
2021-08-09 10:22:09 -05:00
e23fdee45e Fix dnf test assertion (#75426) 2021-08-06 16:56:33 -04:00
d9d98740f2 new antsibull supports breadcrumbs toggle (#75424)
* new antsibull supports breadcrumbs toggle

* let antsibull versoin float free

Co-authored-by: Alicia Cozine <acozine@users.noreply.github.com>
2021-08-06 21:21:32 +02:00
f1ad6cf479 added more attributes for existing facilities (#74331) 2021-08-06 12:23:24 -05:00
75e6bdb579 ensure we convert path in warning or py2.6 breaks (#75413) 2021-08-06 05:21:23 +10:00
b541a148d5 Fix dnf package matching (#75411)
* Fix a bug with the dnf module not using all components of a package name when filtering to determine if it's installed

* changelog

* Simplify splitting on the last '.'

* Update lib/ansible/modules/dnf.py
2021-08-06 05:19:53 +10:00
b8ebf32d85 Add sanity tests which ensures that _info and _facts modules set supports_check_mode=True. (#75324) 2021-08-05 11:11:42 -04:00
5a38076568 Globals should be accessible when importing a template without the context (#75384)
Fixes #75371
2021-08-05 09:59:54 +02:00
1b95b1e7a4 Fix typo in developing_plugins_network.rst (#75382)
extention -> extension
2021-08-05 11:18:58 +05:30
2455d82c14 Make sure self doesn't end up in fake.args (#75403) 2021-08-04 13:38:48 -05:00
fa7482c63a Change interpreter discovery defaults to silently prefer Python 3 (#75049)
Push /usr/bin/python to almost the bottom of the barrel. This makes the strategy to prefer
specific versions of the "mystery meat" version.

* Change INTERPRETER_PYTHON default to 'auto'
    Change description to match change in behavior.
    Change deprecation message to a warning.

* Update docs
* Add porting guide entry
* Update unit tests
* Update integration test
* Allow INTERPRETER_PYTHON_FALLBACK to be configure using a variable
* Prefer platform-python above other Python 2 interpreters
* Add Python 3.10 to the list of interpreters
2021-08-04 14:17:32 -04:00
8d41b97329 Skip python interpreter discovery for 'forced local' module execution (#74824)
mostly for use with network_os
  use 'remote is local' property as indicator
  ensure task_vars are as expected in test
2021-08-04 11:41:58 -04:00
1d2af0b89e ansible-test - allow for the same listening port on multiple interfaces (#75387) 2021-08-03 16:45:12 -04:00
c8d413164d ignore/warn for undefined vars in unused handler names (#75244)
* Make undefined variables in handler names non-fatal if the handler is not used

* If the handler has no way to be notified (i.e. the name can't be templated and the handler has no listen topics), display a warning

* Add tests for variables in handler names

* changelog
2021-08-03 15:16:19 -04:00
d8dcfe737a ansible-test - add ssh debugging logging (#75374) 2021-08-03 10:26:18 -07:00
7d2b80371d fix quick typo (#75373)
fix a small typo introduced in #75343
2021-08-03 10:09:51 -04:00
22aa6dedc9 fix yaml version issue with config yaml dump (#75344)
now tests can run in other pythons (really yaml pkg versions)
  also cleaned up diff_failure for unimplemented flow
2021-08-02 10:33:16 -04:00
549d258c30 Update guide_aws.rst (#75375)
Update Links in AWS Guide.
2021-08-01 18:36:36 +05:30
6607051b75 docs: clarify regex_search return value (#75343) 2021-07-30 18:08:03 -05:00
58e38044fe Fix when evaluation on Native Jinja and Python 3.10 (#75202)
* Fix when evaluation on Native Jinja and Python 3.10

* Add unit test

* Add explaining comment

* Enable jinja2_native before tests

Co-Authored-By: Matt Martz <matt@sivel.net>

* Sanity

* Return native template module instead of modifying globals

Co-authored-by: Matt Martz <matt@sivel.net>
2021-07-30 17:27:49 +02:00
83039a38ad ansible-test - add RHEL 8.4 as a remote (#75362) 2021-07-30 08:19:05 -07:00
f6b27f6e35 Update test container versions (#75359)
* Update test container versions for default-test-container and ansible-core-test-container
2021-07-29 14:36:31 -07:00
7726b70d9a Improve handling of AnsibleModule arguments in validate-modules (#75332)
* Make sure AnsibleModule positional arguments are validated.

* Extract ANSIBLE_MODULE_CONSTURCTOR_ARGS with inspection.

* Remove no longer necessary return value.

* Fix PR #.

* argument_spec might not have been specified, as in community.general.xenserver_facts.

* Fix typo.
2021-07-29 12:47:54 -07:00
b22f976480 Remove duplicate any_errors_fatal test file (#75345)
test/integration/targets/any_errors_fatal/18602.yml is not run via
runme.sh and is testing the same as
test/integration/targets/any_errors_fatal/always_block.yml which is
actually run. The former file is safe to remove.
2021-07-29 12:26:41 -07:00
40ca87a963 Add packaging to requirement of ansible-test (#75356)
* Add packaging to requirement of ansible-test

Fix #75353

After requires_ansible field was added as mandatory to runtime.yml
file, ansible-test fails to check this field if it doesn't have
packaging module.

[1] https://github.com/ansible/galaxy-importer/pull/124
2021-07-29 11:50:29 -07:00
e2b0592f64 Update 2.12 roadmap for schedule change (#75350) 2021-07-29 11:29:58 -05:00
82bab063e7 service_facts, now more accurate on systemd (#75326)
* service_facts, now more accurate on systemd
2021-07-29 11:22:41 -04:00
4dca539a29 Expose unredirected_headers to uri and get_url modules (#75308) 2021-07-28 15:58:12 -05:00
767b2f07b0 Ensure Jinja2 template header overrides are used (#75306)
Fixes #75275
2021-07-26 10:38:41 -04:00
e5a2fe4c41 fix ssh cli defaults (#75245)
* fix ssh cli defaults

  fixes #75221
2021-07-23 12:12:49 -04:00
4d78b58540 Fix resolution of action/module names in module_defaults (#75284)
* Fix resolution of action/module names in module_defaults

* changelog

* Include legacy module_defaults entries for builtin plugins
2021-07-21 10:37:52 -07:00
13c28664ae Docs: talk about AWX or the Platform, not Tower (#74952)
* updates Tower page to talk about RHAAP

* updates scenario guide Tower references

* updates Tower references to use AWX and/or RHAAP

* more scenario guides fixes

* fix CI failures

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

* removes tower link

* for 2.8, still mention Tower along with AWX and RHAAP

* aws guides should be updated in the collection, where they now exist

Co-authored-by: Alicia Cozine <acozine@users.noreply.github.com>
2021-07-21 13:08:46 -04:00
0e9d1ab1cc incorporate minimalism feedback on distributing collections page (#75266) 2021-07-21 13:05:14 -04:00
d016499dcd Update network user guide to point to ansible.utils.cli_parse module and add docs for validate plugin (#75104)
* Update network user guide to point to ansible.utils.cli_parse module as ansible.netcommon.cli_parse is deprecated from ansible.netcommon 2.0.0 release
2021-07-21 10:04:45 -04:00
2a759cbe20 Update the porting guide for a new ansible version (#75292) 2021-07-21 09:39:07 -04:00
8372f34b67 docs: Update description and URL for the ara repository (#75283)
The repository has moved from /openstack/ to /ansible-community/ some
time ago.
2021-07-20 12:05:31 +05:30
5dfa9bdd9f Check if a string is possibly a template in ansible.template.is_template (#75092)
* Move is_possibly_template() to function
  Call is_possibly_template() from is_template() to avoid more expensive analysis if unnecessary.
2021-07-19 10:22:38 -04:00
1fc1ab89ae Add a test for deduplicating dependencies with include_role (#75259) 2021-07-15 12:32:00 -07:00
feed68f6f0 winrm - Add explicit env vars to pass into kinit (#75256)
* winrm - Add explicit env vars to pass into kinit

* Add ini entry and don't override existing env vars
2021-07-15 12:27:29 -07:00
61900c7672 modules moved to use best_parsable_locale (#75250)
* modules moved to use best_parsable_locale

* fixed invocations

* better better

* also module_utils

* converted to function as per fb

* patch testt

* whitespace
2021-07-15 12:18:01 -07:00
d527be8a52 set host_key_checking check to False, rather than if not (which captures False and None) (#75168)
* set host_key_checking check to False, rather than if not (which captures False and None)
* add host_key_checking default to ssh.py / update documentation
2021-07-15 13:22:18 -04:00
5e271dfc60 gitignore vendored dir (#75255)
but still accept __init__.py
2021-07-14 15:33:45 -04:00
3b861abce1 add action_groups support to collections (#74039)
* Canonicalize module_defaults actions and action_groups pre-fork and cache them on the play

* Call get_action_args_with_defaults with the resolved FQCN plugin and don't pass the redirect list

* Add validation for action_group metadata and a toggle to disable the warnings

* Handle groups recursively referring to each other

* Remove special-casing for non-fqcn actions in module_defaults groups

* Error for actions and groups in module_defaults that can't be resolved

* Error for fully templated module_defaults

* Add integration tests for action_groups

* Changelog
2021-07-14 13:33:28 -04:00
9af0d91676 fix option name for parsed (#75229) 2021-07-14 18:38:26 +05:30
f8bb182589 developing_collections_testing: Fix formatting (#75233) 2021-07-12 10:57:23 -04:00
a901ff2bc0 Allow docs-build to use a local ansible-build-data checkout.
This is useful for testing the effects on docs of changing what
collections are in a version of ansible.  ansible-build-data can be
cloned locally, modified, and then build-ansible.py docs-build can be
told to use the local checkout instead of the canonical one on github.
2021-07-08 22:54:24 -07:00
dc25197c15 Allow passing extra arguments to the build-ansible.py commands
This is useful for testing and debugging.  You can use the extra
arguments to specify a local directory for the collection list, for
instance.
2021-07-08 22:54:24 -07:00
e7a3715a90 recursive_diff: handle error when parameters are not dict (#74801)
Co-authored-by: Sam Doran <sdoran@redhat.com>
2021-07-09 10:37:50 +05:30
ac151e5ad0 become/su: Tell users not to include colon in customized list (#75084)
* Tell users not to include colon in customized list,  fixes #75076
2021-07-08 14:55:46 -05:00
8ab418f41b Disable jinja2_native warning in CI (#75214) 2021-07-08 15:15:55 -04:00
93e72c96f0 Update hacking env_setup to prefer Python 3 (#75213)
* env_setup - Prefer Python3

Prefer the 'python3' executable over 'python'.

* Add shebang for syntax detection

While the script isn't executable and we recommend sourcing it, having a shebang allows
variuos text editors to detect that it is a shell script and apply proper syntax highlighting.
2021-07-08 15:14:34 -04:00
3ba2243ba3 Replace self.module by my_module (#75196)
While implementing basic Ansible module testing I realised that the `self.module` used in some places is not actually a thing, and I changed to `my_module` to make it work as I understand it was expected.
2021-07-08 15:07:49 -04:00
1e00099753 Removed Galaxy banner (#75163) 2021-07-08 11:22:19 -05:00
67bc49e001 Restrict packaging to < 21.0 for Python < 3.6. (#75186) 2021-07-07 09:19:05 -04:00
bd03fa811b Include parent role vars as well as _role_vars (#75034) 2021-07-06 15:36:28 -05:00
21ba2967de Misc typo fixes (#75188)
Changed `Previouslly` to `Previously`.

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2021-07-06 10:43:57 -04:00
a8de35e131 task_executor - use correct value for ssh connection retries (#75155)
Since the task and connection both have the same 'retries' keyword, the task default
would override the connection value.

Do not pass 'retries' from the task to the connection options.

* Set ssh_connection retries default value back to 0
  It was 0 before the move to config and was changed to 3 by accident.
2021-07-06 10:43:25 -04:00
23a84902cb Update the porting guide for a new ansible version (#75143) 2021-07-01 10:39:42 -05:00
363c1a3fba Vaultfilters (#74998)
add vault and unvault filters

Co-authored-by: Felix Fontein <felix@fontein.de>
Co-authored-by: Abhijeet Kasurde <akasurde@redhat.com>
2021-06-30 10:24:00 -04:00
60c9f045cc Unfrack extra vars (#75127)
* Ensure we keep teh original path as per cli

  fixes #75126

Co-authored-by: Abhijeet Kasurde <akasurde@redhat.com>
2021-06-30 09:39:11 -04:00
d9eb846534 Update vault script (#75074)
Update link to the `vault-keyring-client.py` file, which moved out of core.
2021-06-29 15:46:16 -05:00
d75d9443fc Bump sphinx_ansible_theme to v0.7.0+ (#75059)
This version relies on an external lib implementing lexers and styles.
That lib pulls in proper Pygments version so this patch also drops it
from direct requirements.
2021-06-29 10:23:04 -05:00
2eb9921b19 Prefer https:// links in the docs site (#75121)
This is a follow-up of previous years' 1a11cec and c8315bf. It deals
with links which at that point presumably either were not present or
did not support https://
2021-06-29 12:53:08 +05:30
f176cc1eda Remove create-repo.py script as it was changed to module (#75124) 2021-06-28 13:25:25 -04:00
16a74b798c module_common - handle cache directory creation collision (#75106)
* module_common - handle cache directory creation collision

Occasionally multiple workers can try to create the cache directory if it exists. Catch the exception
and handle it.

* Just re-raise if it doesn't exist rather than trying again

* Use exists_ok rather than handling an exception

* Remove unused import and unused variable

* Go back to try/except but with OSError

Since we do not have split controller remote, this needs to be able to run in Python 2 in order
to be merged currently.
2021-06-25 15:36:12 -07:00
230c00e937 README optimizations (#75115)
Co-authored-by: Alicia Cozine <acozine@users.noreply.github.com>
2021-06-25 13:03:39 -04:00
29592aa3d4 Update YAMLSyntax.rst (#75113)
fix yaml-syntax example
2021-06-25 10:39:11 -05:00
03cb40e712 Fix baseurl handling in yum_repository test (#75096)
Since we moved yum_repository_test_repo.baseurl to file:/// format,
using urlsplit filter on it returned an empty string. Using an empty
string as a left operand of `in` was then always evaluated to True.

This was discovered with native jinja being on where urlsplit returns
None which results in a hard fail as None cannot be a left
operand of `in <string>`.
2021-06-25 05:19:24 +10:00
865bda3a11 Add a resolved_action task attribute (#74709)
* The resolved_action is the formatted version of the final plugin in the PluginLoadContext's redirect_list

* Collection plugins are represented as FQCN

* Legacy plugins are represented with only the plugin name

* Add tests

* Changelog
2021-06-24 12:51:03 -04:00
a4021977ad Fix structure of generic snippet feature (#74932)
* Fix struture of cli/doc.py snippet code.

A couple releases ago, cli/doc.py was modified to mostly conform to the
data processing pipeline steps.  format_plugin_doc() was the biggest
exception in that refactor.  When the snippet code was made generic
instead of being only for modules, the new code should have conformed to
the data processing pipeline too.

* Move the decision to output a snippet to the run() method alongside
  the decision to output a listing versus plugin_docs.
* Move the test for invalid plugin_types to the run() method as it
  affects all snippets in this run, not just a single snippet. (-t can
  only be specified once)
* Rename get_snippet_text() to format_snippet() as:
  * This is the data formatting step
  * The format_snippet() name matches with its conceptual sibling,
    format_plugin_doc().
* Use ValueError inside of format_snippet() to flag unrecoverable errors
  formatting a single snippet.
* Emit a warning when format_snippet() raises ValueError and continue to
  the next snippet.
* If the yaml(?) or toml inventory plugin is specified for snippet output,
  raise ValueError() so that the user sees a warning instead of simply
  seeing blank output.
* Do not modify arguments passed into format_snippet().  This is the
  formatting step so data should not be modified.
* Change _do_yaml_snippet() and _do_lookup_snippet() to operate side
  effect free.
* Fix raising of exceptions when formatting requred options for snippets.

* Unrelated: Use to_text() instead of to_native when calling
  display.warning(). to_native() is used for raising exceptions.  Not
  for display methods.

* Add a changelog
2021-06-24 08:34:46 -07:00
5d3d9ad8be docs: adds Ansible 5 roadmap (#75075) 2021-06-23 16:53:57 -04:00
ea0ba7bf30 update terminology based on recent IBM Style Guide word list (#75089) 2021-06-23 15:52:38 -05:00
415e08c297 Try to get best usable locale (#75033)
specially for when you have parameters in unicode but need
  to scrape responses, C is still the fallback

Co-authored-by: Abhijeet Kasurde <akasurde@redhat.com>
2021-06-23 15:49:56 -04:00
f05bcf5693 update intersphinx links for Ansible 4 (#75099) 2021-06-23 14:32:03 -05:00
47c50c38bb Use antsibull-docs devel for devel docs (#74988)
* Require antsibull 0.34.0.
* Remove Makefile comment about the devel docs building only the core
(formerly base) docs; the behavior was updated in ccbfdec334
Currently 'make coredocs' builds core-only docs; 'make webdocs' builds the full docs even on the devel
branch

Co-authored-by: Toshio Kuratomi <a.badger@gmail.com>
2021-06-23 14:31:13 -05:00
2c0f050b4f Use antsibull sphinx extension (#73170)
* Use antsibull sphinx extension.

* Require antsibull 0.34.0.
2021-06-23 14:27:33 -05:00
58f26388be Update docs requirements list (#74956)
* removes upper bound on sphinx version
* updates versions of docs build dependencies, adds known good requirements file
* adds instructions for using known_good_reqs file
2021-06-22 13:58:54 -05:00
50b6d28ee1 Config init+ (#74914)
Can now specify plugin/plugin type for list and dump actions
 New 'init' action to create usable config sources 

Co-authored-by: Felix Fontein <felix@fontein.de>
2021-06-22 12:21:59 -04:00
703cb79442 Implement async callbacks (#74953)
* add changelog and output from default callback
* add test
* add comments about TE task
2021-06-22 12:19:32 -04:00
ca6123e0ee Template suboptions in a role's arg spec (#75073) 2021-06-22 17:24:02 +02:00
3a8fc2d2be Syntax fixes for docs (#75086) 2021-06-22 20:48:20 +05:30
b0ae3f8a8d test: Unit tests for validation methods (#75061)
* check_required_one_of()
* check_required_by()
* check_required_if()
* check_missing_parameters()

Fixes: #55994

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2021-06-22 17:07:30 +02:00
6dbfd73174 YAML representer for VarsWithSources (#68525) 2021-06-22 20:03:18 +05:30
0f7f4e7b61 Add comma on role creation docs (#75064)
Adding a comma to make the sentence simpler to read.
2021-06-22 12:07:31 +05:30
aedc82da98 Clarify Vault password client naming requirements (#75060) 2021-06-22 11:58:54 +05:30
8e755707b9 Add 'hash_behaviour' option to include_vars module (#72944) 2021-06-22 09:29:53 +05:30
c404a9003f ansible-doc: improve version_added handling (#73602)
* Output version_added on top level, and improve version_added formatting

* Handle 'historical' version_added.
2021-06-21 16:27:00 -04:00
a7be495b7b Update plugin docs (#75050)
* edit existing plugin pages, headings, and links
2021-06-21 16:07:18 -04:00
ad203a7dbd Add page describing terminal plugins to docsite (#75066) 2021-06-21 09:47:42 -05:00
ec408a69f1 🔥 Drop unused core.css file
This is a forgotten leftover from #74318 that should've been removed
earlier.
2021-06-19 10:24:07 +03:00
38a11c3240 Fix typo in default_callback.py (#75051)
Changed beggining -> beginning
2021-06-18 10:01:11 +05:30
cd473dfb2f play - validate hosts entries (#74147)
* Change tests to pytest-style tests
* Add tests for invalid hosts
* Validate host inputs
  - check for empty values
  - check for None
  - check for values that are not a sequence and are not strings
  - add unit tests

* Move play name setting to get_name() and out of load()
* Add _validate_hosts() method
  By defining this method, it gets called automatically by FieldAttributeBase.validate().
2021-06-17 15:32:56 -04:00
e8ae7211da deprecate FileLock (#75032)
Co-authored-by: flowerysong <junk+github@flowerysong.com>
2021-06-17 15:14:41 -04:00
ce17498ec5 blockinfile - Remove unused code for Ansible 1.x. (#75040) 2021-06-17 10:32:42 -04:00
5e65d9834b tempfile - Remove unnecessary conditional. (#75039)
Also add integration tests for 100% code coverage.
2021-06-17 09:41:09 -04:00
afe6eb574e slurp - improve error code and test coverage (#75038)
* Improve the error handling code

Rather than multiple return paths, have a single return and set the message based
on the type of failure.

* Add another test for non-specific failures

* Reorganize tests so failure tests are in one tasks file

* Remove os.stat() call and add changelog
2021-06-16 15:08:34 -07:00
4ab791d501 command - remove unreachable code and achieve full test coverage (#75036) 2021-06-16 15:06:18 -07:00
4e608c02fb Add changelog and porting guide for _remote_checksum() deprecation (#75035)
I forgot to add it with the PR that made the changes.
2021-06-16 16:58:02 -04:00
be0cdc0ea2 deprecate _remote_checksum() and remove use in fetch (#74848)
* Remove use of _remote_checksum from fetch module
* Add deprecation message displayed during runtime
* Increase test coverage for fetch
* Add tests covering the use of stat from the fetch module

    This required creating an unpriveleged user account and connecting as that user remotely since
    it is not possible to create a file that the root user cannot stat.

* Use fact caching to persist remote tmp dir across playbook runs
* Add variables to setup_remote_tmp test role to allow caching of the remote temp dir fact
  and preventing removal of the remote_tmp_dir
2021-06-16 13:51:07 -04:00
5a5a1882d4 Added FAQ entry for complex validation needs (#74707)
* Added FAQ entry for complex validation needs

* updated validate docs

* fix

* longline

* Apply suggestions from code review

Co-authored-by: Sandra McCann <samccann@redhat.com>
2021-06-16 13:43:01 -04:00
0467b1d477 file integration test - cleanup testing users and group 2021-06-16 10:06:12 -07:00
5b8fb4dcd3 ansible-test: exposes tiny_prefix variable
ansible-test aws provider now creates and exposes a new tiny_prefix
variable to provide a shorter prefix for the AWS tests.
2021-06-16 10:04:58 -07:00
08fc43f3ea document keywords (#74046)
* document kewyords

  also minoir tweak to local action/connection

* made corrections
2021-06-16 12:46:21 -04:00
6fd61bb19f add option def/handling to lookup (#74495) 2021-06-16 12:44:02 -04:00
2e2a5829a2 Update FreeBSD Python version in intro_bsd.rst (#74938)
* Use the python pkg instead of a specific version
The python pkg contains a symlink to the default python interpreter.
2021-06-16 11:22:26 -04:00
3fa6e6d038 example hosts should match play (#74959) 2021-06-16 11:18:44 -04:00
b0f62062d3 Async task change handling (#75020)
Async task changes should be handled in the async_status task.
2021-06-16 11:16:30 -04:00
7d38bb05e4 small note about add_hosts/limit interaction (#74978)
clarifying the scope and applicability

Co-authored-by: Abhijeet Kasurde <akasurde@redhat.com>
Co-authored-by: Sandra McCann <samccann@redhat.com>
2021-06-16 11:13:11 -04:00
2387ce311f remove reference to container ML (#75014) 2021-06-16 10:47:26 -04:00
5df82415b5 collections_using.rst: add note that manual upgrade is required when installing collections from Galaxy (#75024) 2021-06-16 10:32:12 -04:00
4cb20f577b Fix env lookup docs typo (#75022)
- Fixed "impossbile" typo
2021-06-16 10:00:15 -04:00
79a0799082 fix typo in host_group_vars config (#75012)
* no need to deprecate, not used directly

  it just documents the use of the setting in loader
2021-06-15 18:03:01 -04:00
e6a7bc854c Only consider directories which do have .deps files other than ancestor.deps. (#74987) 2021-06-15 14:35:34 -05:00
7f6edd78f9 Move Docker scenario guide to community.docker. (#74736)
The scenario guide has already been added to community.docker in
ansible-collections/community.docker#140
2021-06-15 10:12:49 -05:00
58d8397771 psrp - cleanup command (#74985) 2021-06-15 07:33:56 +10:00
58450f041a Do not show empty version_added_collection values in ansible-doc text output. (#74999) 2021-06-14 17:26:40 -04:00
77e936bd50 async_status revert most changes, keep some fixes, undep module (#74931)
* revert most changes, keep some fixes, undep module

  too many corner cases, reverting major changes for controller
  side processing.
2021-06-14 16:39:59 -04:00
97acb0f470 role argspec - tag role argspec validation task with 'always' (#74994)
* update tag docs
2021-06-14 13:28:56 -04:00
d2d45900ed setup module, filter compensate for prefixes (#74924)
Allow user to abstract internal implementation from requested info
2021-06-14 09:32:28 -04:00
cf3a304ce1 psrp - Fix reset connection on failed scenarios (#74967)
* psrp - Fix reset connection on failed scenarios

* Update psrp-reset.yml

* Update changelogs/fragments/psrp-reset.yml

Co-authored-by: Abhijeet Kasurde <akasurde@redhat.com>

* Update changelogs/fragments/psrp-reset.yml

Co-authored-by: Abhijeet Kasurde <akasurde@redhat.com>

Co-authored-by: Abhijeet Kasurde <akasurde@redhat.com>
2021-06-12 12:01:23 +10:00
a8cf0196f7 subversion - fix stack trace when getting repository information (#74405)
* subversion - set LC_ALL for accurate command output parsing

When LC_ALL is not set, the output language of commands will differ based on locale. There
is a lot of history of trying to fix this. See the following pull requests:

https://github.com/ansible/ansible-modules-core/pull/4358
https://github.com/ansible/ansible-modules-core/pull/4358

This patch attempts to fix this my setting LC_ALL to a UTF-8 locale. Setting LC_ALL to C reintroduces this bug https://github.com/ansible/ansible-modules-core/issues/4178.

I'm sure there are some problems I am not seeing with setting this to en_US.UTF-8, but that is
the only way I could find to fix this bug without reintriducing the bug mentioned above.

* Rather than setting locale, just check for matches before trying to get groups

This is a pragmatic solution to avoid the stack trace since setting the locale correctly
to ensure message parsing is accurate is problematic.

* Improve regexps for finding revision and URL
2021-06-11 10:23:42 -04:00
9a21e24778 get_distribution - Return distribution for all platforms (#71641)
Since moving to distro, it is possible to return this information for all platforms, not just Linux.
Also return version information for all platfrom not just Linux.
Update unit tests.
Remove some duplicate unit tests though I think there are more to remove.

* Fix docstring formatting

* Minor docstring changes

* Mock distro.id for Solaris service test

* Update comment
2021-06-11 10:22:18 -04:00
4c8c40fd3d fix unsafe preservation across newlines (#74960)
* fix unsafe preservation across newlines

  CVE-2021-3583
  ensure we always have unsafe

Co-authored-by: Rick Elrod <rick@elrod.me>
2021-06-11 09:33:40 -04:00
473df5c13f fix doc: add possible state 'inactive' (#74928) 2021-06-11 14:58:00 +10:00
576e0f6404 Update the porting guide for ansible 4.1.0 (#74965) 2021-06-10 19:45:52 -05:00
675df166c2 fix ssh_transfer_method/scp_if_ssh defaults (#74925)
* fix ssh_transfer_method/scp_if_ssh defaults

  fixes #74922

* clog
2021-06-10 15:22:41 -05:00
50e998e303 apt_key: add --recv argument as last one (#74949)
* apt_key: add --recv argument as last one

* Add unit test

* Add the required boilerplate

Co-authored-by: Marius Gedminas <marius@gedmin.as>
2021-06-11 05:47:59 +10:00
81ad125aa6 Fix name of subkey. (#74939) 2021-06-11 05:34:04 +10:00
6539c59857 ansible-pull - update help info for --directory option (#74936)
* Update -d help info for ansible-pull

* fix pep8
2021-06-11 05:31:17 +10:00
5ac1b04929 Add support for unicode in ansible-inventory CLI (#74912)
* Add support for unicode in ansible-inventory CLI

Fixes #57378

* Add tests

* First test fix

* --output tests

* fix
2021-06-11 05:07:55 +10:00
0a5cc80ce2 slurp - handle error when path is a directory (#74930) 2021-06-10 10:25:48 +05:30
36287e9810 Remove ignores that are resolved on devel 2021-06-09 11:18:12 -07:00
3f694e9f02 Ignore smart quotes in the dev guide translation.
The smart quotes are in the warning message to not use smart quotes.
2021-06-09 11:18:12 -07:00
d45c2cec55 Localization: Import first set of translated files 2021-06-09 11:18:12 -07:00
1c4ca154fa improve inv plugin selectino for snippets (#74933)
* improve inv plugin selectino for snippets
* add warning on no snippet for inventory
2021-06-09 12:13:56 -04:00
346c7a765d Use sphinx_ansible_theme Sphinx theme in docs (#74318) 2021-06-08 14:38:23 -05:00
d9001f8fd0 Fix intro docs (#74843) 2021-06-08 09:27:21 +05:30
6d2398db28 expand doc snippets to lookups and other plugins (#74403)
Co-authored-by: Sviatoslav Sydorenko <wk.cvs.github@sydorenko.org.ua>
Co-authored-by: Toshio Kuratomi <a.badger@gmail.com>
2021-06-07 16:21:25 -04:00
004c33d9c5 unarchive - do not fail in init when trying to find required binary (#74892)
Test for the required binaries in the can_handle_archive() method and fail there. This
prevents failures for missing binaries unrelated to the archive type.

* Update missing zip binary message to match tar message
* Update unit tests
* Add integration tests
* Define packages based on the system rather than ignoring failures
2021-06-07 12:59:06 -04:00
acf09e56a2 Update inventory script references from c.g to ansible-community/contrib-scripts. (#74905) 2021-06-07 11:37:39 -05:00
5dd8dc8fd0 minor service_mgr facts fixes (#74894)
* minor service_mgr facts fixes

  handle case in which ps command fails or returns empty
  updated tests since it now does keep trying to detect after ps fails
2021-06-04 15:28:41 -04:00
6840b79e56 bring back async_status module for direct callers
also, deprecate it, they should use action instead
Co-authored-by: Felix Fontein <felix@fontein.de>
2021-06-04 13:01:26 -04:00
e2658801f6 Add seed parameter to password lookup (#69775) 2021-06-04 12:20:44 -04:00
ffa548503d Wrap all results, regardless of register, except for actions with clean facts (#73161)
* Wrap all results, regardless of register, except for actions with clean facts. Fixes #21088

* ci_complete

* Add tests

* Add clog frag
2021-06-04 16:40:53 +02:00
e70fc88656 slurp - better error handling for unreadable files and directories (#68608) 2021-06-04 10:38:23 -04:00
26827f5039 ansible-doc fix displaying 'CLI' options for plugin docs
cli options will now display either use provided info, or automating from the name


Co-authored-by: Sloane Hertel <19572925+s-hertel@users.noreply.github.com>
2021-06-04 10:22:39 -04:00
6a883f1cd6 better message and timeout warning when timeout (#74885)
* better message and timeout warning when timeout
2021-06-04 10:21:12 -04:00
3d8feed2cf Update playbooks_filters.rst (#74911)
Fix typo: 'sting' -> 'string'
2021-06-04 17:50:19 +05:30
33924d7e8d gives each banner a unique div ID (#74907)
Co-authored-by: Alicia Cozine <acozine@users.noreply.github.com>
2021-06-03 16:51:31 -04:00
4f3ee4624e Add end_batch meta task (#74899)
* Add end_batch meta task

* Add note

* Fix sanity
2021-06-04 05:17:19 +10:00
ac77911491 Prevent conditional templating errors from masking task output. Fixes #37187 (#74891) 2021-06-04 05:11:01 +10:00
8f82e6327f ansible-cli: Remove unnessary trailing space (#74880)
Fixes: #74875

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2021-06-04 05:07:54 +10:00
840825b79c Allow omit to work with include_role from_args (#74879)
* Allow omit to work with include_role from_args. Fixes #66349

* Add clog frag
2021-06-04 05:07:16 +10:00
605b1a1c5c documents community 'extra docs' option in collections (#74886)
Co-authored-by: Alicia Cozine <acozine@users.noreply.github.com>
Co-authored-by: Felix Fontein <felix@fontein.de>
2021-06-03 14:22:21 -04:00
f88e81a62c updates links in comments to point to current docs (#74834)
Co-authored-by: Alicia Cozine <acozine@users.noreply.github.com>
2021-06-03 14:00:24 -04:00
62fc4ad8da adds banner for GalaxyNG survey (#74889) 2021-06-03 11:22:49 -04:00
b023f34f4a service_mgr: Detect using symlink if proc/1 and ps fail
* runit and other alternative service managers tend to work via symlink so this covers most of em
* Fixes #74866.
2021-06-03 09:59:31 -04:00
9c718ccc42 Async status rewrite
-  remove need for module (at least for posix side)
  - adds retry with backoff on fetching file, since
    race is bigger since we don't spend time on module
  - now gives more info on fail
  - also made actionfail/skip handle results if given
2021-06-03 09:54:40 -04:00
e201b542be Ensure end_play ends play, not batch (#74332)
* Ensure end_play ends play, not batch

Fixes #73971

ci_complete

* Preserve result

* Move AnsibleEndPlay to TQM

* Add tests

* Add changelog

* Explaining comment

* Fix changelog name

* ci_complete
2021-06-03 09:26:22 +02:00
fe20546d36 first_found: clear up the skip option usage (#74816) 2021-06-03 11:41:46 +05:30
be9f8c69d1 unarchive: Fail when zipinfo is not available (#74632)
Fixes: #39029

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2021-06-02 10:09:42 +05:30
805799ac8b add pkcs11 support to Ansible ssh connection module (#32829)
* rebased with upstream

* removed extra usetty as it wasnt needed, style changes, added var option setable by inventory for pkcs11

* update pkcs11_provider version_added

* Update lib/ansible/plugins/connection/ssh.py

Co-authored-by: Jordan Borean <jborean93@gmail.com>

* Update lib/ansible/plugins/connection/ssh.py

Correct logic for a password being required for pkcs11_provider

Co-authored-by: Jordan Borean <jborean93@gmail.com>

* style nit fixes for checking pkcs11_provider is set

* fixed duplication when using password_prompt with pkcs11_provider

* added changelog fragment

* added changelog fragment

Co-authored-by: David Whiteside <david.whiteside@nrel.gov>
Co-authored-by: Matt Davis <nitzmahone@users.noreply.github.com>
Co-authored-by: Jordan Borean <jborean93@gmail.com>
2021-06-02 12:32:43 +10:00
d9183b8df5 dnf - replace usage of private attribute with supported API (#73529)
base._update_security_filters is a private attribute of DNF used
as performance optimization. Modification or even call from outside
of DNF is against all recommendation including PEP8.

* Improve compatibility with all DNF versions

* Add changelog fragment for dnf security change
2021-06-01 15:32:38 -04:00
ba2b1a6bf6 fact gathering, ensure we get some linux hardware info even if some fails/times out (#74714)
* Add resiliency to linux hw fact gathering

 Now traps unexpected exceptions on mounts and continues
 gathiering other info.
 Also gives more info on why mount info gathering failed.
 more info if debugging
2021-06-01 14:52:22 -04:00
8d39332c3d plugins: specify plugin types for get_option (#74799) 2021-06-01 13:46:04 -04:00
adc9e4a023 Updated ansible-test azure plugin help message. 2021-06-01 10:23:04 -07:00
01ab6c6ec7 Apply display_failed_stderr on loop item results (#74865) 2021-06-01 11:31:46 -04:00
70f22c7f32 Remove commented code (#74860)
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2021-06-01 11:26:38 -04:00
41f42d6bf6 Update intro_bsd.rst (#74768)
OpenBSD 6.9 is out and the default version of Python is 3.8, with no more 3.7.
2021-06-01 10:43:15 -04:00
81c770e44a Update intro_getting_started.rst (#74786)
Changed confusing wording.  People new to ansible, like myself, have a hard time grocking what is a playbook and what is a task.   I changed the name of the playbook to make it clearer.
2021-06-01 10:38:17 -04:00
80e7e1a17c Due to the takeover of freenode we're moving to a different irc network. (#74775)
* Due to the takeover of freenode we're moving to a different irc network.

* Our channels updated to point at the same channel name on libera.chat
* Some links went to webchat.freenode.net.  At this time, libera.chat
  doesn't point you to an official webchat client so I changed these to
  https://libera.chat. (kiwi irc does work with libera.chat so that
  could be another option).
* In general, I used the name irc.libera.net for link names and
  https://libera.chat for link targets.  This is because the irc service
  is hosted on irc.libera.chat but the project web server is hosted on
  libera.chat.  (This appears to also be true for freenode but we were
  using http://irc.freenode.net which doesn't seem to work.  Oops).
* Removed http://irc.freenode.net from the linkcheck exceptions.
  linkcheck was actually correct to flag that as invalid (should have
  been http://frenode.net instead).

* Looks like hte important people in #yaml are now in libera.chat

* Link to where contributors should get help

Add a link target and then link to where contributors should get support
for developing groups of modules.

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

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

Co-authored-by: John R Barker <john@johnrbarker.com>
Co-authored-by: Felix Fontein <felix@fontein.de>
2021-06-01 08:48:09 +01:00
b0dcf0d164 collection: match skip message as per role install (#74861) 2021-06-01 09:44:01 +05:30
35a2345809 Fixed typo in yum package (#72964)
* yum: Fixed typo in failure message: nevra --> envra
* Added changelog fragment
2021-05-31 13:34:26 +05:30
e0558ac193 yum action plugin: 'use' as an alias of 'use_backend' (#70792)
Co-authored-by: Abhijeet Kasurde <akasurde@redhat.com>
Co-authored-by: rukmangathan <rukmangathan.annadurai@gigamon.com>
2021-05-31 09:48:15 +05:30
5640093f1c Use the module redirect_list when getting defaults for action plugins (#73864)
* Fix module-specific defaults in the gather_facts, package, and service action plugins.

* Handle ansible.legacy actions better in get_action_args_with_defaults

* Add tests for each action plugin

* Changelog

Fixes #72918
2021-05-27 19:06:45 -04:00
a5a13246ce ssh remove unused/unusable cli option ssh_args (#74846) 2021-05-27 17:16:54 -04:00
99a983c92c config: small typo fix (#74845) 2021-05-27 16:41:20 -04:00
148d4f6248 hostname: Add support for RedOS (#74844)
Fixes: #74779

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2021-05-27 21:18:48 +05:30
138b3b6851 hostname: add support for Anolis distro (#74829)
project website https://openanolis.org/

Signed-off-by: Liwei Ge <geliwei@openanolis.org>
2021-05-27 18:30:35 +05:30
774e563452 Use get_file_lines in hostname module 2021-05-27 13:15:52 +02:00
502270c804 hostname: clean up strategies
Apply #74744 and #69929 to #70828
2021-05-27 13:15:52 +02:00
2ad10ffe43 hostname: Make strategies consistent, drop py2.4
Change:
- Make strategies behave consistently and return the empty string
  instead of "UNKNOWN" (or "temporarystub") for the "before" value if
  the permanent hostname file does not exist or could not be read.
- Switch to `with open()` instead of annoying exception handling code
  (which was wrong and leaked file handles in several places). This
  drops Python 2.4 support for this module.
- Updated porting guide since users could be relying on these former,
  inconsistent values.

Signed-off-by: Rick Elrod <rick@elrod.me>
2021-05-27 13:15:52 +02:00
8a0abed1ba [hostname] don't write in get_*() methods
Change:
- Hostname strategies' get_*() methods should never write to the
  filesystem. They are used in check_mode by default to determine if
  there is any work to be done.

Test Plan:
- New unit tests to ensure that (at least when in check_mode) the get
  methods don't ever call write.

Tickets:
- Fixes #66432

Signed-off-by: Rick Elrod <rick@elrod.me>
2021-05-27 13:15:52 +02:00
16e1172292 Update docs for cloud maintained collections (#74373)
- AWS has moved to Zuul CI
- Kubernetes collection has been renamed
- OpenShift/OKD collection was missing
- ansible.windows is on Zuul and Azure Pipelines
- ansible.posix is on Zuul

Signed-off-by: Jill Rouleau <jill.rouleau@bespokess.com>
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2021-05-27 15:04:16 +05:30
ae50d05182 ini: Add parameter to allow no value (#74806)
ConfigParser allows to read key with no value.

Fixes: #50594

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2021-05-27 11:12:38 +05:30
397d3763ea ansible-test - Do not downgrade cryptography. 2021-05-26 13:31:03 -07:00
e5c3f6ce99 Revert "aync_status rewrite (#74577)"
This reverts commit b6de1984db.
2021-05-26 11:37:58 -07:00
a61821b626 misc typos (#74724) 2021-05-26 19:28:52 +05:30
b63512774b Update example and description of git:single_branch (#74796) 2021-05-26 18:57:18 +05:30
ef0055a806 add anchors (#74825)
LGTM @samccann
2021-05-25 13:52:26 -04:00
88d67b00f8 Update developing_collections_distributing.rst (#74820)
It is not clear that you can publish without configuring an ansible.cfg.  The `--token` can be displayed with the `ansible-galaxy collection publish -h`
2021-05-25 13:19:05 -04:00
b6de1984db aync_status rewrite (#74577)
remove need for module (at least for posix side)
2021-05-25 12:34:38 -04:00
ce556da7a0 Remove deprecated PlayContext.make_become_cmd (#74790)
* Remove deprecated PlayContext.make_become_cmd. Fixes #74136

* Linting issues
2021-05-25 12:01:22 -04:00
98138584b7 Don't mutate os.environ in AnsibleModule.run_command, make a copy, and pass to Popen (#74791)
* Don't mutate os.environ in AnsibleModule.run_command, make a copy, and pass to Popen. Fixes #74783

* Simplify code a bit

* More simple

* Address some other potentially non threadsafe operations

* Add if around umask

* Address unit test assumptions

* Add clog frag

* yaml syntax issue
2021-05-25 12:00:47 -04:00
df5ce3e672 Remove deprecated cache support from script inventory plugin (#74813) 2021-05-25 11:35:46 -04:00
d27ce4cef3 Remove deprecated features from ansible.playbook.helpers (#74809)
* Remove deprecated features from ansible.playbook.helpers. Fixes #74135
2021-05-25 11:35:17 -04:00
27f61db86b service: Document internal working of the module (#74726)
service module acts as proxy module for all service manager modules,
just like `package` module.
This is helpful in heterogeneous environments to manage services.

Fixes: #74507

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2021-05-25 20:55:21 +05:30
9c01a7e177 Remove deprecated PlayContext.make_become_cmd (#74790)
* Remove deprecated PlayContext.make_become_cmd. Fixes #74136

* Linting issues
2021-05-25 10:05:18 -05:00
aa650562d6 Remove deprecated PlayContext.make_become_cmd (#74790) 2021-05-25 11:04:31 -04:00
4a4ffbadc5 Remove deprecated PlayContext.make_become_cmd (#74790) 2021-05-25 11:03:55 -04:00
63701b1b6b hostname: Change "strategy" to "use" (#74815)
Fixed typo: 'strategy' to 'use'
2021-05-25 14:14:18 +05:30
870f943365 docs: Update Python 2 doc links (#74633)
* docs: Update Python 2 doc links

Update links from Python 2 to Python 3

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>

* use docs.python.com/3/ everywhere, except onethat should remain 2.6

* refer to python 3 in module docs and comments

* format two python docs links as list

* updates links in unwanted.py test file

* per matt clay, this should link to python 2

Co-authored-by: Alicia Cozine <acozine@users.noreply.github.com>
2021-05-24 15:11:26 -04:00
52430d4228 dnf - fix whatprovides API block (#74764)
* Added additional query block
2021-05-24 13:02:28 -04:00
12f4b0db04 Fix typo in porting guide (#74812) 2021-05-24 11:53:51 -05:00
1bd7dcf339 encrypt: add new paramter 'ident' (#74595)
Add a new parameter `ident` for specifying version of BCrypt
algorithm. This parameter is only valid for `blowfish` hash type.
2021-05-24 11:46:37 -04:00
20ef733ee0 Update network_resources.rst (#74810) 2021-05-24 11:25:55 -04:00
b518aabf81 delegation fix (#74685)
*  delegation fix
2021-05-24 10:13:19 -04:00
015331518d windows: Add openssh installation link (#74765)
* Added a link to openssh installation on Windows

Fixes: #73490

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2021-05-21 11:00:39 +05:30
bc48eba896 Remove deprecated include vartags usage (#74780)
* Add clog frag
* Remove ignore
2021-05-20 15:32:52 -04:00
71e33d2578 version test - improve message when value is empty (#74754)
When an empty value is provided, no `version` attribute will exist on the `LooseVersion` or
`StrictVersion` object. We catch and handle this, but it's not immediatebly clear that an
AttributeError means an empty value was provided.

Specifically handle the case where value or version are empty and add more
helpful error messages.

Add integration tests.
2021-05-20 11:55:30 -04:00
83010f666d Fix coverage paths reported in AZP. (#74759) 2021-05-19 14:54:03 -07:00
724a0c867e Fix mistaken detection of atomic_container when rpm-ostree is present (fixes #74578) (#74579)
* Lower the priority of the atomic_container detection now that we have #73445 merged

* Add changelog fragment
2021-05-19 16:15:26 -04:00
d2d1f01f9d avoid literal quoting in config lists (#74740)
* added tests
2021-05-19 16:14:52 -04:00
888fea69e5 Fix small typo in playbook_filters doc (#74762)
Move versionadded to next line to render correctly.
2021-05-19 16:23:42 +05:30
cd8e3a2208 update conf.py (#74751) 2021-05-18 15:34:43 -05:00
138dfa4549 add release note and mark 3 unmaintained (#74749) 2021-05-18 15:33:26 -05:00
c0cb353ce1 Remove PyCrypto (#74699)
* Remove PyCrypto from setup.py and packaging script
* Remove mention of pycrpto from installation docs
* Remove PyCrypto from vault
* Remove pycryto constraint and unit test requirement
* Remove PyCrypto tests from unit tests
* Add docs and fix warning message
* Remove section about cryptography library in Ansible Vault docs
2021-05-18 16:12:32 -04:00
4bf420706b Improve and extend changelog logs (#74106)
Co-authored-by: Andrew Klychkov <aaklychkov@mail.ru>
Co-authored-by: Abhijeet Kasurde <akasurde@redhat.com>
2021-05-18 15:02:59 -04:00
fbe5f9fd7d Update the porting guide for a new ansible version (#74752) 2021-05-18 14:50:07 -04:00
5266e1e1ab Fix broken Jinja website links (for tests) (#74746)
The various links to the Jinja website were broken, this commit fixes them.
2021-05-18 11:40:38 -04:00
8d7a5d9cb3 Fix broken Jinja website links (#74745)
The URLs to the Jinja website have moved, seemingly because of the renaming from `master` to `main` (hence from `master` to `latest` in the doc). This commit fixes that.
2021-05-18 11:39:43 -04:00
957a93a583 dnf - fix typo in message (#74720)
occured -> occurred
2021-05-18 11:19:54 -04:00
bdae72ef6c Add fallback for coverage report generation.
This should allow the same script to be used for two different scenarios:

- ansible-core across multiple versions (not all of which support `--docker` for coverage reports)
- collections (which should always use the `devel` branch for coverage reports)
2021-05-17 17:42:42 -07:00
2124dde5a6 Use --docker to generate coverage XML reports.
This is needed to provide `pwsh` for generating PowerShell coverage stubs.

ci_complete
ci_coverage
2021-05-17 16:57:04 -07:00
787f722d94 Fix combined coverage file detection.
Resolves an issue introduced with https://github.com/ansible/ansible/pull/74719
2021-05-17 16:26:14 -07:00
9cfedcd9c9 Add changelog for ansible-galaxy improvements (#74738)
Changelog for #74240
2021-05-17 16:31:13 -04:00
5333e4138c note about adhoc delegate_to hosts (#74687)
* Update docs/docsite/rst/user_guide/playbooks_delegation.rst
2021-05-17 13:24:26 -05:00
ce04056797 Expand delegation options for coverage commands. 2021-05-17 10:37:42 -07:00
e875e91363 ansible-test - use pwsh to generate stubs (#74271) 2021-05-17 10:00:06 -07:00
d8e6f21d9f ini lookup - add case sensitive option (#74630)
* Add tests for case-sensitive option
* Run all test playbooks from a single file
2021-05-17 11:41:23 -04:00
2f87b8760d docs: Add a note about ansible_date_time (#74636)
* For long-running playbooks, discourage users from using
`ansible_date_time`. Use `pipe` or `now` as an alternative.

* Review comments

Fixes: #22561

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
Co-authored-by: Alicia Cozine <879121+acozine@users.noreply.github.com>
2021-05-15 10:13:05 +05:30
bf9944266c Issue 73792: Removed mentions of R() and M() (#74708)
* 73792: Removed mentions of R and M
2021-05-14 14:48:21 -05:00
8d3dce49bf Remove incidental_setup_rabbitmq integration test
All tests using this have been removed.
2021-05-14 12:31:18 -07:00
39df263f1a intro: Add a note about current user (#74638)
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2021-05-14 11:41:35 -04:00
25de07946c Fix typo on roles documentation (#74696)
##### SUMMARY
Small fix on the roles directory structure documentation

##### ISSUE TYPE
- Docs Pull Request

+label: docsite_pr
2021-05-14 11:40:00 -04:00
91212b2008 Add JC filter plugin example (#74563)
Co-authored-by: Abhijeet Kasurde <akasurde@redhat.com>
2021-05-14 11:37:29 -04:00
fa15d35cb1 Update AWS guides with new SDK and Python requirements (#74585)
The 2.0 collection releases will introduce new Python requirements
and a new SDK support policy
2021-05-14 11:35:45 -04:00
173d0a8de7 Skip interpreter discovery for network OSs(#74012)
skip python interpreter discovery on network os being set as this indicates a 'forced local' module and should use sys.executable.
2021-05-14 10:19:55 -04:00
51b5659598 replace - better handling of file exceptions (#74686) 2021-05-13 17:00:22 -04:00
bab7acb1ad update cron test added in #74497 for /etc/crontab (#74689) 2021-05-13 16:58:46 -04:00
35281e54d9 fix config to match doc split (#74665) 2021-05-14 05:20:32 +10:00
c6ac9de67b Do not remove non-empty cron tabs (#74497)
* Only remove crontabs if they are empty

* Add integration test to ensure system cron tab doesn't get removed. Increase cron integration tests separation.
* Also detect crontab which only contains whitespace as empty.
* cron integration test: Adjust system crontab path to be distribution specific.

Co-authored-by: Fabian Klemp <fabian.klemp@elara-gmbh.de>
2021-05-13 13:38:13 -04:00
1906d75907 Adding DigitalOcean cloud support to ansible-test (#74222) 2021-05-12 16:07:21 -07:00
d6e28e6859 Update vendored copy of six to 1.16.0 (#74680)
* Update to six 1.16.0

* Address linting issues

* Remove six find_spex/exec_module warning filters

* Remove unnecessary comment about Py2.6, 2.13 will not support Py2.6, and we're bumping this for 2.12

* ci_complete

* Add changelog fragment
2021-05-12 16:26:48 -05:00
0affe4d027 ini lookup - catch and handle duplicate key and missing section errors (#74629)
* Remove unused import
* Add integration tests for errors
* Cleanup formatting on existing tests
* Add changelog
2021-05-12 16:57:02 -04:00
829c9c3d46 updates jinja filters links with new pattern for Jinja 3.x documentation 2021-05-12 10:08:00 -07:00
8c34eaa69f Jinja intersphinx should point at 3.0; other updates 2021-05-12 10:08:00 -07:00
f99d024851 CI and compat fixes for Jinja2 >= 3.0 (#74666)
* Add constraint for MarkupSafe

MarkupSafe >= 2.0.0 requires Python >= 3.6.0. Add a constraint for older Python versions
and fix the `groupby_filter` test.

* Fix template_jinja2_latest test.

* patch filter decorators on newer Jinja2

* Jinja2 >= 3.0 renames several filter decorators used by Ansible itself, as well as by filters in collections. This patch ensures that the old names are usable within Ansible and by collections without warnings or errors.

* Ignore docs-build issues.

Co-authored-by: Matt Clay <matt@mystile.com>
Co-authored-by: Matt Davis <mrd@redhat.com>
2021-05-11 19:59:44 -07:00
8f2c0e0574 Update the porting guide for ansible-3.4.0 (#74664) 2021-05-11 16:14:29 -05:00
1006363589 basic: Skip over module parameters (#74559)
While logging, journal.send accepts module parameters.
If module parameters similar to arguments in journal.send,
rename the parameter names before sending to journal.send

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2021-05-11 15:05:56 -04:00
2c93b22043 use self.host which will always be updated (#74574)
* use self.host which will always be updated

  pc remote_addr is not correctly updated in all cases
2021-05-11 14:49:56 -04:00
8d1cf7f266 Vendor distutils.version (#74644)
* Vendor distutils.version

* Fix import order. ci_complete

* remove distutils warning filter

* Don't remove warnings filter from importer

* ci_complete

* Add pylint config for preventing distutils.version

* Add changelog fragment
2021-05-11 12:33:51 -05:00
79e12ba98e docs: Add a note about crypt (#74640)
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2021-05-11 11:39:08 -04:00
ddaa539ab1 Better handling of rstisms in ansible-doc (#74596)
* Better handling of rstisms

  replace tags more intelligently to make things more readable
  unit tests + minor adjustments
2021-05-11 11:31:20 -04:00
60a03a0f87 Add missing 'why:' to 'deprecated:'. (#74639) 2021-05-11 17:19:59 +02:00
7195367635 update docs copyright (#74643) 2021-05-11 10:16:27 -05:00
cf11c38caf Exclude unreachable hosts in ansible_play_batch between plays (#74625)
ci_complete
2021-05-11 17:12:34 +02:00
df6554c4ec fix: action _fixup_perms2 macos +a remote_paths in list() as it can be a tuple (#74613)
* fix: action _fixup_perms2 macos +a remote_paths in list() as it can be tuple

in `lib/ansible/plugin/action/__init__.py`'s `_fixup_perms2`,
`remote_paths` can be a list or tuple. however, the macos
specific attempt to use chmod +a attempts to concatenate
`remote_paths` with a list, which will fail if it is a tuple.
wrapping `remote_paths` in `list()` fixes this error.

* Update changelogs/fragments/74613-actionfixup_perms2_macos_remote_paths_ensure_list.yml

Co-authored-by: Rick Elrod <rick@elrod.me>
2021-05-11 17:08:33 +02:00
8fb54885bf Role argspec: allow new argument spec file (#74582)
* support separate role argspec file in ansible-doc

* support separate role argspec file in ansible-core

* support both .yml and .yaml extensions on argspec file in ansible-doc

* fix filename building bug and rename some argspec files to test variations

* use yaml extensions from constants

* add superfluous meta/main.yml files to tests

* Update lib/ansible/cli/doc.py

Co-authored-by: Sam Doran <sdoran@redhat.com>

* update docs

* ci_complete

* add changelog and allow for main.yml variations

* add collection role testing

Co-authored-by: Sam Doran <sdoran@redhat.com>
2021-05-11 09:29:47 -05:00
f6c292d210 Remove unused CI scripts. 2021-05-10 19:47:31 -07:00
d244e47822 Update Python versions for controller-only tests. (#74652)
* Update Python versions for controller-only tests.

Both `ansible-galaxy` and `ansible-test` integration tests only run on the controller.

* Use a venv to make requirements available.
2021-05-10 18:25:53 -07:00
7b0c4845d9 Remove PyYAML warning filter in import test.
The filter is obsolete now that PyYAML imports go through our compat layer.
2021-05-10 16:57:45 -07:00
bdffb59978 Update Python versions used to run network tests. (#74647) 2021-05-10 15:06:09 -07:00
d85809d592 Update Python versions used to run Windows tests. 2021-05-10 10:30:41 -07:00
7f7d3067e3 adhoc clarify help (#74616)
also added comments to code
2021-05-10 13:28:59 -04:00
ee725846f0 ansible-galaxy - increase page size and add retry decorator for throttling (#74240)
* Get available collection versions with page_size=100 for v2 and limit=100 for v3

* Update unit tests for larger page sizes

* Add a generic retry decorator in module_utils/api.py that accepts an Iterable of delays and a callable to determine if an exception inheriting from Exception should be retried

* Use the new decorator to handle Galaxy API rate limiting

* Add unit tests for new retry decorator

* Preserve the decorated function's metadata with functools.wraps

Co-authored-by: Matt Martz <matt@sivel.net>
Co-authored-by: Sviatoslav Sydorenko <wk.cvs.github@sydorenko.org.ua>
2021-05-10 13:26:41 -04:00
51fd05e76b Add support for testing with Python 3.10. 2021-05-10 08:23:15 -07:00
bcb64054ed Another unit test fix for Python 3.10. (#74628)
* Another unit test fix for Python 3.10.
* Add missing __init__.py file.
2021-05-07 17:26:41 -07:00
d4413dac08 Fix unit tests on Python 3.10. 2021-05-07 16:56:30 -07:00
2f7e0b8489 user - consistently create user home directory on Linux (#71952)
Always use create_homedir when we are asked to create a home directory
in the User class. Don't use the -m and -k parameters from
useradd / luseradd as they behave differently with respect to
preexisting home directories. Instead always specify -M to ensure
that useradd / luseradd do not try to create the home directory.

This does not change potential different behaviours in child classes
of the User class.

Consider the new umask option from #73821 in create_homedir as well as
we do not let luseradd / useradd create the home directory any longer.
2021-05-07 17:00:10 -04:00
2e97240c67 Ignore more Python 3.10 warnings in import test. 2021-05-07 11:19:22 -07:00
69f3447b6b Remove 'default:' from config settings (#74607) 2021-05-07 10:31:32 -04:00
403a5d147d modules: get_url: Fix checksum binary validation (#74502)
From the sha512sum man page:

... The default mode is to print a line with checksum, a character indicating type ('*' for binary, ' ' for text), and name for each FILE.
2021-05-07 10:29:22 -04:00
4d7dc15d4e service - compare version without LooseVersion (#74508)
The distutils module is not shipped with SUNWPython on Solaris.
It's in the SUNWPython-devel package. Do not use LooseVersion.

Fixes: #74488

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2021-05-07 10:22:00 -04:00
a277644301 Add python 3.10 constraint for pyspnego (#74612) 2021-05-06 23:53:50 -07:00
e6d7aecbe4 Reorganize more ansible-test code. (#74611)
* Split out shell command.
* Relocate ansible-test integration code.
2021-05-06 17:59:07 -07:00
065fc3ca17 Remove check for legacy core and extras dirs. 2021-05-06 17:58:25 -07:00
5487e9e4fd Update runtime-metadata sanity test for Python 3.10. 2021-05-06 15:12:06 -07:00
8cccabf1eb cron: removal of deprecations and minor fix (#73591)
* removal of deprecations and minor fix

  name or cron_file is required.
  reboot was removed.
  updated docs to clarify usage.
  now using cron_file=/etc/crontab is an error

  fixes #37355
2021-05-06 18:05:06 -04:00
cbac26e500 Update import sanity test for Python 3.10. 2021-05-06 14:55:41 -07:00
2c3a3bdd9c Update pylint sanity test to work on Python 3.10. 2021-05-06 14:46:12 -07:00
c2e15f45a6 Update ansible-test compile sanity test.
The test has been rewritten to improve error handling and add support for Python 3.10.
2021-05-06 13:51:45 -07:00
35ff4ea95b warn on walking through pathing issues (#74514)
* warn show pathing issues when wallking through provided paths

  moved issues from msg to actual warnings AND a specific return field

  fixes #25314

Co-authored-by: Sam Doran <sdoran@redhat.com>
2021-05-06 16:14:33 -04:00
5463cbb841 Docs: communication.rst - add ansible-community to the IRC channel list (#74570) 2021-05-06 15:10:53 -04:00
55b401a3e7 pause - ensure control characters are always set appropriately (#74568)
* pause - ensure control characters are always set appropriately

On some systems, curses.tigetstr() returns None, which does not work as a control character.

* Add unit tests

* Sort imports

* Skip on older Python

This is an action plugin and only runs on the controller, so no need to test of Python 2. Making
the import hackery work on Python 2 would required some more work which I am not sure is
worth it since we are moving away from Python 2 support on the controller.

* Make the tests work on Python 2 and 3
2021-05-06 15:09:26 -04:00
a6cc508822 Update the module lifecycle document to also cover plugins and collections (#74413)
Co-authored-by: Abhijeet Kasurde <akasurde@redhat.com>
2021-05-06 10:16:43 -04:00
74647a1314 systemd doc update (#74442)
Document that systemd module manages units (timers, services, ...) and not only service. (#74442)

Co-authored-by: Abhijeet Kasurde <akasurde@redhat.com>
Co-authored-by: Brian Coca <bcoca@users.noreply.github.com>
2021-05-06 09:49:42 +05:30
dcb807dea7 Update cli_parsing.rst (#74555)
Bad indent in an example
2021-05-06 09:34:07 +05:30
07fb6f7547 Fix imports for the previous commit.
Also add a changelog entry.
2021-05-05 18:56:29 -07:00
92c40f6365 Relocate change classification files. 2021-05-05 18:56:29 -07:00
5dfc7ee078 Remove Shippable CI provider from ansible-test. 2021-05-05 17:42:13 -07:00
8bd599d048 Change Shippable refs in docs to Azure Pipelines. 2021-05-05 17:21:48 -07:00
c48f80d062 Rename hacking/shippable to hacking/azp.
References to Shippable were changed to Azure Pipelines.

Also remove rebalance.py as it does not work with Azure Pipelines due to the required data not being present.
2021-05-05 17:21:14 -07:00
df2ae06d46 Fix ansible-test imports and paths after refactor.
Also include a changelog entry covering this commit and the previous.
2021-05-05 16:20:15 -07:00
bb3904d299 Reorganize command implementations.
This commit only renames existing files.

Changes to adapt imports will occur in a follow-up commit.
2021-05-05 16:20:15 -07:00
aea0c4dd1b Fix inventory cache prefix typos (#74523)
* Fix section for inventory cache prefix

* Redirect general config inventory cache options to inventory plugin documentation

* Update the template to fix the docs-build error

* removes 'default' entries for config settings with default: ''

* single backticks => italics, double backticks => code

* use 'Default: ~' to match other entries that have no default setting

Co-authored-by: Alicia Cozine <acozine@users.noreply.github.com>
2021-05-05 13:27:40 -04:00
38dd49eb00 ansible-inventory: Handle exception in toml parsing (#74486)
Handle stacktrace raise while parsing inventory in toml format

Fixes: #74404

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2021-05-05 14:12:52 +05:30
68e9e1c999 Switch incidental OS X tests to macOS. (#74564)
* Switch incidental OS X tests to macOS.
* Rename incidental osx.sh to macos.sh.
2021-05-04 11:46:46 -07:00
728b52a6ff Use /usr/bin/python3 on rhelish 9+ (#74547)
The /usr/libexec/platform-python symbolic link is just a backwards compatibility shim there.

See ce226d00fa
2021-05-04 12:48:16 -04:00
4627c30b2e interpreter_discovery: Hide warning in auto_silent (#74509)
Hide warning "No python interpreters" in auto_silent mode.

Fixes: #74274

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2021-05-04 12:01:49 -04:00
b0389c7f11 [cli] remove superfluous trailing space from help (#74551)
Change:
- After we output the newline in help text, we also added a space. This
  caused either a space to show up before the shell prompt (in shells
  like bash), or " %" and a newline before the next prompt on shells
  like zsh that automatically force commands to end with a newline.
- This change removes the extra space, so that peace can be restored in
  the minds of many.
- This only showed up when running commands with no arguments or invalid
  arguments.

Test Plan:
- Ran `ansible`, `ansible -h`, `ansible-playbook`, `ansible-galaxy`, and
  `ansible-galaxy -h`.

Tickets:
- Introduced in #69458

Signed-off-by: Rick Elrod <rick@elrod.me>
2021-05-04 11:42:17 -04:00
c6fda9fc1a [coverage] improve test coverage for together lookup (#74549) 2021-05-04 11:41:22 -04:00
4f0a9488bb [coverage] improve test coverage for indexed_items lookup (#74548) 2021-05-04 11:41:02 -04:00
244bf9c640 [coverage] improve test coverage for vars lookup (#74546) 2021-05-04 11:39:04 -04:00
30912b6a47 dont specify default for port, allow ssh/config (#74526)
* dont specify default for port, allow ssh/config

 also added general note on how defaults work.

Co-authored-by: Abhijeet Kasurde <akasurde@redhat.com>
Co-authored-by: Sam Doran <sdoran@redhat.com>
2021-05-04 11:09:05 -04:00
d101009688 facts - set correct OS family for Rocky Linux (#74530) 2021-05-04 10:14:13 -04:00
2d41e5f99a hostname - add Rocky Linux support (#74545) 2021-05-04 09:11:44 -04:00
728e43bc59 callback_default test - Reduce sleep time to correct CI failures
For unknown reasons, these tests started failing recently because the results
from testhost11 are being returned before testhost10, but only when coverage is
enabled.

Setting the initial host sleep time to 0 fixes this failure.

ci_coverage
2021-05-03 17:55:10 -07:00
fb0d5609cb Code cleanup in ansible-test. (#74529)
* Fix get_available_python_versions calls.
* Make run_playbook vars optional.
* Use ansible_pipelining in inventory.
* Fix type hint.
* Fix order of conditional evaluation.
* Remove unused ibmi platform.
* Add changelog fragment.
2021-04-30 18:50:00 -07:00
ca507ff477 Integration test fixes. 2021-04-30 17:59:28 -07:00
daecb30ac9 The apt_key module did not properly handle GnuPG errors for certain actions (#74478)
* Not all GnuPG return codes were analyzed (rc != 0) and not all relevant GnuPG error information was returned by the 'ansible.builtin.apt_key' module (https://github.com/ansible/ansible/issues/74477)

* Update changelogs/fragments/74478-apt_key-gpg-error-check.yaml

Co-authored-by: Brian Coca <bcoca@users.noreply.github.com>
Co-authored-by: Sam Doran <sdoran@redhat.com>
2021-04-30 16:53:41 -04:00
38fb05102c Makefile: Allow one to specify python version (#74517)
Change:
- Allow overriding python version as env var for Makefile
- Including hacking directory in git export, for docs build

Test Plan:
- Tested as part of recent downstream work

Co-authored-by: Yanis Guenane <yguenane@gmail.com>
2021-04-30 16:23:41 -04:00
9bd70045c9 Fix BaseFileCacheModule#keys to respect prefix (#72789)
* Fix BaseFileCacheModule#keys to respect prefix

Change:
- Previously BaseFileCacheModule#keys would return keys with the cache
  prefix. These keys are impossible to retrieve from the cache without
  removing the prefix or using the cache without a prefix.
  Now it removes the prefix from the key and only returns keys that
  share the same prefix as the cache.

Test Plan:
- New unit tests

* Add explicit BaseFileCacheModule#keys test

Test that files that do not match the cache prefix are ignored.
Test that the prefix is removed from the cache key.
2021-04-30 15:28:28 -04:00
d8c20a73a4 [ansible-test] Add Fedora 34, update Fedora 33 (#74506)
Change:
- Added Fedora 34 container image to docker.txt
- Dropped Fedora 32 from CI
- Added Fedora 34 to CI
- Updated Fedora 32 and 33 containers for ssh-related fixes
- Move cron fix from 698eae3f3d into
  cron_setup and make it more generic; it can affect modern distros too.

Test Plan:
- ci_complete

Signed-off-by: Rick Elrod <rick@elrod.me>
2021-04-30 11:35:12 -05:00
6ea81b84ed apt_key - correct error message about the failure to import a 'gpg' (#74476) 2021-04-30 12:06:38 -04:00
b765d3799b update backporting instructions to reflect new latest stable branch, some edits (#74512)
Co-authored-by: Alicia Cozine <acozine@users.noreply.github.com>
2021-04-30 11:42:03 -04:00
d147c1ef1f apt_key test - Change the URL of the GPG key to S3 and remove it from the repo (#74483) 2021-04-30 10:44:50 -04:00
a30c55f68a Remove deprecated common.removed module_util.
Tests have been updated to reflect its removal as well.
2021-04-29 16:07:56 -07:00
1a7923e318 pip: Idempotency tests (#74473)
Co-authored-by: Abhijeet Kasurde <akasurde@redhat.com>
Co-authored-by: David Moreau Simard <dmsimard@redhat.com>
2021-04-29 15:14:18 -04:00
f1a5c411d9 Fix sequence lookup message and add tests (#74472)
* add test for bad kv arg value
* add simple form parsing tests and make error messages the same
* add changelog
2021-04-29 15:12:23 -04:00
74b2add460 paramiko_ssh - mark connection as connected when successful (#74459)
* Remove unused import from test
2021-04-29 15:11:02 -04:00
98495ae99d Remove unused FileLock import (#74449) 2021-04-29 15:04:34 -04:00
8a2fc854f4 Add plugin config lists (#49627)
* add plugin config lists
* and dump config for plugins
*  also list configs under PLUGINS for 'all' list
2021-04-29 15:01:05 -04:00
aa12af1d34 Use our own copy of the Codecov uploader (#74460)
Due to the recent security incident, use our own copy hosted in S3
to mitigate future risk from running an arbitrary script downloaded from a
remote and untrtusted server.
2021-04-29 10:26:23 -04:00
112b175f17 Update the porting guide for a new ansible version (#74490) 2021-04-29 10:03:21 -04:00
f40ab25909 Improve a documentation of the first_found lookup plugin (#73080)
Co-authored-by: Wojciech Ściesiński <wojciech.sciesinski@huuugegames.com>
2021-04-29 10:02:21 +05:30
baa371e7b5 Add comments to keep collection loader in sync. 2021-04-28 17:45:42 -07:00
c63b867836 fixed URL for becoming an unprivileged user doc (#74448) 2021-04-28 16:14:56 -05:00
3cff54d69b Fix missing delegate display (#74370)
* dont rely on vars, task already gives us info
* ensure we always display delegation in host label
* also added parens with ansible_host to show  target host vs resolved host
* delegating to self is not delegating
* delegated vars restoration for backwards compat
* tests need mock task with delegate_to
2021-04-28 13:24:38 -04:00
26214788ee Retrofit shippable scripts to work with AZP
Co-authored-by: Matt Clay <matt@mystile.com>
2021-04-28 09:43:41 -07:00
57d661e96f Templar: remove _fail_on_{lookup,filter}_errors (#73785)
Both were added in 62d79568be and never
used, always being set to True.
2021-04-28 17:49:16 +02:00
3bc2e7783c Binary GnuPG keys downloaded via URLs by the 'ansible.builtin.apt_key' module were corrupted so 'gpg' could not import them (https://github.com/ansible/ansible/issues/74424) (#74474) 2021-04-28 10:41:14 -04:00
9e61952cdc command - add command name to warning (#74475) 2021-04-28 10:22:15 -04:00
04e57d28e3 [facts] add hpux fc info, refactor aix and solaris code (#57406)
* correctly parse device from string
* check for command presence before running them
* check for command presence and return code for solaris and aix as well
* add changelog
2021-04-28 10:17:19 -04:00
7b03ebf939 setup: Add note and example of delegated facts (#74479)
* Added a note about 'delegated_facts'
* Added an example of 'delegated_facts'

Fixes: #67067

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2021-04-28 08:53:36 -04:00
f194108a26 docs: Improve documentation for regex_search,replace,findall (#74368)
Improve the documentation for regex_search by adding a few more
realistic examples such as showing how to extract only parts of a
string by using regex groups.

Extend regex_findall and regex_replace by an example that includes
the multiline and ignorecase parameters.
2021-04-28 08:45:01 -04:00
68accca995 Remove needless get_next_task_for_host calls (#74174)
Called with `peek=True` and the return values are not used.

ci_complete
2021-04-28 13:19:37 +02:00
7099657dd7 Basic: don't call lstat when check_mode (#64279)
While mode is specified in check_mode, don't call lstat.
Since file may not present.

Fixes: #61185
2021-04-28 13:47:03 +05:30
b043afa025 apt: Fix fail_json API call (#74444) 2021-04-28 10:13:38 +05:30
c387b318a6 AWS: update reference to auto-retrying ResourceNotFound (#72314)
AWS Dev Guidelines: update reference to auto-retrying ResourceNotFound

Co-authored-by: Abhijeet Kasurde <akasurde@redhat.com>
2021-04-28 09:59:12 +05:30
877e5b3dfe Fix ansible-test AZP build lookup. 2021-04-27 18:32:46 -07:00
be7de9844e Remove obsolete Shippable specific scripts.
Also remove some other unncessary code from CI scripts.
2021-04-27 17:11:09 -07:00
34c9ed8a28 Product-related updates. (#74454) 2021-04-27 16:19:57 -05:00
c4e76a7f80 Add collection config support to ansible-test. 2021-04-27 12:09:34 -07:00
bacede7a2b Update first_found documentation (#70502)
* import_tasks do not work with loop. We should use include_tasks instead
* update documentation
2021-04-27 13:53:21 -04:00
62cba4a6ad incidental_setup_rabbitmq test - Use official repo for rabbitmq-erlang
Previously it was hosted on bintray, but that service is shutting down on May 1. Using the new
repository also required using a newer version of RabbitMQ.
2021-04-27 10:02:27 -07:00
8223dfccbe ansible-test - Improve __main__ checks. 2021-04-27 09:00:26 -07:00
39a49963b5 Update examples/scripts/uptime.py (#74438)
Fixes missing parameter 'verbosity'

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2021-04-27 17:27:55 +02:00
fcbf5c3185 [module_utils] make to_bits actually return (#74409)
Change:
- Instead of returning the `str` type, return the value that was
  calculated.

Test Plan:
- New unit tests.

Signed-off-by: Rick Elrod <rick@elrod.me>
2021-04-27 17:15:24 +02:00
9d9b08bece fix spacing to fix header, reorg contributing page (#74421)
Co-authored-by: John R Barker <john@johnrbarker.com>
2021-04-27 10:41:10 -04:00
f97787ca74 Update argcomplete docs links on installation guide (#74410)
Link on installation docs is outdated. Switch to currently docs at: https://kislyuk.github.io/argcomplete/
2021-04-27 09:40:37 -05:00
a75bae8a62 update versions (#74432) 2021-04-27 09:36:53 -05:00
d1e6ee7b21 update changelog links and release-maint page (#74431) 2021-04-27 09:33:21 -05:00
8d499bbc83 Update Kubernetes collection name in docs (#74440) 2021-04-27 19:00:03 +05:30
63afb33d86 Use is_boto3_error_code in 'standard' example (#72313)
Use is_boto3_error_code in 'standard' example rather than e.response['Error']['Code'] (#72313)

Co-authored-by: Sloane Hertel <shertel@redhat.com>
2021-04-27 17:49:00 +05:30
cf08c23b4f Update AWS dev guides to use collections utils and fragments (#72312) 2021-04-27 17:34:49 +05:30
ddfc648d37 Update VMware library installation docs (#71219)
Depending upon OS/distro, please use pip/pip3.
2021-04-27 15:19:03 +05:30
c2985c491b Update complex_data_manipulation.rst (#72509) 2021-04-27 14:04:48 +05:30
4880fee6ca Fix typo in Makefile (#74396)
Fixed minor typo specfic -> specific
2021-04-27 11:42:57 +05:30
cb7f4f1971 Fix pypi-test-container port conflict. 2021-04-26 14:41:02 -07:00
c1879a5011 use versioned doclink for url references (#74245)
* use versioned doclink for url references

Co-authored-by: Felix Fontein <felix@fontein.de>
2021-04-26 13:07:38 -04:00
85e7108d52 force version on deprecation (#74338) 2021-04-26 13:02:00 -04:00
d8fa2b50d5 Fix world readable setting (#74324)
* Fix world readable setting

   now uses shell option in all cases, the old constant still exists
    as 'documentation' but it not settable.
   also fix the docsite link in warnings/errors

* fix typose#

* fix comment#

* added deprecated to config

* missing :

* import cleanup
2021-04-26 12:49:59 -04:00
68bdfd0052 Let unarchive handle huge files
Allow extracting archives that contain files which size exceeds free system memory.

Co-authored-by: Abhijeet Kasurde <akasurde@redhat.com>
2021-04-26 14:06:10 +02:00
ecc5a53288 Update default containers to 3.4.0. (#74415)
* Update default containers to 3.4.0.

The 3.4.0 containers use Python 3.6 (the system Python) for `/usr/bin/python3`.

Python 3.9 continues to be the default Python version selected by `ansible-test` for these containers.

* Fix shebang on build-ansible.py.

Using `python` instead of `python3` allows `ansible-test` python interception and requirements install to function.
2021-04-25 21:25:32 -07:00
7ca5dede97 Add weos4 network platform to documentation (#74088)
* Add weos4 network platform to documentation

* Fix small format issues
2021-04-23 23:52:14 +02:00
c90922ee36 Docs - Split Developing collections page, add info on optional module_utils (#74105)
*
2021-04-23 17:03:46 -04:00
8698855ffd Case-insensitive set theory filters (#74256)
Fixes #74255

* Fix call to 'unique(case_sensitive=False)' triggering error when falling back to Ansible's version which **is** case-sensitive
* Test multiple situations of 'unique' filter errors with fallback not handling specific parameters

Signed-off-by: Rick Elrod <rick@elrod.me>
Co-authored-by: Rick Elrod <rick@elrod.me>
2021-04-23 12:44:43 -05:00
e6a5245d60 Using "~" instead of "+" for concatination (#74364)
Changed FAQ examples to conform with the Jinja documentation:
If both values on either side of a plus/+ are numbers, they will be added whereas using "~" will convert all operands into strings and then concatenate them. Closes #73799.
2021-04-23 12:44:09 -05:00
7fd989d008 Detect Homebrew on Mac M1 (Apple Silicon) (#74378)
Homebrew's default install location for macOS on ARM is /opt/homebrew.
Source: https://docs.brew.sh/FAQ

On a Mac M1 (Apple Silicon), homebrew will be installed at
/opt/homebrew/bin/brew.
2021-04-23 11:01:52 -04:00
6cfe36fa1f Set ansible-test min controller Python to 3.8. (#74395)
- Version neutral sanity tests now require Python 3.8 or later.
- Unit tests for controller-only code now require Python 3.8 or later.
2021-04-23 00:26:19 -07:00
f541c0af23 Update ansible-test default test container. (#74393)
* Update ansible-test default test container.
* Switch generic Python tests from 3.6 to 3.9.
2021-04-22 23:23:16 -07:00
ff88a2a06d Fix combinated run of unarchive and uri tests under centos 6
The unarchive integration test installs pinned packages via pip,
the uri test installs them from system packages. This explodes.
PR lets unarchive uninstall packages after test ran.
2021-04-22 17:09:10 -07:00
c295de661c Correct splitext() description, and example (#74377)
`splitext()` returns a 2-tuple of strings, and the last element of the return value includes the `.`
2021-04-22 15:40:58 -05:00
7b5dad2321 validate-modules: don't error on valid Ansible YAML in EXAMPLES 2021-04-22 12:42:47 -07:00
567361b124 Add description for COLLECTIONS_SCAN_SYS_PATH (#74351)
Fixes: #74275

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2021-04-22 15:08:52 -04:00
14ff5e213c Fix ansible-test docker container IP detection. 2021-04-22 11:54:54 -07:00
6119fb0a9a lighten navigation background to make section labels easier to read for core docs (#74356)
* make section labels for /ansible-core/ docs easier to read, with black text and lighter gray background
2021-04-22 13:54:27 -05:00
bf7d4ce260 Abstract away libyaml details into yaml utils (#72607)
* Add yaml utils file and use it

* Linting fix and missing import

* Abstract a few more details

* Parser imports

* Don't use CSafeDumper in AnsibleDumper

* Move and use convert_yaml_objects_to_native when libyaml is present

* yaml_load and yaml_dump, instead of safe_*

* re-use HAS_LIBYAML from utils.yaml

* add changelog fragment

* Address recent changes

* Use representer instead of recursive type converter

* Restore needed import

* move yaml utils to module_utils

* Properly guard imports

* Update from_yaml(_all)? to handle text wrappers with CSafeLoader

* Use yaml utils for legacy_collection_loader

* Add HAS_YAML, and ignore pylint issue

* oops

* GPL->BSD
2021-04-21 16:47:03 -05:00
6418f368e3 Fix pb subs collapse (#74301)
* fix subdir parsing for plays

  fixes #74283

  Co-authored-by: Nikolaos Kakouros <nkak@kth.se>
2021-04-21 17:27:41 -04:00
a3e7cf0110 Update alpine repo to community for libuser (#74374) 2021-04-21 16:20:50 -05:00
738132da95 [ansible-test] add freebsd/13.0 remote (#74328)
Change:
- FreeBSD 13.0 was released on the 13th, add it to ansible-test.

Test Plan:
- ci_complete

Signed-off-by: Rick Elrod <rick@elrod.me>
2021-04-21 15:13:41 -05:00
fdbef02923 Update docs on working on docs (#74201)
* Fix the Makefile's htmlsingle command.
Co-authored-by: Toshio Kuratomi <a.badger@gmail.com>
2021-04-21 15:15:27 -04:00
c21ad66e61 Remove unused PlayIterator.cur_dep_chain (#74366)
Introduced in fb797a9e77.
Usage removed in cae682607c.
2021-04-21 11:39:22 -04:00
7625c8f3d3 arg_spec - remove unused imports (#74354) 2021-04-21 11:38:23 -04:00
4c79dd16be Update the porting guide for a new ansible version (#74362) 2021-04-21 10:23:31 -04:00
437a08eb6d Map Debian 8 to Python 2 (#74152)
* Map Debian 8 to Python 2

If Python 3 is installed on Debian 8 Ansible cannot run, as the version
is too old (3.4)

* Add integration test for python interpreter discovery on Debian 8

* fix test issue on Debian 9, add changelog

* un"fix" not broken test :D

Co-authored-by: Fabian Klemp <fabian.klemp@elara-gmbh.de>
Co-authored-by: Matt Davis <mrd@redhat.com>
2021-04-20 15:28:24 -07:00
e6af2d6827 Fix ansible-test coverage traceback when no data.
If no coverage directory exists, ansible-test coverage would traceback.

Now it silently continues just as if the directory was present but empty.
2021-04-20 14:33:05 -07:00
2cbfd1e350 Add porting guide and documentation for changes to argument spec validation (#74268)
* Add ArgumentSpecValidator to docs
* Improve docs for ArgumentSpecValidator
* Document removal of private methods

* Update module_utils documentation
    - Add docs for argument spec classes as well as validation and parameters files.
    - preserve the order in the source for errors.py
    - document DEFAULT_TYPE_VALIDATORS so it can be referenced elsewhere
    - fix automodule directive for validation.py

* Update docs in arg_spec and paremeters
    - This improves the generated documentation.

* Document breaking changes in porting guide.
* Update formatting in porting guide and add a Deprecated section
* Fine tune module_utils documentation


* Move instance docstring to the __init__ method
  Remove optional description since it fails the sanity test and I am not 100% it is valid anyway.

* Remoe incorrect parameter from docstring
  This was changed a while ago but wasn't removed from the docstring.

* Use attr rather than attribute
  The py:attribute: domain only exists in newer Sphinx >= 3.1.

* Improve documentation on exceptions
* Final pass
    - use args/kwargs instead of param
    - fix formatting errors that didn't display examples correctly
    - format TypeErrors so they are referenced as classes
    - specify complex types
2021-04-20 15:40:53 -04:00
6e56e72d99 vmware: Add a note about known issue (#73273)
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
Co-authored-by: Sandra McCann <samccann@redhat.com>
Co-authored-by: Alicia Cozine <879121+acozine@users.noreply.github.com>
2021-04-20 14:11:45 -04:00
c0cc574e65 Update lookup.rst (#73716)
Document that users must pass `allow_unsafe=True` as an option in the lookup to allow templating, with a note about security implications.

Co-authored-by: Alicia Cozine <879121+acozine@users.noreply.github.com>
Co-authored-by: Sandra McCann <samccann@redhat.com>
2021-04-20 12:54:54 -05:00
ml
c9c84594d8 Docs: Fix k8s_config_resource_name YAML example (#74129)
The `name` key should be beneath `metadata`:
2021-04-20 13:37:44 -04:00
9ed0e37e53 Add a link to Jinja 2 templates (#74348)
Added a link to Jinja 2 templates in playbooks_templating documentation page.
Fixes: #74313

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2021-04-20 12:14:08 -05:00
49d4442378 Add umask option to user module (#73821)
* Add umask option to user module

* Fail on setting both umask and local: True

* Add integration test

* Add changelog

* Run integration tests only if HOME_MODE is not set

* Run integration tests only on Linux

Co-authored-by: Matt Clay <matt@mystile.com>
2021-04-20 12:01:56 -04:00
5f391a72ee Update playbooks_filters.rst (#74242)
##### SUMMARY
Make the `random` filter description more clear.
2021-04-20 11:59:16 -04:00
5e5bfa8116 remove deprecated ansible.module_utils._text from documentation (#73211)
According to comment in ansible.module_utils._text it is deprecated and
should not be used. This is now reflected in the documentation.
2021-04-20 11:53:27 -04:00
99a2b5f300 Provide results to examples (#73984) 2021-04-20 11:52:54 -04:00
4494ef3a9d defend against bad or missing crypt (#74304)
* defend against bad or missing crypt

  fixes #74279
2021-04-20 11:47:34 -04:00
d44eb03f49 Remove include from tests (#74330) 2021-04-20 11:19:29 -04:00
9369bd6ca1 correct how to install Docker SDK for Python (#74288)
* docs: correct guide for the latest Docker SDK for Python
Co-authored-by: Felix Fontein <felix@fontein.de>
Co-authored-by: Sandra McCann <samccann@redhat.com>
Co-authored-by: Daeseok Youn <daeseok.youn@navercorp.com>
Co-authored-by: Alicia Cozine <879121+acozine@users.noreply.github.com>
2021-04-20 11:03:30 -04:00
7b39ee361d corrected epmhasis line (#74254)
need to be careful when adding lines as you create a different offset
2021-04-20 09:38:06 -05:00
2296da95a2 fix module schema (#74295)
* fix module schema

  not out of date hardcoded list anymore, uses 'current + 4' to
  set valid deprecation targets

Co-authored-by: Matt Clay <matt@mystile.com>
2021-04-20 10:02:39 -04:00
698eae3f3d [tests] Work around vixie-cron and PAM issue, el6
Change:
- This works around an issue that causes the cron test to fail sometimes
  on el6.

Test Plan:
- ansible-test integration cron --docker centos6

Signed-off-by: Rick Elrod <rick@elrod.me>
2021-04-19 20:41:30 -07:00
9f1513d4c0 [become] Add Solaris chmod ACL fallback
Change:
- Newer Solaris drops setfacl. Add a fallback for its chmod ACL syntax.

Test Plan:
- New units

Tickets:
- Fixes #74282

Signed-off-by: Rick Elrod <rick@elrod.me>
2021-04-19 20:28:57 -05:00
7d64aebdd3 [become] Fix solaris permissions regression
Change:
- Regression introduced in #70785
- When macOS chmod ACL syntax is used, Solaris-derived chmods return
  with a status of 5. This is also used for our sshpass handling,
  because sshpass will return 5 on auth failure. This means on Solaris,
  we incorrectly assume auth failure when we reach this branch of logic
  and try to run chmod with macOS syntax.
- We now wrap this specific use of chmod in an exception handler that
  looks for AnsibleAuthenticationFailure and skips over it. This adds
  another authentication attempt (something we normally avoid to prevent
  account lockout), but seems better than the regression of not allowing
  other fallbacks to be used.
- Without this patch, if setfacl fails on Solaris (and sshpass is used),
  we do not try common_remote_group or world-readable tmpdir fallbacks.

Test Plan:
- New unit

Signed-off-by: Rick Elrod <rick@elrod.me>
2021-04-19 20:28:57 -05:00
7786dbbdc1 Split out module/module_utils unit test execution.
- Unit tests for `modules` and `module_utils` are now limited to importing only `ansible.module_utils` from the `ansible` module.
- Unit tests other than `modules` and `module_utils` are now run only on Python versions supported by the controller (Python 3.8+).
- Unit tests are now run in separate contexts (`controller`, `modules`, `module_utils`), each using separate invocations of `pytest`.
2021-04-19 15:44:58 -07:00
3740d7b028 Only check if play.hosts is a template when the play hasn't been finalized (#73941)
* Extend finalized logic to strategy
* Add changelog fragment
2021-04-19 13:03:40 -04:00
d8bf4206e4 netconf - handle import error when running in FIPS mode (#73992)
* Handle netconf plugin ncclient import error when running in FIPS mode

*  While running in FIPS mode importing ncclient result in
   InternalError raised by cryptography
*  Refer https://github.com/ansible/ansible/pull/65477
2021-04-19 12:41:55 -04:00
325ccf22fe Fix issue with version 3 in docs version list (#74089)
Previously would subsitute the "3" in "s3" instead of the version location in the URL
2021-04-19 18:33:35 +02:00
9ba6cf9a72 Relocate misplaced unit tests. 2021-04-16 22:23:40 -07:00
277a06f641 Clean up ansible-test cloud plugins. (#74322)
- Improve code reuse.
- Add missing type hints, fix existing ones and convert them to PEP 484 style.
- Add missing imports and clean up existing ones.
- Add missing docstrings and clean up existing ones.
2021-04-16 18:49:22 -07:00
17237c1d88 Deprecate Py2.6 support for target nodes (#74165) 2021-04-16 11:42:29 -05:00
07939b04f3 [2.12] 'attributes' (#73707)
* wip 'attributes'

* added version added tests

* syntzx

* not bile

* correztlys merges

* moved desc to frag

* simpler as dict

* unused

* clog

* Update lib/ansible/utils/plugin_docs.py

Co-authored-by: Jacob Floyd <cognifloyd@gmail.com>

* unnoted

* added action plugins

* longer list

* add sttri schema

* huh?

* itsdict

* dictit

* yolo

* gnore for now

* moar attribs

* allow extras

* positive

* added loop, documented 'imports'

* support is now none/partial/full

* import_playbook is outside host loop

Co-authored-by: Jacob Floyd <cognifloyd@gmail.com>
2021-04-16 18:17:00 +02:00
185d410316 Factor out host_label() in default stdout callback plugin (#73814)
This simplifies rendering the hostname (or hostname+delegated host) in
the default callback module, and reduces code duplication

I've chosen not move where in each handler the host label is rendered,
in case subsequent operations has side effects. However I'm happy to
change that if considered safe.

I've chosen not to change the formatting operator used (%), to avoid
changes in rendering that might result.

Signed-off-by: Alex Willmer <alex@moreati.org.uk>
2021-04-16 11:12:25 -04:00
a7c8093ce4 [2.12] Add accept_newhostkey option to git module (#73819)
* Add integration test for accept_newhostkey option

* Add changelog
2021-04-16 11:10:35 -04:00
019452dda7 uri - fix traceback on multipart-form int value (#74302) 2021-04-16 11:09:31 -04:00
fdee5ca16d Add cacheonly option to yum and dnf modules (#73820)
* Add integration test

* Add changelog

Co-authored-by: Matt Clay <matt@mystile.com>
2021-04-16 11:08:52 -04:00
0c101f3f76 Add epoch_int in date_time facts (#73822)
* Add unit test

* Add changelog
2021-04-16 11:03:07 -04:00
8d027436d4 Updated COLLECTIONS_4.rst to include ansible-inclusion repo link (#74309)
* Updated COLLECTIONS_4.rst to include ansible-inclusion repo link for new collection submission

* Update COLLECTIONS_4.rst

* Update COLLECTIONS_4.rst

* Update docs/docsite/rst/roadmap/COLLECTIONS_4.rst

Co-authored-by: Sandra McCann <samccann@redhat.com>

Co-authored-by: Alicia Cozine <879121+acozine@users.noreply.github.com>
Co-authored-by: Sandra McCann <samccann@redhat.com>
2021-04-16 13:12:51 +01:00
7fecb7ccc3 Actually run blocks/finalized_task test (#74291) 2021-04-16 08:04:11 +02:00
7ef3dc2b8b [controller ansiballz] escape directory regex (#74270)
Change:
- We were passing a directory name directly to re.compile().
  If the directory isn't valid regex (or is) this can have odd side
  effects, such as crashing.
- Fix a few other similar cases, but less likely to be a real issue.

Test Plan:
- New test

Signed-off-by: Rick Elrod <rick@elrod.me>
2021-04-15 17:06:58 -05:00
cf4a9fcd0f Prevent traceback when task depth exceeds python recursion depth (#73999) 2021-04-15 15:52:08 -05:00
1082e2ab79 Catch errors getting filters (#74127)
* Catch errors getting filters, and fail

* Add changelog

* Switch to warnings instead of errors, to match other plugin loader behavior

* Add tests

* Handle collections
2021-04-15 15:51:41 -05:00
28a2d9b4ae Remove __requires__ attribute for pkg_resources (#74294) 2021-04-15 15:20:20 -05:00
e3eeb88f7c removed unused imports (#74299) 2021-04-16 05:57:38 +10:00
664531d7d6 Prevent ansible_failed_task from further templating (#74290)
* Prevent ansible_failed_task from further templating

Fixes #74036

* Add changelog
2021-04-16 05:48:57 +10:00
c6945de899 Ini fixes (#74285)
* avoid 'mixed' param formats

* added tests

* clog

* fixed alignment
2021-04-16 05:36:49 +10:00
8e5dc7306e Typo fix in help output (#74277)
Should still fit in 80 chars
2021-04-16 05:18:34 +10:00
b91749d671 fix config manager list loption with choices (#74267)
fixes #74225

  Co-authored-by: Kim Nørring <github@norring.dk>
2021-04-16 05:07:43 +10:00
0a7670d1f7 deprecated include (#71262)
* deprecated include

  Update lib/ansible/modules/_include.py
  updated version numbers in schema check (real fix in separate PR)

Co-authored-by: flowerysong <junk+github@flowerysong.com>
Co-authored-by: Matt Clay <matt@mystile.com>
2021-04-15 14:19:04 -04:00
3cbe16fa7a Fix fallback to devnull when trying to preserve stdin in worker (#74192)
ci_complete
2021-04-15 10:14:48 +02:00
ee38202fc0 Update the porting guide for ansible package 4.0.0 alpha4 (#74280) 2021-04-14 16:42:28 -04:00
126e9244c2 updates list of available versions for Ansible 3 (#74265)
* updates list of available versions for Ansible 3
Co-authored-by: Alicia Cozine <acozine@users.noreply.github.com>
2021-04-13 16:59:36 -04:00
84e473a26e All lookups ported to config system (#74108)
* all lookups to support config system

 - added get_options to get full dict with all opts
 - fixed tests to match new error messages
 - kept inline string k=v parsing methods for backwards compat
 - placeholder depredation for inline string k=v parsing
 - updated tests and examples to also show new way
 - refactored and added comments to most custom k=v parsing
 - added missing docs for template_vars to template
 - normalized error messages and exception types
 - fixed constants default
 - better details value errors

Co-authored-by: Felix Fontein <felix@fontein.de>
2021-04-13 15:52:42 -04:00
4819e9301b Bump azure-pipelines-test-container to version 1.9.0 2021-04-13 10:12:23 -07:00
b3b1dde648 various fixes to command (#74212)
* various fixes to command

  - Updated splitter to allow for all expected args in ad-hoc
  - Ensure we always return the returns we promissed to always return (i.e stderr/stdout)
  - Updated docs to clarify creates/removes precdence in checking
  - Removed abspath from chdir to allow reporting to handle symlinks correctly
  - Corrected tests to new output messages

Co-authored-by: Felix Fontein <felix@fontein.de>
2021-04-13 12:52:29 -04:00
29aea9ff34 constructed - Add keyed_groups suboptions 'default_value' and 'trailing_separator' (#74005)
* Support omitting the trailing separator when a dictionary key's value is an empty string

* Support a default value when the value used in the group name is an empty string

* Add tests

* change log
2021-04-13 11:59:50 -04:00
270f109bb3 fix see_also formatting (#74252) 2021-04-13 11:51:39 -04:00
5e55af2f02 [test coverage] Add tests for set_stats (#74243)
* satisfy the all-knowing, ever present God of Sanity and use 'grep -c' vs. 'wc -l'
2021-04-13 11:43:53 -04:00
93fdba7013 [bugfix][coverage] find module should consider file size with file_type=any (#74241)
* add changelog
* fix cl text
* Update changelogs/fragments/74241-find-checks-size-with-any.yml

Co-authored-by: Rick Elrod <rick@elrod.me>
2021-04-13 11:41:44 -04:00
fa0bccf6a1 [module_utils.distro] Fall back to bundled (#74229)
Change:
- When a "distro" package exists in PYTHONPATH but isn't what we expect,
  fall back to our own vendored one and use it. This prevents a
  traceback if someone has some random thing that provides "distro" but
  isn't actually the "distro" library we need.

Test Plan:
- new tests

Tickets:
- Fixes #74228

Signed-off-by: Rick Elrod <rick@elrod.me>

* nuke playbook test file

Signed-off-by: Rick Elrod <rick@elrod.me>

* test fixes

Signed-off-by: Rick Elrod <rick@elrod.me>
2021-04-13 11:27:52 -04:00
aae5bc5b9e [advanced_host_list] 100% coverage + fix a bug (#74227)
Change:
- Tests for advanced_host_list; it is now at 100% coverage.
- There was a typo (host vs hostnames) where when the host pattern
  failed to parse, instead of treating the name as a literal as
  intended, it would trigger UnboundLocalError. This didn't fatal
  as there's a global "Exception" handler below, but it did lead to
  an ugly error and incorrect behavior.

Test Plan:
- New tests
- Local experimenting

Signed-off-by: Rick Elrod <rick@elrod.me>

* changelog

Signed-off-by: Rick Elrod <rick@elrod.me>

* fix tests

Signed-off-by: Rick Elrod <rick@elrod.me>
2021-04-13 11:26:29 -04:00
bd1acb74c8 [playbook/play.py] Increase error test coverage (#74217)
Change:
- Mostly increase error coverage for various conditions in play.py
- Also fix a string in an error, where get_name() was called before
  self.name was read in, so get_name() was always ''.

Test Plan:
- new tests

Signed-off-by: Rick Elrod <rick@elrod.me>

* Fix regex for py2 and py3

Signed-off-by: Rick Elrod <rick@elrod.me>

* py2 hates me

Signed-off-by: Rick Elrod <rick@elrod.me>
2021-04-13 11:22:02 -04:00
19aeb4706d [conditional] Remove support for bare variables (#74208)
Change:
- Variables used in ``when`` conditionals are no longer parsed and
  attempted to be converted to booleans. All non-empty strings are
  considered true (empty strings, false).

Test Plan:
- Updated existing tests
- Added a bunch of new tests with various kinds of truthy/falsy
  values.

Tickets:
- Fixes #74134

Signed-off-by: Rick Elrod <rick@elrod.me>
2021-04-13 11:12:10 -04:00
ce96591313 Remove deprecated cache interfaces (#74198)
* update unit test
* Remove FactCache 'update' method
2021-04-13 11:08:20 -04:00
39bd8b99ec async_wrapper more info on end (#74199)
be consistent on information returned
 normalize 'return functions'
 fix unit test
 add a bit more context on some failures
2021-04-13 10:30:13 -04:00
8502c23028 Fix links to the collections org in doc & FR forms 2021-04-13 16:23:26 +02:00
9f002d9f60 📝 Make issue forms verbose and helpful (#74185)
Co-authored-by: John R Barker <john@johnrbarker.com>
Co-authored-by: Sloane Hertel <shertel@redhat.com>
2021-04-13 15:52:03 +02:00
3a244c5533 config lookup can now handle collection plugins (#74250)
use load_name of valid plugin to find config, will handle the renamed loaded plugin that collections do:
`ansible_collection.<ns>.<collname>.plugins.<type>.<name>`
2021-04-13 00:00:43 -04:00
f38d03f6fb [ansible-test] nuke virtualenv-isolated.sh
Change:
- This isn't used in our tests, so the suggestion was to just remove
  it.

Signed-off-by: Rick Elrod <rick@elrod.me>
2021-04-12 15:09:18 -07:00
481c036632 update intersphinx links for Ansible 3 2021-04-12 14:53:11 -07:00
d7f826c987 Change look and feel of the ansible-core docs (#74200) 2021-04-12 16:39:13 -04:00
b752d07163 Overhaul ansible-test container management.
This brings ansible-test closer to being able to support split controller/remote testing.
2021-04-12 12:40:36 -07:00
9f856a4964 config lookup can query plugin settings (#74186)
* config lookup can query plugin settings
2021-04-12 15:30:25 -04:00
bb7b17fded added apt lock_timeout (#74095)
* added apt lock_timeout

should help control issues with apt db being locked out
also cleanup imports
2021-04-12 14:10:50 -04:00
c7473828c7 Docs: Remove duplicate word (#74223)
The word "to" was erroneously used twice consecutively.

Signed-off-by: Matthew Cengia <mattcen@mattcen.com>
2021-04-11 05:50:36 -05:00
b70a42f693 fix typo in _collection_finder.py (#74218) 2021-04-10 05:13:50 -05:00
3504f4c45f [yum] report upgraded multiarch packages (#73548)
Change:
- Previously when the same package name was installed twice under
  different architectures, we only reported it once in changes.updated.
- This was the result of using a dict internally and keying on package
  name alone.
- This change still keys on package name but turns the values into lists
  which can contain multiple packages per name.

Test Plan:
- Added a lot of tests around multi-arch support
- Added some tests around virtual provides as well

Tickets:
- Fixes #73284

Signed-off-by: Rick Elrod <rick@elrod.me>
2021-04-10 02:36:20 -05:00
8c413749fc [test/support/docker_swarm] remove deprecation (#74203)
Change:
- Remove deprecation block from support test code

Tickets:
- Fixes #74146

Signed-off-by: Rick Elrod <rick@elrod.me>
2021-04-09 22:38:33 -05:00
9c506031fa Solaris: Correct version check in svcadm_supports_sync API (#73860)
Co-authored-by: Abhijeet Kasurde <akasurde@redhat.com>
2021-04-10 08:02:58 +05:30
ef554d0378 [playbook] error on empty, error on 'include' (remove two deprecations) (#74172)
Change:
- Remove two deprecated features
- We now error if a playbook is an empty list instead of just skipping
- We now error if using 'include' instead of 'import_playbook'

Test Plan:
- Added new tests for new errors

Tickets:
- Fixes #74133

Signed-off-by: Rick Elrod <rick@elrod.me>

* sanity & changelog

Signed-off-by: Rick Elrod <rick@elrod.me>
2021-04-09 10:28:24 -04:00
becf941673 Add PyPI proxy container for tests on Python 2.6. 2021-04-08 15:47:23 -07:00
d7df8a4484 [cron] Remove deprecated features (#74197)
Change:
- Require name always
- Drop 'reboot' parameter in favor of 'special_time: reboot'

Test Plan:
- CI

Tickets:
- fixes #74132

Signed-off-by: Rick Elrod <rick@elrod.me>
2021-04-08 15:50:27 -04:00
d5ce6e6bed Increase test coverage for command module (#74183) 2021-04-08 15:24:01 -04:00
b07a78b4ba remove deprecated connection password functions (#74155)
* they were moved from connecitons to become plugins
* fixed clog, removed sanity ignore
* fixed tests to use become functions
2021-04-08 15:11:06 -04:00
45ab6fddf3 removed task parameters (#74154)
* fixed clog
* removed ignore
* fix typose
* removed ignore
2021-04-08 15:09:45 -04:00
7443e9d659 pin docutils to 0.16 until theme problem is fixed (#74193) 2021-04-08 13:37:00 -05:00
4df9ea86c2 ansible-test - change diff mathching regexp so prefixes are optional
The `a/` and `b/` prefixes can be disabled in the `git diff` output by setting
`diff.noprefix` to `true`. The output is still a valid diff, but `ansible-test` would
raise an exception since without the prefixes, it thought the diff line was invalid.
2021-04-07 12:50:39 -07:00
7b79b69369 ansible-test - ensure trailing separator is added for connection unit test target (#74176)
For connection units tests, if the `__init__.py` file is modified, the trailing separator was
not added, making the target invalid.
2021-04-07 13:27:09 -04:00
459ea5a4a4 Update test containers in ansible-test. (#74166)
* Update distro test containers to version 2.0.2.

* Update the default test containers.
2021-04-06 15:52:56 -07:00
09c8faca9f Add 2.12 roadmap (#74000) 2021-04-06 12:43:38 -05:00
653a96dcea renamed: ansible-base.{dirs,install} -> ansible-core.{dirs,install} (#74159) 2021-04-06 11:51:52 -05:00
96f94c0fef Use a file-like obj for stdout/stderr for deadlock workaround (#74156)
Fixes #74149
2021-04-06 11:26:52 -05:00
d1842afd59 ansible-inventory - add coverage tests (#74130) 2021-04-06 12:14:54 -04:00
1cacf933b7 lineinfile - improve test coverage (#74122) 2021-04-06 12:11:10 -04:00
ecd69ed36e Use render for code blocks in issue forms 2021-04-06 18:02:41 +02:00
05662fd2ab Docs: clarify role docs - vars vs params, dependencies (#74104) 2021-04-06 11:24:28 -04:00
282dd1bbc7 Drop deprecated issue_body from issue forms
This change removes the deprecated attribute and also adds an explicit
textarea at the end of the docs report form to replace it.
2021-04-06 17:06:05 +02:00
0dd2327bca Add CoC checkboxes to the issue forms 2021-04-06 16:47:04 +02:00
3a74f7ea22 prep for 2.12 version bump (#74126)
* prep for 2.12
* Add 2.12 deprecations and sort ignore.txt list.

Signed-off-by: Rick Elrod <rick@elrod.me>
2021-04-05 16:56:53 -05:00
f436058fad Add ansible-test constraint for decorator. 2021-04-05 11:56:38 -07:00
4000 changed files with 159757 additions and 122216 deletions

View File

@ -26,8 +26,6 @@ variables:
value: ansible
- name: coverageBranches
value: devel
- name: pipelinesCoverage
value: coverage
- name: entryPoint
value: test/utils/shippable/shippable.sh
- name: fetchDepth
@ -36,7 +34,7 @@ variables:
resources:
containers:
- container: default
image: quay.io/ansible/azure-pipelines-test-container:1.9.0
image: quay.io/ansible/azure-pipelines-test-container:3.0.0
pool: Standard
@ -62,13 +60,14 @@ stages:
nameFormat: Python {0}
testFormat: units/{0}
targets:
- test: 2.6
- test: 2.7
- test: 3.5
- test: 3.6
- test: 3.7
- test: 3.8
- test: 3.9
- test: '3.10'
- test: 3.11
- stage: Windows
dependsOn: []
jobs:
@ -81,27 +80,42 @@ stages:
- test: 2012-R2
- test: 2016
- test: 2019
- test: 2022
- stage: Remote
dependsOn: []
jobs:
- template: templates/matrix.yml
parameters:
targets:
- name: macOS 11.1
test: macos/11.1
- name: macOS 12.0
test: macos/12.0
- name: RHEL 7.9
test: rhel/7.9
- name: RHEL 8.3 py36
test: rhel/8.3@3.6
- name: RHEL 8.3 py38
test: rhel/8.3@3.8
- name: FreeBSD 11.4
test: freebsd/11.4
- name: FreeBSD 12.2
test: freebsd/12.2
- name: RHEL 8.6 py36
test: rhel/8.6@3.6
- name: RHEL 8.6 py39
test: rhel/8.6@3.9
- name: RHEL 9.0
test: rhel/9.0
- name: FreeBSD 12.3
test: freebsd/12.3
- name: FreeBSD 13.1
test: freebsd/13.1
groups:
- 1
- 2
- template: templates/matrix.yml
parameters:
targets:
- name: macOS 12.0
test: macos/12.0
- name: RHEL 8.6
test: rhel/8.6
- name: RHEL 9.0
test: rhel/9.0
- name: FreeBSD 13.1
test: freebsd/13.1
groups:
- 3
- 4
- 5
@ -114,27 +128,30 @@ stages:
targets:
- name: Alpine 3
test: alpine3
- name: CentOS 6
test: centos6
- name: CentOS 7
test: centos7
- name: CentOS 8
test: centos8
- name: Fedora 32
test: fedora32
- name: Fedora 33
test: fedora33
- name: openSUSE 15 py2
test: opensuse15py2
- name: openSUSE 15 py3
- name: Fedora 36
test: fedora36
- name: openSUSE 15
test: opensuse15
- name: Ubuntu 18.04
test: ubuntu1804
- name: Ubuntu 20.04
test: ubuntu2004
- name: Ubuntu 22.04
test: ubuntu2204
groups:
- 1
- 2
- template: templates/matrix.yml
parameters:
testFormat: linux/{0}
targets:
- name: Alpine 3
test: alpine3
- name: Fedora 36
test: fedora36
- name: Ubuntu 22.04
test: ubuntu2204
groups:
- 3
- 4
- 5
@ -146,8 +163,9 @@ stages:
nameFormat: Python {0}
testFormat: galaxy/{0}/1
targets:
- test: 2.7
- test: 3.6
- test: 3.9
- test: '3.10'
- test: 3.11
- stage: Generic
dependsOn: []
jobs:
@ -156,54 +174,9 @@ stages:
nameFormat: Python {0}
testFormat: generic/{0}/1
targets:
- test: 2.7
- test: 3.6
- stage: Incidental_Remote
displayName: Incidental Remote
dependsOn: []
jobs:
- template: templates/matrix.yml
parameters:
testFormat: i/{0}
targets:
- name: OS X 10.11
test: osx/10.11
- name: RHEL 7.9
test: rhel/7.9
- name: RHEL 8.3 py36
test: rhel/8.3@3.6
- name: RHEL 8.3 py38
test: rhel/8.3@3.8
- name: FreeBSD 11.4
test: freebsd/11.4
- name: FreeBSD 12.2
test: freebsd/12.2
- stage: Incidental_Docker
displayName: Incidental Docker
dependsOn: []
jobs:
- template: templates/matrix.yml
parameters:
testFormat: i/linux/{0}
targets:
- name: CentOS 6
test: centos6
- name: CentOS 7
test: centos7
- name: CentOS 8
test: centos8
- name: Fedora 32
test: fedora32
- name: Fedora 33
test: fedora33
- name: openSUSE 15 py2
test: opensuse15py2
- name: openSUSE 15 py3
test: opensuse15
- name: Ubuntu 18.04
test: ubuntu1804
- name: Ubuntu 20.04
test: ubuntu2004
- test: 3.9
- test: '3.10'
- test: 3.11
- stage: Incidental_Windows
displayName: Incidental Windows
dependsOn: []
@ -217,6 +190,7 @@ stages:
- test: 2012-R2
- test: 2016
- test: 2019
- test: 2022
- stage: Incidental
dependsOn: []
jobs:
@ -226,16 +200,8 @@ stages:
targets:
- name: IOS Python
test: ios/csr1000v/
- name: VyOS Python 2.7
test: vyos/1.1.8/2.7
- name: VyOS Python 3.6
test: vyos/1.1.8/3.6
- name: AWS Python 2.7
test: aws/2.7
- name: AWS Python 3.6
test: aws/3.6
- name: Cloud Python
test: cloud/
- name: VyOS Python
test: vyos/1.1.8/
- stage: Summary
condition: succeededOrFailed()
dependsOn:
@ -246,8 +212,6 @@ stages:
- Docker
- Galaxy
- Generic
- Incidental_Remote
- Incidental_Docker
- Incidental_Windows
- Incidental
jobs:

View File

@ -9,9 +9,9 @@ PATH="${PWD}/bin:${PATH}"
mkdir "${agent_temp_directory}/coverage/"
options=(--venv --venv-system-site-packages --color -v)
options=(--venv --color -v)
ansible-test coverage combine --export "${agent_temp_directory}/coverage/" "${options[@]}"
ansible-test coverage combine --group-by command --export "${agent_temp_directory}/coverage/" "${options[@]}"
if ansible-test coverage analyze targets generate --help >/dev/null 2>&1; then
# Only analyze coverage if the installed version of ansible-test supports it.

View File

@ -0,0 +1,101 @@
#!/usr/bin/env python
"""
Upload code coverage reports to codecov.io.
Multiple coverage files from multiple languages are accepted and aggregated after upload.
Python coverage, as well as PowerShell and Python stubs can all be uploaded.
"""
import argparse
import dataclasses
import pathlib
import shutil
import subprocess
import tempfile
import typing as t
import urllib.request
@dataclasses.dataclass(frozen=True)
class CoverageFile:
name: str
path: pathlib.Path
flags: t.List[str]
@dataclasses.dataclass(frozen=True)
class Args:
dry_run: bool
path: pathlib.Path
def parse_args() -> Args:
parser = argparse.ArgumentParser()
parser.add_argument('-n', '--dry-run', action='store_true')
parser.add_argument('path', type=pathlib.Path)
args = parser.parse_args()
# Store arguments in a typed dataclass
fields = dataclasses.fields(Args)
kwargs = {field.name: getattr(args, field.name) for field in fields}
return Args(**kwargs)
def process_files(directory: pathlib.Path) -> t.Tuple[CoverageFile, ...]:
processed = []
for file in directory.joinpath('reports').glob('coverage*.xml'):
name = file.stem.replace('coverage=', '')
# Get flags from name
flags = name.replace('-powershell', '').split('=') # Drop '-powershell' suffix
flags = [flag if not flag.startswith('stub') else flag.split('-')[0] for flag in flags] # Remove "-01" from stub files
processed.append(CoverageFile(name, file, flags))
return tuple(processed)
def upload_files(codecov_bin: pathlib.Path, files: t.Tuple[CoverageFile, ...], dry_run: bool = False) -> None:
for file in files:
cmd = [
str(codecov_bin),
'--name', file.name,
'--file', str(file.path),
]
for flag in file.flags:
cmd.extend(['--flags', flag])
if dry_run:
print(f'DRY-RUN: Would run command: {cmd}')
continue
subprocess.run(cmd, check=True)
def download_file(url: str, dest: pathlib.Path, flags: int, dry_run: bool = False) -> None:
if dry_run:
print(f'DRY-RUN: Would download {url} to {dest} and set mode to {flags:o}')
return
with urllib.request.urlopen(url) as resp:
with dest.open('w+b') as f:
# Read data in chunks rather than all at once
shutil.copyfileobj(resp, f, 64 * 1024)
dest.chmod(flags)
def main():
args = parse_args()
url = 'https://ci-files.testing.ansible.com/codecov/linux/codecov'
with tempfile.TemporaryDirectory(prefix='codecov-') as tmpdir:
codecov_bin = pathlib.Path(tmpdir) / 'codecov'
download_file(url, codecov_bin, 0o755, args.dry_run)
files = process_files(args.path)
upload_files(codecov_bin, files, args.dry_run)
if __name__ == '__main__':
main()

View File

@ -1,27 +0,0 @@
#!/usr/bin/env bash
# Upload code coverage reports to codecov.io.
# Multiple coverage files from multiple languages are accepted and aggregated after upload.
# Python coverage, as well as PowerShell and Python stubs can all be uploaded.
set -o pipefail -eu
output_path="$1"
curl --silent --show-error https://ansible-ci-files.s3.us-east-1.amazonaws.com/codecov/codecov.sh > codecov.sh
for file in "${output_path}"/reports/coverage*.xml; do
name="${file}"
name="${name##*/}" # remove path
name="${name##coverage=}" # remove 'coverage=' prefix if present
name="${name%.xml}" # remove '.xml' suffix
bash codecov.sh \
-f "${file}" \
-n "${name}" \
-X coveragepy \
-X gcov \
-X fix \
-X search \
-X xcode \
|| echo "Failed to upload code coverage report to codecov.io: ${file}"
done

View File

@ -12,4 +12,6 @@ if ! ansible-test --help >/dev/null 2>&1; then
pip install https://github.com/ansible/ansible/archive/devel.tar.gz --disable-pip-version-check
fi
ansible-test coverage xml --stub --venv --venv-system-site-packages --color -v
# Generate stubs using docker (if supported) otherwise fall back to using a virtual environment instead.
# The use of docker is required when Powershell code is present, but Ansible 2.12 was the first version to support --docker with coverage.
ansible-test coverage xml --group-by command --stub --docker --color -v || ansible-test coverage xml --group-by command --stub --venv --color -v

View File

@ -23,17 +23,7 @@ jobs:
- bash: .azure-pipelines/scripts/report-coverage.sh
displayName: Generate Coverage Report
condition: gt(variables.coverageFileCount, 0)
- task: PublishCodeCoverageResults@1
inputs:
codeCoverageTool: Cobertura
# Azure Pipelines only accepts a single coverage data file.
# That means only Python or PowerShell coverage can be uploaded, but not both.
# Set the "pipelinesCoverage" variable to determine which type is uploaded.
# Use "coverage" for Python and "coverage-powershell" for PowerShell.
summaryFileLocation: "$(outputPath)/reports/$(pipelinesCoverage).xml"
displayName: Publish to Azure Pipelines
condition: gt(variables.coverageFileCount, 0)
- bash: .azure-pipelines/scripts/publish-codecov.sh "$(outputPath)"
- bash: .azure-pipelines/scripts/publish-codecov.py "$(outputPath)"
displayName: Publish to codecov.io
condition: gt(variables.coverageFileCount, 0)
continueOnError: true

6
.github/BOTMETA.yml vendored
View File

@ -121,16 +121,16 @@ files:
notified: mattclay
test/lib/:
notified: mattclay
test/lib/ansible_test/_data/sanity/validate-modules:
test/lib/ansible_test/_util/controller/sanity/validate-modules:
keywords:
- validate-modules
notified:
- mattclay
test/lib/ansible_test/_data/sanity/validate-modules/validate_modules/main.py:
test/lib/ansible_test/_util/controller/sanity/validate-modules/validate_modules/main.py:
notified:
- gundalow
- sivel
test/lib/ansible_test/_data/sanity/validate-modules/validate_modules/schema.py:
test/lib/ansible_test/_util/controller/sanity/validate-modules/validate_modules/schema.py:
notified:
- gundalow
- sivel

View File

@ -1,18 +1,35 @@
---
name: 🐛 Bug report
description: Create a report to help us improve
issue_body: false # default: true, adds a classic WSYWIG textarea, if on
body:
- type: markdown
attributes:
value: |
⚠
Verify first that your issue is not [already reported on GitHub][issue search].
Also test if the latest release and devel branch are affected too.
*Complete **all** sections as described, this form is processed automatically.*
value: >
**Thank you for wanting to report a bug in ansible-core!**
[issue search]: https://github.com/ansible/ansible/search?q=is%3Aissue&type=issues
⚠
Verify first that your issue is not [already reported on
GitHub][issue search] and keep in mind that we may have to keep
the current behavior because [every change breaks someone's
workflow][XKCD 1172].
We try to be mindful about this.
Also test if the latest release and devel branch are affected too.
**Tip:** If you are seeking community support, please consider
[starting a mailing list thread or chatting in IRC][ML||IRC].
[ML||IRC]:
https://docs.ansible.com/ansible-core/devel/community/communication.html?utm_medium=github&utm_source=issue_form--bug_report.yml#mailing-list-information
[issue search]: ../search?q=is%3Aissue&type=issues
[XKCD 1172]: https://xkcd.com/1172/
- type: textarea
@ -29,6 +46,22 @@ body:
- type: dropdown
attributes:
label: Issue Type
description: >
Please select the single available option in the drop-down.
<details>
<summary>
<em>Why?</em>
</summary>
We would do it by ourselves but unfortunatelly, the curent
edition of GitHub Issue Forms Alpha does not support this yet 🤷
_We will make it easier in the future, once GitHub
supports dropdown defaults. Promise!_
</details>
# FIXME: Once GitHub allows defining the default choice, update this
options:
- Bug Report
@ -38,9 +71,22 @@ body:
- type: input
attributes:
label: Component Name
description: >-
Write the short name of the module, plugin, task or feature below,
*use your best guess if unsure*.
description: >
Write the short name of the rst file, module, plugin, task or
feature below, *use your best guess if unsure*.
**Tip:** Cannot find it in this repository? Please be advised that
the source for some parts of the documentation are hosted outside
of this repository. If the page you are reporting describes
modules/plugins/etc that are not officially supported by the
Ansible Core Engineering team, there is a good chance that it is
coming from one of the [Ansible Collections maintained by the
community][collections org]. If this is the case, please make sure
to file an issue under the appropriate project there instead.
[collections org]: /ansible-collections
placeholder: dnf, apt, yum, pip, user etc.
validations:
required: true
@ -49,13 +95,23 @@ body:
attributes:
label: Ansible Version
description: >-
Paste verbatim output from `ansible --version` between
tripple backticks.
Paste verbatim output from `ansible --version` below, under
the prompt line. Please don't wrap it with tripple backticks — your
whole input will be turned into a code snippet automatically.
render: console
value: |
```console (paste below)
$ ansible --version
```
placeholder: |
$ ansible --version
ansible [core 2.11.0b4.post0] (detached HEAD ref: refs/) last updated 2021/04/02 00:33:35 (GMT +200)
config file = None
configured module search path = ['~/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
ansible python module location = ~/src/github/ansible/ansible/lib/ansible
ansible collection location = ~/.ansible/collections:/usr/share/ansible/collections
executable location = bin/ansible
python version = 3.9.0 (default, Oct 26 2020, 13:08:59) [GCC 10.2.0]
jinja version = 2.11.3
libyaml = True
validations:
required: true
@ -63,12 +119,20 @@ body:
attributes:
label: Configuration
description: >-
Paste verbatim output from `ansible-config dump --only-changed` between quotes.
Paste verbatim output from `ansible-config dump --only-changed -t all` below, under the prompt line.
(if using a version older than ansible-core 2.12 you should omit the '-t all')
Please don't wrap it with tripple backticks — your
whole input will be turned into a code snippet automatically.
render: console
value: |
```console (paste below)
$ ansible-config dump --only-changed
```
# if using a version older than ansible-core 2.12 you should omit the '-t all'
$ ansible-config dump --only-changed -t all
placeholder: |
# if using a version older than ansible-core 2.12 you should omit the '-t all'
$ ansible-config dump --only-changed -t all
DEFAULT_GATHERING(~/src/github/ansible/ansible/ansible.cfg) = smart
DEFAULT_HOST_LIST(~/src/github/ansible/ansible/ansible.cfg) = ['~/src/github/ansible/ansible/hosts']
DEFAULT_VAULT_PASSWORD_FILE(~/src/github/ansible/ansible/ansible.cfg) = ~/src/github/ansible/ansible/vault/print-password.sh
validations:
required: true
@ -95,6 +159,20 @@ body:
```yaml (paste below)
```
placeholder: |
1. Implement the following playbook:
```yaml
---
# ping.yml
- hosts: all
gather_facts: false
tasks:
- ping:
...
```
2. Then run `ANSIBLE_DEBUG=1 ansible-playbook ping.yml -vvvvv`
3. An error occurs.
validations:
required: true
@ -115,11 +193,73 @@ body:
description: |
Describe what actually happened. If possible run with extra verbosity (`-vvvv`).
Paste verbatim command output between quotes.
value: |
```console (paste below)
```
Paste verbatim command output and don't wrap it with tripple backticks — your
whole input will be turned into a code snippet automatically.
render: console
placeholder: >-
Certificate did not match expected hostname: files.pythonhosted.org. Certificate: {'notAfter': 'Apr 28 19:20:25 2021 GMT', 'subjectAltName': ((u'DNS', 'r.ssl.fastly.net'), (u'DNS', '*.catchpoint.com'), (u'DNS', '*.cnn.io'), (u'DNS', '*.dollarshaveclub.com'), (u'DNS', '*.eater.com'), (u'DNS', '*.fastly.picmonkey.com'), (u'DNS', '*.files.saymedia-content.com'), (u'DNS', '*.ft.com'), (u'DNS', '*.meetupstatic.com'), (u'DNS', '*.nfl.com'), (u'DNS', '*.pagar.me'), (u'DNS', '*.picmonkey.com'), (u'DNS', '*.realself.com'), (u'DNS', '*.sbnation.com'), (u'DNS', '*.shakr.com'), (u'DNS', '*.streamable.com'), (u'DNS', '*.surfly.com'), (u'DNS', '*.theverge.com'), (u'DNS', '*.thrillist.com'), (u'DNS', '*.vox-cdn.com'), (u'DNS', '*.vox.com'), (u'DNS', '*.voxmedia.com'), (u'DNS', 'eater.com'), (u'DNS', 'ft.com'), (u'DNS', 'i.gse.io'), (u'DNS', 'picmonkey.com'), (u'DNS', 'realself.com'), (u'DNS', 'static.wixstatic.com'), (u'DNS', 'streamable.com'), (u'DNS', 'surfly.com'), (u'DNS', 'theverge.com'), (u'DNS', 'vox-cdn.com'), (u'DNS', 'vox.com'), (u'DNS', 'www.joyent.com')), 'subject': ((('countryName', u'US'),), (('stateOrProvinceName', u'California'),), (('localityName', u'San Francisco'),), (('organizationName', u'Fastly, Inc'),), (('commonName', u'r.ssl.fastly.net'),))}
Exception:
Traceback (most recent call last):
File "/usr/local/lib/python2.6/dist-packages/pip/basecommand.py", line 215, in main
status = self.run(options, args)
File "/usr/local/lib/python2.6/dist-packages/pip/commands/install.py", line 335, in run
wb.build(autobuilding=True)
File "/usr/local/lib/python2.6/dist-packages/pip/wheel.py", line 749, in build
self.requirement_set.prepare_files(self.finder)
File "/usr/local/lib/python2.6/dist-packages/pip/req/req_set.py", line 380, in prepare_files
ignore_dependencies=self.ignore_dependencies))
File "/usr/local/lib/python2.6/dist-packages/pip/req/req_set.py", line 620, in _prepare_file
session=self.session, hashes=hashes)
File "/usr/local/lib/python2.6/dist-packages/pip/download.py", line 821, in unpack_url
hashes=hashes
File "/usr/local/lib/python2.6/dist-packages/pip/download.py", line 659, in unpack_http_url
hashes)
File "/usr/local/lib/python2.6/dist-packages/pip/download.py", line 853, in _download_http_url
stream=True,
File "/usr/local/lib/python2.6/dist-packages/pip/_vendor/requests/sessions.py", line 521, in get
return self.request('GET', url, **kwargs)
File "/usr/local/lib/python2.6/dist-packages/pip/download.py", line 386, in request
return super(PipSession, self).request(method, url, *args, **kwargs)
File "/usr/local/lib/python2.6/dist-packages/pip/_vendor/requests/sessions.py", line 508, in request
resp = self.send(prep, **send_kwargs)
File "/usr/local/lib/python2.6/dist-packages/pip/_vendor/requests/sessions.py", line 618, in send
r = adapter.send(request, **kwargs)
File "/usr/local/lib/python2.6/dist-packages/pip/_vendor/cachecontrol/adapter.py", line 47, in send
resp = super(CacheControlAdapter, self).send(request, **kw)
File "/usr/local/lib/python2.6/dist-packages/pip/_vendor/requests/adapters.py", line 506, in send
raise SSLError(e, request=request)
SSLError: HTTPSConnectionPool(host='files.pythonhosted.org', port=443): Max retries exceeded with url: /packages/ef/ab/aa12712415809bf698e719b307419f953e25344e8f42d557533d7a02b276/netapp_lib-2020.7.16-py2-none-any.whl (Caused by SSLError(CertificateError("hostname 'files.pythonhosted.org' doesn't match either of 'r.ssl.fastly.net', '*.catchpoint.com', '*.cnn.io', '*.dollarshaveclub.com', '*.eater.com', '*.fastly.picmonkey.com', '*.files.saymedia-content.com', '*.ft.com', '*.meetupstatic.com', '*.nfl.com', '*.pagar.me', '*.picmonkey.com', '*.realself.com', '*.sbnation.com', '*.shakr.com', '*.streamable.com', '*.surfly.com', '*.theverge.com', '*.thrillist.com', '*.vox-cdn.com', '*.vox.com', '*.voxmedia.com', 'eater.com', 'ft.com', 'i.gse.io', 'picmonkey.com', 'realself.com', 'static.wixstatic.com', 'streamable.com', 'surfly.com', 'theverge.com', 'vox-cdn.com', 'vox.com', 'www.joyent.com'",),))
ERROR: Command "/usr/bin/python2.6 /root/ansible/test/lib/ansible_test/_data/quiet_pip.py install --disable-pip-version-check -r /root/ansible/test/lib/ansible_test/_data/requirements/units.txt -r tests/unit/requirements.txt -c /root/ansible/test/lib/ansible_test/_data/requirements/constraints.txt" returned exit status 2.
ERROR: Command "docker exec d47eb360db4ce779c1f690db964655b76e68895c4360ff252c46fe7fe6f5c75a /usr/bin/env ANSIBLE_TEST_CONTENT_ROOT=/root/ansible_collections/netapp/ontap LC_ALL=en_US.UTF-8 /usr/bin/python3.6 /root/ansible/bin/ansible-test units --metadata tests/output/.tmp/metadata-9i2qfrcl.json --truncate 200 --redact --color yes --requirements --python default --requirements-mode only" returned exit status 1.
validations:
required: true
- type: markdown
attributes:
value: >
*One last thing...*
*Please, complete **all** sections as described, this form
is [processed automatically by a robot][ansibot help].*
Thank you for your collaboration!
[ansibot help]:
/ansible/ansibullbot/blob/master/ISSUE_HELP.md#for-issue-submitters
- type: checkboxes
attributes:
label: Code of Conduct
description: |
Read the [Ansible Code of Conduct][CoC] first.
[CoC]: https://docs.ansible.com/ansible/latest/community/code_of_conduct.html?utm_medium=github&utm_source=issue_form--bug_report.yml
options:
- label: I agree to follow the Ansible Code of Conduct
required: true
...

View File

@ -1,28 +1,51 @@
---
name: 📝 Documentation Report
description: Ask us about docs
# NOTE: issue body is enabled to allow screenshots
issue_body: true # default: true, adds a classic WSYWIG textarea, if on
body:
- type: markdown
attributes:
value: |
⚠
Verify first that your issue is not [already reported on GitHub][issue search].
Also test if the latest release and devel branch are affected too.
*Complete **all** sections as described, this form is processed automatically.*
value: >
**Thank you for wanting to report a problem with ansible-core
documentation!**
[issue search]: https://github.com/ansible/ansible/search?q=is%3Aissue&type=issues
Please fill out your suggestions below. If the problem seems
straightforward, feel free to go ahead and
[submit a pull request] instead!
⚠
Verify first that your issue is not [already reported on
GitHub][issue search].
Also test if the latest release and devel branch are affected too.
**Tip:** If you are seeking community support, please consider
[starting a mailing list thread or chatting in IRC][ML||IRC].
[ML||IRC]:
https://docs.ansible.com/ansible-core/devel/community/communication.html?utm_medium=github&utm_source=issue_form--documentation_report.yml#mailing-list-information
[issue search]: ../search?q=is%3Aissue&type=issues
[submit a pull request]:
https://docs.ansible.com/ansible-core/devel/community/documentation_contributions.html
- type: textarea
attributes:
label: Summary
description: |
Explain the problem briefly below, add suggestions to wording or structure.
description: >
Explain the problem briefly below, add suggestions to wording
or structure.
**HINT:** Did you know the documentation has an `Edit on GitHub` link on every page?
**HINT:** Did you know the documentation has a `View on GitHub`
link on some pages? Feel free to use it to start a pull request
right from the GitHub UI!
placeholder: >-
I was reading the ansible-core documentation of version X and I'm having
problems understanding Y. It would be very helpful if that got
@ -33,6 +56,22 @@ body:
- type: dropdown
attributes:
label: Issue Type
description: >
Please select the single available option in the drop-down.
<details>
<summary>
<em>Why?</em>
</summary>
We would do it by ourselves but unfortunatelly, the curent
edition of GitHub Issue Forms Alpha does not support this yet 🤷
_We will make it easier in the future, once GitHub
supports dropdown defaults. Promise!_
</details>
# FIXME: Once GitHub allows defining the default choice, update this
options:
- Documentation Report
@ -42,9 +81,22 @@ body:
- type: input
attributes:
label: Component Name
description: >-
description: >
Write the short name of the rst file, module, plugin, task or
feature below, *use your best guess if unsure*.
**Tip:** Be advised that the source for some parts of the
documentation are hosted outside of this repository. If the page
you are reporting describes modules/plugins/etc that are not
officially supported by the Ansible Core Engineering team, there
is a good chance that it is coming from one of the [Ansible
Collections maintained by the community][collections org]. If this
is the case, please make sure to file an issue under the
appropriate project there instead.
[collections org]: /ansible-collections
placeholder: docs/docsite/rst/dev_guide/debugging.rst
validations:
required: true
@ -53,13 +105,23 @@ body:
attributes:
label: Ansible Version
description: >-
Paste verbatim output from `ansible --version` between
tripple backticks.
Paste verbatim output from `ansible --version` below, under
the prompt line. Please don't wrap it with tripple backticks — your
whole input will be turned into a code snippet automatically.
render: console
value: |
```console (paste below)
$ ansible --version
```
placeholder: |
$ ansible --version
ansible [core 2.11.0b4.post0] (detached HEAD ref: refs/) last updated 2021/04/02 00:33:35 (GMT +200)
config file = None
configured module search path = ['~/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
ansible python module location = ~/src/github/ansible/ansible/lib/ansible
ansible collection location = ~/.ansible/collections:/usr/share/ansible/collections
executable location = bin/ansible
python version = 3.9.0 (default, Oct 26 2020, 13:08:59) [GCC 10.2.0]
jinja version = 2.11.3
libyaml = True
validations:
required: true
@ -67,12 +129,20 @@ body:
attributes:
label: Configuration
description: >-
Paste verbatim output from `ansible-config dump --only-changed` between quotes.
Paste verbatim output from `ansible-config dump --only-changed -t all` below, under the prompt line.
(if using a version older than ansible-core 2.12 you should omit the '-t all')
Please don't wrap it with tripple backticks — your
whole input will be turned into a code snippet automatically.
render: console
value: |
```console (paste below)
$ ansible-config dump --only-changed
```
# if using a version older than ansible-core 2.12 you should omit the '-t all'
$ ansible-config dump --only-changed -t all
placeholder: |
# if using a version older than ansible-core 2.12 you should omit the '-t all'
$ ansible-config dump --only-changed -t all
DEFAULT_GATHERING(~/src/github/ansible/ansible/ansible.cfg) = smart
DEFAULT_HOST_LIST(~/src/github/ansible/ansible/ansible.cfg) = ['~/src/github/ansible/ansible/hosts']
DEFAULT_VAULT_PASSWORD_FILE(~/src/github/ansible/ansible/ansible.cfg) = ~/src/github/ansible/ansible/vault/print-password.sh
validations:
required: true
@ -86,12 +156,46 @@ body:
validations:
required: true
- type: markdown
attributes:
value: |
**Additional Information**
- type: textarea
attributes:
label: Additional Information
description: |
Describe how this improves the documentation, e.g. before/after situation or screenshots.
**HINT:** You can paste https://gist.github.com links for larger files.
placeholder: >-
When the improvement is applied, it makes it more straightforward
to understand X.
validations:
required: true
- type: markdown
attributes:
value: >
*One last thing...*
*Please, complete **all** sections as described, this form
is [processed automatically by a robot][ansibot help].*
Thank you for your collaboration!
[ansibot help]:
/ansible/ansibullbot/blob/master/ISSUE_HELP.md#for-issue-submitters
- type: checkboxes
attributes:
label: Code of Conduct
description: |
Read the [Ansible Code of Conduct][CoC] first.
[CoC]: https://docs.ansible.com/ansible/latest/community/code_of_conduct.html?utm_medium=github&utm_source=issue_form--documentation_report.yml
options:
- label: I agree to follow the Ansible Code of Conduct
required: true
...

View File

@ -1,24 +1,96 @@
---
name: ✨ Feature request
description: Suggest an idea for this project
issue_body: false # default: true, adds a classic WSYWIG textarea, if on
body:
- type: markdown
attributes:
value: |
⚠
Verify first that your issue is not [already reported on GitHub][issue search].
Also test if the latest release and devel branch are affected too.
*Complete **all** sections as described, this form is processed automatically.*
value: >
**Thank you for wanting to suggest a feature for ansible-core!**
[issue search]: https://github.com/ansible/ansible/search?q=is%3Aissue&type=issues
💡
Before you go ahead with your request, please first consider if it
would be useful for majority of the ansible-core users. As a
general rule of thumb, any feature that is only of interest to a
small sub group should be [implemented in a third-party Ansible
Collection][contribute to collections] or maybe even just your
project alone. Be mindful of the fact that the essential
ansible-core features have a broad impact.
If unsure, consider filing a [new proposal] instead outlining your
use-cases, the research and implementation considerations. Then,
start a discussion on one of the public [IRC meetings] we have just
for this.
<details>
<summary>
❗ Every change breaks someone's workflow.
</summary>
[![❗ Every change breaks someone's workflow.
](https://imgs.xkcd.com/comics/workflow.png)
](https://xkcd.com/1172/)
</details>
⚠
Verify first that your idea is not [already requested on
GitHub][issue search].
Also test if the devel branch does not already implement this.
**Tip:** If you are seeking community support, please consider
[starting a mailing list thread or chatting in IRC][ML||IRC].
[contribute to collections]:
https://docs.ansible.com/ansible-core/devel/community/contributing_maintained_collections.html?utm_medium=github&utm_source=issue_form--feature_request.yml
[IRC meetings]:
https://docs.ansible.com/ansible-core/devel/community/communication.html?utm_medium=github&utm_source=issue_form--feature_request.yml#irc-meetings
[issue search]: ../search?q=is%3Aissue&type=issues
[ML||IRC]:
https://docs.ansible.com/ansible-core/devel/community/communication.html?utm_medium=github&utm_source=issue_form--feature_request.yml#mailing-list-information
[new proposal]: ../../proposals/issues/new
- type: textarea
attributes:
label: Summary
description: Describe the new feature/improvement briefly below.
description: >
Describe the new feature/improvement you would like briefly below.
What's the problem this feature will solve?
What are you trying to do, that you are unable to achieve
with ansible-core as it currently stands?
* Provide examples of real-world use cases that this would enable
and how it solves the problem you described.
* How do you solve this now?
* Have you tried to work around the problem using other tools?
* Could there be a different approach to solving this issue?
*Know **exactly** what you want?* Consider filing a [new proposal]
instead outlining your research and implementation considerations.
[new proposal]: ../../proposals/issues/new
placeholder: >-
I am trying to do X with ansible-core from the devel branch on GitHub and
I think that implementing a feature Y would be very helpful for me and
@ -29,6 +101,22 @@ body:
- type: dropdown
attributes:
label: Issue Type
description: >
Please select the single available option in the drop-down.
<details>
<summary>
<em>Why?</em>
</summary>
We would do it by ourselves but unfortunatelly, the curent
edition of GitHub Issue Forms Alpha does not support this yet 🤷
_We will make it easier in the future, once GitHub
supports dropdown defaults. Promise!_
</details>
# FIXME: Once GitHub allows defining the default choice, update this
options:
- Feature Idea
@ -38,9 +126,19 @@ body:
- type: input
attributes:
label: Component Name
description: >-
description: >
Write the short name of the module, plugin, task or feature below,
*use your best guess if unsure*.
Be aware that a lot of content that used to reside in this repository
previously, is now hosted under [individual collection
projects][collections org].
If this is the case, please make sure to file an issue under the
appropriate project there instead.
[collections org]: /ansible-collections
placeholder: dnf, apt, yum, pip, user etc.
validations:
required: true
@ -57,6 +155,38 @@ body:
```yaml (paste below)
```
placeholder: >-
I asked on https://stackoverflow.com/.... and the community
advised me to do X, Y and Z.
validations:
required: true
- type: markdown
attributes:
value: >
*One last thing...*
*Please, complete **all** sections as described, this form
is [processed automatically by a robot][ansibot help].*
Thank you for your collaboration!
[ansibot help]:
/ansible/ansibullbot/blob/master/ISSUE_HELP.md#for-issue-submitters
- type: checkboxes
attributes:
label: Code of Conduct
description: |
Read the [Ansible Code of Conduct][CoC] first.
[CoC]: https://docs.ansible.com/ansible/latest/community/code_of_conduct.html?utm_medium=github&utm_source=issue_form--feature_request.yml
options:
- label: I agree to follow the Ansible Code of Conduct
required: true
...

View File

@ -1,4 +1,7 @@
---
- 2.14.0 C'mon Everybody
- 2.13.0 Nobody's Fault but Mine
- 2.12.0 Dazed and Confused
- 2.11.0 Hey Hey, What Can I Do
- 2.10.0 When the Levee Breaks
- 2.9.0 Immigrant Song

19
.gitignore vendored
View File

@ -38,6 +38,7 @@ docs/docsite/rst/cli/ansible-*.rst
docs/docsite/rst/cli/ansible.rst
docs/docsite/rst/dev_guide/collections_galaxy_meta.rst
docs/docsite/rst/dev_guide/testing/sanity/index.rst.new
docs/docsite/rst/dev_guide/index.rst
docs/docsite/rst/modules/*.rst
docs/docsite/rst/collections/*.rst
!docs/docsite/rst/collections/all_plugins.rst
@ -52,12 +53,10 @@ docs/docsite/searchindex.js
docs/docsite/_static/*.gif
docs/docsite/_static/*.png
docs/docsite/_static/websupport.js
# deb building stuff...
/debian/
deb-build
# Vim swap files
*.swp
*.swo
[._]*.un~
credentials.yml
# test output
*.retry
@ -74,7 +73,16 @@ coverage.xml
/test/cache/*
# Development
/test/develop
# Environments
.env
.venv
env/
venv/
ENV/
env.bak/
venv.bak/
venv
env
Vagrantfile
.vagrant
# Backwards compatibility with `stable-2.9` and earlier branches.
@ -84,7 +92,10 @@ Vagrantfile
/lib/ansible_base.egg-info/
# First used in the `devel` branch during Ansible 2.11 development.
/lib/ansible_core.egg-info/
/shippable/
# vendored lib dir
lib/ansible/_vendor/*
!lib/ansible/_vendor/__init__.py
# test stuff
/test/integration/cloud-config-*.*
!/test/integration/cloud-config-*.*.template
.python-version

View File

@ -7,6 +7,11 @@ include docs/docsite/rst/collections/all_plugins.rst
exclude docs/docsite/rst_warnings
exclude docs/docsite/rst/conf.py
exclude docs/docsite/rst/index.rst
exclude docs/docsite/rst/dev_guide/index.rst
exclude docs/docsite/rst/dev_guide/testing/sanity/bin-symlinks.rst
exclude docs/docsite/rst/dev_guide/testing/sanity/botmeta.rst
exclude docs/docsite/rst/dev_guide/testing/sanity/integration-aliases.rst
exclude docs/docsite/rst/dev_guide/testing/sanity/release-names.rst
recursive-exclude docs/docsite/_build *
recursive-exclude docs/docsite/_extensions *.pyc *.pyo
include examples/hosts
@ -20,17 +25,23 @@ recursive-include lib/ansible/module_utils/powershell *.psm1
recursive-include lib/ansible/modules/windows *.ps1
recursive-include lib/ansible/galaxy/data *.yml *.j2 README.md ansible.cfg inventory .git_keep
recursive-include lib/ansible/config *.yml
recursive-include lib/ansible/modules *.yml
recursive-include lib/ansible/plugins/test *.yml
recursive-include lib/ansible/plugins/filter *.yml
recursive-include licenses *.txt
recursive-include packaging *
recursive-include test/ansible_test *.py Makefile
recursive-include test/integration *
recursive-include test/lib/ansible_test/config *.template
recursive-include test/lib/ansible_test/_data *.cfg *.ini *.json *.ps1 *.psd1 *.py *.sh *.txt *.yml coveragerc inventory
recursive-include test/lib/ansible_test/_data/injector ansible ansible-config ansible-connection ansible-console ansible-doc ansible-galaxy ansible-playbook ansible-pull ansible-test ansible-vault pytest
recursive-include test/lib/ansible_test/_data/sanity/validate-modules validate-modules
recursive-include test/sanity *.json *.py *.txt
recursive-include test/lib/ansible_test/config *.yml *.template
recursive-include test/lib/ansible_test/_data *.cfg *.in *.ini *.ps1 *.txt *.yml coveragerc
recursive-include test/lib/ansible_test/_util *.cfg *.ini *.json *.ps1 *.psd1 *.py *.sh *.txt *.yml
recursive-include test/lib/ansible_test/_util/controller/sanity/validate-modules validate-modules
recursive-include test/sanity *.in *.json *.py *.txt
recursive-include test/support *.py *.ps1 *.psm1 *.cs
exclude test/sanity/code-smell/botmeta.*
exclude test/sanity/code-smell/release-names.*
exclude test/lib/ansible_test/_internal/commands/sanity/bin_symlinks.py
exclude test/lib/ansible_test/_internal/commands/sanity/integration_aliases.py
recursive-include test/units *
include Makefile
include MANIFEST.in
@ -38,3 +49,6 @@ include changelogs/CHANGELOG*.rst
include changelogs/changelog.yaml
recursive-include hacking/build_library *.py
include hacking/build-ansible.py
include hacking/test-module.py
include hacking/update-sanity-requirements.py
include bin/*

168
Makefile
View File

@ -4,15 +4,7 @@
#
# useful targets:
# make clean ---------------- clean up
# make webdocs -------------- produce ansible doc at docs/docsite/_build/html
# make coredocs ------------- produce core doc at docs/docsite/_build/html
# make sdist ---------------- produce a tarball
# make deb-src -------------- produce a DEB source
# make deb ------------------ produce a DEB
# make docs ----------------- rebuild the manpages (results are checked in)
# make gettext -------------- produce POT files for docs
# make generate-po ---------- generate language specific po file
# make needs-translation ---- generate list of file with unstranlated or fuzzy string for a specific language
# make tests ---------------- run the tests (see https://docs.ansible.com/ansible/devel/dev_guide/testing_units.html for requirements)
########################################################
@ -26,9 +18,9 @@ SDIST_DIR ?= 'dist'
# This doesn't evaluate until it's called. The -D argument is the
# directory of the target file ($@), kinda like `dirname`.
MANPAGES ?= $(patsubst %.rst.in,%,$(wildcard ./docs/man/man1/ansible*.1.rst.in))
ifneq ($(shell which rst2man 2>/dev/null),)
ifneq ($(shell command -v rst2man 2>/dev/null),)
ASCII2MAN = rst2man $< $@
else ifneq ($(shell which rst2man.py 2>/dev/null),)
else ifneq ($(shell command -v rst2man.py 2>/dev/null),)
ASCII2MAN = rst2man.py $< $@
else
ASCII2MAN = @echo "ERROR: rst2man from docutils command is not installed but is required to build $(MANPAGES)" && exit 1
@ -43,58 +35,6 @@ ifeq ($(findstring error,$(VERSION)), error)
$(error "version_helper failed")
endif
# Get the branch information from git
ifneq ($(shell which git),)
GIT_DATE := $(shell git log -n 1 --format="%ci")
GIT_HASH := $(shell git log -n 1 --format="%h")
GIT_BRANCH := $(shell git rev-parse --abbrev-ref HEAD | sed 's/[-_.\/]//g')
GITINFO = .$(GIT_HASH).$(GIT_BRANCH)
else
GITINFO = ""
endif
ifeq ($(shell echo $(OS) | egrep -c 'Darwin|FreeBSD|OpenBSD|DragonFly'),1)
DATE := $(shell date -j -r $(shell git log -n 1 --format="%ct") +%Y%m%d%H%M)
CPUS ?= $(shell sysctl hw.ncpu|awk '{print $$2}')
else
DATE := $(shell date --utc --date="$(GIT_DATE)" +%Y%m%d%H%M)
CPUS ?= $(shell nproc)
endif
# Intenationalisation and Localisation
LANGUAGES ?=
# DEB build parameters
DEBUILD_BIN ?= debuild
DEBUILD_OPTS = --source-option="-I"
DPUT_BIN ?= dput
DPUT_OPTS ?=
DEB_DATE := $(shell LC_TIME=C date +"%a, %d %b %Y %T %z")
DEB_VERSION ?= $(shell $(PYTHON) packaging/release/versionhelper/version_helper.py --debversion)
ifeq ($(OFFICIAL),yes)
DEB_RELEASE ?= $(shell $(PYTHON) packaging/release/versionhelper/version_helper.py --debrelease)ppa
# Sign OFFICIAL builds using 'DEBSIGN_KEYID'
# DEBSIGN_KEYID is required when signing
ifneq ($(DEBSIGN_KEYID),)
DEBUILD_OPTS += -k$(DEBSIGN_KEYID)
endif
else
DEB_RELEASE ?= 100.git$(DATE)$(GITINFO)
# Do not sign unofficial builds
DEBUILD_OPTS += -uc -us
DPUT_OPTS += -u
endif
DEBUILD = $(DEBUILD_BIN) $(DEBUILD_OPTS)
DEB_PPA ?= ppa
# Choose the desired Ubuntu release: lucid precise saucy trusty
DEB_DIST ?= unstable
# pbuilder parameters
PBUILDER_ARCH ?= amd64
PBUILDER_CACHE_DIR = /var/cache/pbuilder
PBUILDER_BIN ?= pbuilder
PBUILDER_OPTS ?= --debootstrapopts --variant=buildd --architecture $(PBUILDER_ARCH) --debbuildopts -b
# ansible-test parameters
ANSIBLE_TEST ?= bin/ansible-test
TEST_FLAGS ?=
@ -154,7 +94,6 @@ clean:
rm -f ./docs/man/man1/*
@echo "Cleaning up output from test runs"
rm -rf test/test_data
rm -rf shippable/
rm -rf logs/
rm -rf .cache/
rm -f test/units/.coverage*
@ -162,9 +101,6 @@ clean:
find test/ -type f -name '*.retry' -delete
@echo "Cleaning up symlink cache"
rm -f SYMLINK_CACHE.json
@echo "Cleaning up Debian building stuff"
rm -rf debian
rm -rf deb-build
rm -rf docs/json
rm -rf docs/js
@echo "Cleaning up docsite"
@ -178,6 +114,7 @@ python:
install:
$(PYTHON) setup.py install
.PHONY: install_manpages
install_manpages:
gzip -9 $(wildcard ./docs/man/man1/ansible*.1)
cp $(wildcard ./docs/man/man1/ansible*.1.gz) $(PREFIX)/man/man1/
@ -206,108 +143,15 @@ sdist_upload: clean docs
changelog:
PYTHONPATH=./lib antsibull-changelog release -vv --use-ansible-doc && PYTHONPATH=./lib antsibull-changelog generate -vv --use-ansible-doc
.PHONY: debian
debian: sdist
@for DIST in $(DEB_DIST) ; do \
mkdir -p deb-build/$${DIST} ; \
tar -C deb-build/$${DIST} -xvf dist/$(NAME)-$(VERSION).tar.gz ; \
cp -a packaging/debian deb-build/$${DIST}/$(NAME)-$(VERSION)/ ; \
sed -ie "s|%VERSION%|$(DEB_VERSION)|g;s|%RELEASE%|$(DEB_RELEASE)|;s|%DIST%|$${DIST}|g;s|%DATE%|$(DEB_DATE)|g" deb-build/$${DIST}/$(NAME)-$(VERSION)/debian/changelog ; \
done
.PHONY: deb
deb: deb-src
@for DIST in $(DEB_DIST) ; do \
PBUILDER_OPTS="$(PBUILDER_OPTS) --distribution $${DIST} --basetgz $(PBUILDER_CACHE_DIR)/$${DIST}-$(PBUILDER_ARCH)-base.tgz --buildresult $(CURDIR)/deb-build/$${DIST}" ; \
$(PBUILDER_BIN) create $${PBUILDER_OPTS} --othermirror "deb http://archive.ubuntu.com/ubuntu $${DIST} universe" ; \
$(PBUILDER_BIN) update $${PBUILDER_OPTS} ; \
$(PBUILDER_BIN) build $${PBUILDER_OPTS} deb-build/$${DIST}/$(NAME)_$(DEB_VERSION)-$(DEB_RELEASE)~$${DIST}.dsc ; \
done
@echo "#############################################"
@echo "Ansible DEB artifacts:"
@for DIST in $(DEB_DIST) ; do \
echo deb-build/$${DIST}/$(NAME)_$(DEB_VERSION)-$(DEB_RELEASE)~$${DIST}_amd64.changes ; \
done
@echo "#############################################"
# Build package outside of pbuilder, with locally installed dependencies.
# Install BuildRequires as noted in packaging/debian/control.
.PHONY: local_deb
local_deb: debian
@for DIST in $(DEB_DIST) ; do \
(cd deb-build/$${DIST}/$(NAME)-$(VERSION)/ && $(DEBUILD) -b) ; \
done
@echo "#############################################"
@echo "Ansible DEB artifacts:"
@for DIST in $(DEB_DIST) ; do \
echo deb-build/$${DIST}/$(NAME)_$(DEB_VERSION)-$(DEB_RELEASE)~$${DIST}_amd64.changes ; \
done
@echo "#############################################"
.PHONY: deb-src
deb-src: debian
@for DIST in $(DEB_DIST) ; do \
(cd deb-build/$${DIST}/$(NAME)-$(VERSION)/ && $(DEBUILD) -S) ; \
done
@echo "#############################################"
@echo "Ansible DEB artifacts:"
@for DIST in $(DEB_DIST) ; do \
echo deb-build/$${DIST}/$(NAME)_$(DEB_VERSION)-$(DEB_RELEASE)~$${DIST}_source.changes ; \
done
@echo "#############################################"
.PHONY: deb-upload
deb-upload: deb
@for DIST in $(DEB_DIST) ; do \
$(DPUT_BIN) $(DPUT_OPTS) $(DEB_PPA) deb-build/$${DIST}/$(NAME)_$(DEB_VERSION)-$(DEB_RELEASE)~$${DIST}_amd64.changes ; \
done
.PHONY: deb-src-upload
deb-src-upload: deb-src
@for DIST in $(DEB_DIST) ; do \
$(DPUT_BIN) $(DPUT_OPTS) $(DEB_PPA) deb-build/$${DIST}/$(NAME)_$(DEB_VERSION)-$(DEB_RELEASE)~$${DIST}_source.changes ; \
done
.PHONY: epub
epub:
(cd docs/docsite/; CPUS=$(CPUS) $(MAKE) epub)
# for arch or gentoo, read instructions in the appropriate 'packaging' subdirectory directory
.PHONY: webdocs
webdocs:
(cd docs/docsite/; CPUS=$(CPUS) $(MAKE) docs)
.PHONY: coredocs
coredocs:
(cd docs/docsite/; CPUS=$(CPUS) $(MAKE) coredocs)
.PHONY: gettext
gettext:
(cd docs/docsite/; CPUS=$(CPUS) $(MAKE) gettext)
.PHONY: generate-po
generate-po:
(cd docs/docsite/; CPUS=$(CPUS) LANGUAGES=$(LANGUAGES) $(MAKE) generate-po)
.PHONY: needs-translation
needs-translation:
(cd docs/docsite/; CPUS=$(CPUS) LANGUAGES=$(LANGUAGES) $(MAKE) needs-translation)
.PHONY: linkcheckdocs
linkcheckdocs:
(cd docs/docsite/; CPUS=$(CPUS) $(MAKE) linkcheckdocs)
.PHONY: generate_rst
generate_rst: lib/ansible/cli/*.py
mkdir -p ./docs/man/man1/ ; \
$(GENERATE_CLI) --template-file=docs/templates/man.j2 --output-dir=docs/man/man1/ --output-format man lib/ansible/cli/*.py
$(PYTHON) $(GENERATE_CLI) --template-file=docs/templates/man.j2 --output-dir=docs/man/man1/ --output-format man lib/ansible/cli/*.py
.PHONY: docs
docs: generate_rst
$(MAKE) $(MANPAGES)
.PHONY: alldocs
alldocs: docs webdocs
.PHONY: version
version:
@echo $(VERSION)

View File

@ -7,13 +7,13 @@ Ansible
Ansible is a radically simple IT automation system. It handles
configuration management, application deployment, cloud provisioning,
ad-hoc task execution, network automation, and multi-node orchestration. Ansible makes complex
changes like zero-downtime rolling updates with load balancers easy. More information on `the Ansible website <https://ansible.com/>`_.
changes like zero-downtime rolling updates with load balancers easy. More information on the Ansible `website <https://ansible.com/>`_.
Design Principles
=================
* Have a dead-simple setup process with a minimal learning curve.
* Manage machines very quickly and in parallel.
* Have an extremely simple setup process with a minimal learning curve.
* Manage machines quickly and in parallel.
* Avoid custom-agents and additional open ports, be agentless by
leveraging the existing SSH daemon.
* Describe infrastructure in a language that is both machine and human
@ -32,8 +32,6 @@ You can install a released version of Ansible with ``pip`` or a package manager.
`installation guide <https://docs.ansible.com/ansible/latest/installation_guide/intro_installation.html>`_ for details on installing Ansible
on a variety of platforms.
Red Hat offers supported builds of `Ansible Engine <https://www.ansible.com/ansible-engine>`_.
Power users and developers can run the ``devel`` branch, which has the latest
features and fixes, directly. Although it is reasonably stable, you are more likely to encounter
breaking changes when running the ``devel`` branch. We recommend getting involved

View File

@ -1 +1 @@
../lib/ansible/cli/scripts/ansible_cli_stub.py
../lib/ansible/cli/adhoc.py

View File

@ -1 +1 @@
ansible
../lib/ansible/cli/config.py

View File

@ -1 +1 @@
ansible
../lib/ansible/cli/console.py

View File

@ -1 +1 @@
ansible
../lib/ansible/cli/doc.py

View File

@ -1 +1 @@
ansible
../lib/ansible/cli/galaxy.py

View File

@ -1 +1 @@
ansible
../lib/ansible/cli/inventory.py

View File

@ -1 +1 @@
ansible
../lib/ansible/cli/playbook.py

View File

@ -1 +1 @@
ansible
../lib/ansible/cli/pull.py

View File

@ -1 +1 @@
../test/lib/ansible_test/_data/cli/ansible_test_cli_stub.py
../test/lib/ansible_test/_util/target/cli/ansible_test_cli_stub.py

View File

@ -1 +1 @@
ansible
../lib/ansible/cli/vault.py

View File

@ -1,705 +0,0 @@
========================================================
ansible-core 2.11 "Hey Hey, What Can I Do" Release Notes
========================================================
.. contents:: Topics
v2.11.2
=======
Release Summary
---------------
| Release Date: 2021-06-22
| `Porting Guide <https://docs.ansible.com/ansible/devel/porting_guides.html>`__
Security Fixes
--------------
- templating engine fix for not preserving usnafe status when trying to preserve newlines. CVE-2021-3583
Bugfixes
--------
- AnsibleModule.set_mode_if_different - don't check file existence when check_mode is activated (https://github.com/ansible/ansible/issues/61185).
- Apply ``display_failed_stderr`` callback option on loop item results. (https://github.com/ansible/ansible/issues/74864)
- Avoid task executor from ending early as vars can come from delegated to host.
- ansible-pull - update documentation for ``--directory`` option to clarify path must be absolute.
- config, ensure 'quoted' lists from ini or env do not take the quotes literally as part of the list item.
- gather_facts, package, service - fix using module_defaults for the modules in addition to the action plugins. (https://github.com/ansible/ansible/issues/72918)
- psrp - Always cleanup the last run pipeline if a second pipeline is invoked to avoid violating any resource limits.
- psrp - Fix error when resetting a connection that was initialised but not connected - (https://github.com/ansible/ansible/issues/74092).
- psrp - Try to clean up any server-side resources when resetting a connection.
- roles - make sure argspec validation task is tagged with ``always`` (https://github.com/ansible/ansible/pull/74994).
- slurp - Fix error messages for unreadable files and directories (https://github.com/ansible/ansible/issues/67340).
- slurp - handle error when ``path`` is a directory and not a file (https://github.com/ansible/ansible/pull/74930).
- ssh connection - fix interaction between transfer settings options.
- subversion - fix stack trace when getting information about the repository (https://github.com/ansible/ansible/issues/36498)
- version test - improve error message when an empty version is provided
v2.11.1
=======
Release Summary
---------------
| Release Date: 2021-05-24
| `Porting Guide <https://docs.ansible.com/ansible/devel/porting_guides.html>`__
Minor Changes
-------------
- ansible adhoc, clarified the help to some options, also added some comments to code.
- command - update the user warning message to point out command name (https://github.com/ansible/ansible/pull/74475).
Bugfixes
--------
- Add RockyLinux to fact gathering (https://github.com/ansible/ansible/pull/74530).
- Improve resilience of ``ansible-galaxy collection`` by increasing the page size to make fewer requests overall and retrying queries with a jittered exponential backoff when rate limiting HTTP codes (520 and 429) occur. (https://github.com/ansible/ansible/issues/74191)
- Prevent ``ansible_failed_task`` from further templating (https://github.com/ansible/ansible/issues/74036)
- Remove 'default' from ssh plugin as we want to rely on default from ssh itself or ssh/config.
- The error message about the failure to import a ``gpg`` key by the ``apt_key`` module was incorrect (https://github.com/ansible/ansible/issues/74423).
- ansible-test - Avoid publishing the port used by the ``pypi-test-container`` since it is only accessed by other containers. This avoids issues when trying to run tests in parallel on a single host.
- ansible-test - Fix docker container IP address detection. The ``bridge`` network is no longer assumed to be the default.
- ansible-test - Use documented API to retrieve build information from Azure Pipelines.
- ansible.builtin.cron - Keep non-empty crontabs, when removing cron jobs (https://github.com/ansible/ansible/pull/74497).
- ansible.utils.encrypt now handles missing or unusable 'crypt' library.
- ansible_test - add constraint for ``MarkupSafe`` (https://github.com/ansible/ansible/pull/74666)
- apt_key - Binary GnuPG keys downloaded via URLs were corrupted so GnuPG could not import them (https://github.com/ansible/ansible/issues/74424).
- become - fix a regression on Solaris where chmod can return 5 which we interpret as auth failure and stop trying become tmpdir permission fallbacks
- become - work around setfacl not existing on modern Solaris (and possibly failing on some filesystems even when it does exist)
- callback default, now uses task delegate_to instead of delegate vars to display delegate to host
- callbacks, restores missing delegate_vars
- correct doc links for become on warnings over world readable settings.
- correctly use world readable setting since old constant is not 'settable' anymore.
- facts - detect homebrew installed at /opt/homebrew/bin/brew
- filter plugins - patch new versions of Jinja2 to prevent warnings/errors on renamed filter decorators (https://github.com/ansible/ansible/issues/74667)
- get_url - Fixed checksum validation for binary files (leading asterisk) in checksum files (https://github.com/ansible/ansible/pull/74502).
- hostname - Add Rocky Linux support
- ini lookup - handle errors for duplicate keys and missing sections (https://github.com/ansible/ansible/issues/74601)
- interpreter discovery - Debian 8 and lower will avoid unsupported Python3 version in interpreter discovery
- pause - ensure control characters are always set to an appropriate value (https://github.com/ansible/ansible/issues/73264)
- playbook loaded from collection subdir now does not ignore subdirs.
- plugin config now allows list type options to have multiple valid choices (#74225).
- replace - better handling of file operation exceptions (https://github.com/ansible/ansible/pull/74686).
- roles - allow for role arg specs in new meta file (https://github.com/ansible/ansible/issues/74525).
- service - compare version without LooseVersion API (https://github.com/ansible/ansible/issues/74488).
v2.11.0
=======
Release Summary
---------------
| Release Date: 2021-04-26
| `Porting Guide <https://docs.ansible.com/ansible/devel/porting_guides.html>`__
Major Changes
-------------
- A collection can be reinstalled with new version requirements without using the ``--force`` flag. The collection's dependencies will also be updated if necessary with the new requirements. Use ``--upgrade`` to force transitive dependency updates.
- AnsibleModule - use ``ArgumentSpecValidator`` class for validating argument spec and remove private methods related to argument spec validation. Any modules using private methods should now use the ``ArgumentSpecValidator`` class or the appropriate validation function.
- Declared ``resolvelib >= 0.5.3, < 0.6.0`` a direct dependency of
ansible-core. Refs:
- https://github.com/sarugaku/resolvelib
- https://pypi.org/p/resolvelib
- https://pradyunsg.me/blog/2020/03/27/pip-resolver-testing
- It became possible to install Ansible Collections from local folders and namespaces folder similar to SCM structure with multiple collections.
- It became possible to upgrade Ansible collections from Galaxy servers using the ``--upgrade`` option with ``ansible-galaxy collection install``.
- Support for role argument specification validation at role execution time. When a role contains an argument spec, an implicit validation task is inserted at the start of role execution.
- add ``ArgumentSpecValidator`` class for validating parameters against an argument spec outside of ``AnsibleModule`` (https://github.com/ansible/ansible/pull/73335)
- ansible-test - Tests run with the ``centos6`` and ``default`` test containers now use a PyPI proxy container to access PyPI when Python 2.6 is used. This allows tests running under Python 2.6 to continue functioning even though PyPI is discontinuing support for non-SNI capable clients.
Minor Changes
-------------
- Add ``--format`` CLI option to ``ansible-galaxy collection list`` which allows for ``human`` (default), ``yaml``, or ``json``. (https://github.com/ansible/ansible/pull/73474)
- Add an example for using var in with_sequence (https://github.com/ansible/ansible/issues/68836).
- Add new rolespec_validate option to the import/include_role modules do allow disabling of the implicit role arg validation task on a per-role basis.
- Add option to pass extra vars to ansible-inventory
- Add path of collection location in Ansible CLI version info.
- Add standard Python 2/3 compatibility boilerplate to setup script, module_utils and docs_fragments which were missing them.
- Add support for `argument_specs` data in role metadata.
- Add support for datetime.date object type in module result (https://github.com/ansible/ansible/issues/70583).
- Add which conditional is being evaluated at each step when debugging.
- Add yum/dnf version comparison documentation for package install
- Added NO_COLOR environment var to ansible color configuration, allowing it to integrate with existing convention.
- Added name of aliases in user error (https://github.com/ansible/ansible/issues/58752).
- Added support for GSSAPI/Kerberos authentication with ``urls.py`` that is used by ``uri`` and ``get_url``.
- Added support for specify custom credentials for GSSAPI authentication.
- Allow an attribute to be passed to the min and max filters with Jinja 2.10+
- Allow for the skipped filter to be used on a registered looped task results. (https://github.com/ansible/ansible/issues/16949)
- Allow inventory plugins access to extra vars by default
- Allow unsafe_writes to be set on target via env var, for those targets that need a blanket setting.
- Also added extra vars cli option to console CLI.
- AnsiballZ - Improve performance of ``ModuleDepFinder`` by using faster lookups and reducing the object types that are walked while looking for ``import`` statements. (https://github.com/ansible/ansible/pull/70475)
- CLI - Specify jinja version in ``--version`` output
- CLI - Specify whether PyYAML includes libyaml support in version output
- CLI version displays clarified as core version
- Callbacks - Migrate more places in the ``TaskExecutor`` to sending callbacks directly over the queue, instead of sending them as ``TaskResult`` and short circuiting in the Strategy to send the callback. This enables closer to real time callbacks of retries and loop results (https://github.com/ansible/ansible/issues/73899)
- Collection routing: Cisco NSO content from community.network migrated to cisco.nso (https://github.com/ansible/ansible/pull/73046).
- Collection routing: DellEMC content from community.general migrated to dellemc.openmanage (https://github.com/ansible/ansible/pull/73046).
- Collection routing: FortiOS content from community.network migrated to community.fortios (https://github.com/ansible/ansible/pull/73046).
- Collection routing: Google content from community.general migrated to community.google (https://github.com/ansible/ansible/pull/73046).
- Collection routing: Hashi Vault content from community.general migrated to community.hashi_vault (https://github.com/ansible/ansible/pull/73046).
- Collection routing: Hetzner Robot content from community.general migrated to community.hrobot (https://github.com/ansible/ansible/pull/73046).
- Collection routing: KubeVirt content from community.general migrated to community.kubevirt (https://github.com/ansible/ansible/pull/73046).
- Collection routing: OC content from community.general migrated to community.okd (https://github.com/ansible/ansible/pull/73046).
- Collection routing: PostgreSQL content from community.general migrated to community.postgresql (https://github.com/ansible/ansible/pull/73046).
- Collection routing: RouterOS content from community.network migrated to community.routeros (https://github.com/ansible/ansible/pull/73046).
- Collection routing: docker content from community.general migrated to community.docker (https://github.com/ansible/ansible/pull/73046).
- Controller - Add warning for Ansible 2.11 when running a Python version older than Python 3.8 to inform users that 2.12 will only support Python 3.8 and newer on the controller. Starting with Ansible 2.11, the project will only be packaged for Python 3.8 and newer.
- Discourage the use of 'hexdigits' in password lookup, as it distorts expected entropy.
- Enable extra vars for inventory plugin options
- Errors - Ensure that errors passed with ``orig_exc`` include the context of that exception (https://github.com/ansible/ansible/issues/68605)
- Filters - Add new ``split`` filter for splitting strings
- Fixed ansible-doc to not substitute for words followed by parenthesis. For instance, ``IBM(International Business Machines)`` will no longer be substituted with a link to a non-existent module. https://github.com/ansible/ansible/pull/71070
- Force the template module to use non-native Jinja2 (https://github.com/ansible/ansible/issues/46169)
- Internal config entries will not be documented, to mark an entry as internal it must start with `_`.
- Interpreter Discovery - Add Python 3.8 and Python 3.9 to the fallback list
- Minor code cleanup in plugin loader.
- Module API - libselinux-python is no longer required for basic module API selinux operations (affects core modules assemble, blockinfile, copy, cron, file, get_url, lineinfile, setup, replace, unarchive, uri, user, yum_repository)
- Module API - new module_respawn API allows modules that need to run under a specific Python interpreter to respawn in place under that interpreter
- Module iptables multiport destination support added (https://github.com/ansible/ansible/pull/72928)
- Module iptables set/ipset support added (https://github.com/ansible/ansible/pull/72984)
- New 'timeout' feature added to adhoc and console CLIs, corresponding to the recent 'timeout' task keyword.
- New virtualization facts, ``virtualization_tech_guest`` and ``virtualization_tech_host`` now allow for conveying when a system is a host or guest of multiple virtualization technologies.
- Now 'choices' keyword in config definitions also restricts valid values for the entry.
- Refactored ``ansible-galaxy collection [download|install|list|verify]`` CLI subcommands with the public interface kept intact.
- Restructured _fixup_perms2() in ansible.plugins.action to make it more linear
- Shadow prompt input to ansible-vault encrypt-string unless the ``--show-input`` flag is set
- Switch to hashlib.sha256() for ansible-test to allow for FIPs mode.
- TOML inventory plugin is no longer in preview status
- Templar - reduce the complexity of ``Templar._lookup`` (https://github.com/ansible/ansible/pull/73277)
- The ``csvfile`` lookup plugin now uses ``parse_kv()`` internally. As a result, multi-word search keys can now be passed.
- The ``csvfile`` lookup plugin's documentation has been fixed; it erroneously said that the delimiter could be ``t`` which was never true. We now accept ``\t``, however, and the error in the documentation has been fixed to note that.
- The constructed inventory plugin has new option to force using vars plugins on previouslly processed inventory sources.
- The find module is now more specific about the reasons it skips candidate files.
- The logging functionality in module_utils.basic now returns a nicer error when it falls back to syslog but ends up getting a TypeError thrown back.
- The new dependency resolver prefers ``MANIFEST.json`` over ``galaxy.yml`` if it exists in the target directory.
- The plugin loader now keeps track of the collection where a plugin was resolved to, in particular whether the plugin was loaded from ansible-core's internal paths (``ansible.builtin``) or from user-supplied paths (no collection name).
- Toggle allowing usage of extra_vars in compose
- When connecting as an unprivileged user, and becoming an unprivileged user, we now fall back to also trying ``chmod +a`` which works on macOS and makes use of ACLs.
- allow tree callback plugin to be configurable, for use with playbooks.
- ansible-doc - In Windows setup steps, ``ExecutionPolicy`` should be restored to default value ``RemoteSigned`` (https://github.com/ansible/ansible/pull/72993).
- ansible-doc - provide ``has_action`` field in JSON output for modules. That information is currently only available in the text view (https://github.com/ansible/ansible/pull/72359).
- ansible-doc has new option to show keyword documentation.
- ansible-doc will now format, ``L()``, ``R()``, and ``HORIZONTALLINE`` in plugin docs just as the website docs do. https://github.com/ansible/ansible/pull/71070
- ansible-galaxy - Add installation successful message
- ansible-galaxy - Added caching mechanisms when retrieving collection info to speed up installs and downloads
- ansible-galaxy - Change the output verbosity level of the download message from 3 to 0 (https://github.com/ansible/ansible/issues/70010)
- ansible-galaxy - Ensure ``get_collection_versions`` returns an empty list when a collection does not exist for consistency across API versions.
- ansible-galaxy - find any collection dependencies in the globally configured Galaxy servers and not just the server the parent collection is from.
- ansible-galaxy CLI - ``collection verify`` command now exits with a non-zero exit code on verification failure
- ansible-galaxy CLI - ``collection verify`` command now supports a ``--offline`` option for local-only verification
- ansible-test - A warning is no longer emitted when a ``pip*`` or ``python*`` binary is found without a matching couterpart.
- ansible-test - Add ``macos/10.15`` as a supported value for the ``--remote`` option.
- ansible-test - Add a ``--docker-network`` option to choose the network for running containers when using the ``--docker`` option.
- ansible-test - Add constraint for ``decorator`` for Python versions prior to 3.5.
- ansible-test - Add support for running tests on Fedora 33 (https://github.com/ansible/ansible/pull/72861).
- ansible-test - Added Ubuntu 20.04 LTS image to the default completion list
- ansible-test - Added a ``--export`` option to the ``ansible-test coverage combine`` command to facilitate multi-stage aggregation of coverage in CI pipelines.
- ansible-test - Added the ``-remote rhel/7.9`` option to run tests on RHEL 7.9
- ansible-test - Allow custom ``--remote-stage`` options for development and testing.
- ansible-test - CentOS 8 container is now 8.2.2004 (https://github.com/ansible/distro-test-containers/pull/45).
- ansible-test - Changed the internal name of the custom plugin used to identify use of unwanted imports and functions.
- ansible-test - Cleaned up code to resolve warnings and errors reported by PyCharm.
- ansible-test - Code cleanup in the ``import`` sanity test.
- ansible-test - Code cleanup in the internal logic for code coverage collection of PowerShell modules.
- ansible-test - Collections can now specify pip constraints for unit and integration test requirements using ``tests/unit/constraints.txt`` and ``tests/integration/constraints.txt`` respectively.
- ansible-test - Containers used with the ``--remote`` option have been updated to version 1.29.0 to include the latest Ansible requirements.
- ansible-test - Files used to track remote instances no longer have a region suffix.
- ansible-test - Fix ``ansible-test coverage`` reporting sub-commands (``report``, ``html``, ``xml``) on Python 2.6.
- ansible-test - Fix container hostname/IP discovery for the ``acme`` test plugin.
- ansible-test - FreeBSD 11.4 and 12.2 provisioning can now be used with the ``--python 3.8`` option.
- ansible-test - FreeBSD instances provisioned with ``--remote`` now make ``libyaml`` available for use with PyYAML installation.
- ansible-test - Generation of an ``egg-info`` directory, if needed, is now done after installing test dependencies and before running tests. When running from an installed version of ``ansible-test`` a temporary directory is used to avoid permissions issues. Previously it was done before installing test dependencies and adjacent to the installed directory.
- ansible-test - Implemented CloudStack test container selection by ENV variable `ANSIBLE_CLOUDSTACK_CONTAINER` with a default to `quay.io/ansible/cloudstack-test-container:1.4.0`.
- ansible-test - Improved handling of minimum Python version requirements for sanity tests. Supported versions are now included in warning messages displayed when tests are skipped.
- ansible-test - More sanity test requirements have been pinned to specific versions to provide consistent test results.
- ansible-test - Most sanity test specific ``pip`` constraints are now used only when running sanity tests. This should reduce conflicts with ``pip`` requirements and constraints when testing collections.
- ansible-test - Most sanity tests are now skipped on Python 3.5 and earlier with a warning. Previously this was done for Python 2.7 and earlier.
- ansible-test - Now supports freebsd/11.4 remote (https://github.com/ansible/ansible/issues/48782).
- ansible-test - Now supports freebsd/12.2 remote (https://github.com/ansible/ansible/issues/72366).
- ansible-test - OpenSuse container now uses Leap 15.2 (https://github.com/ansible/distro-test-containers/pull/48).
- ansible-test - Pin the ``virtualenv`` version used for ``--remote`` pip installs to the latest version supported by Python 2.x, which is version 16.7.10.
- ansible-test - Provisioning of RHEL instances now includes installation of pinned versions of ``packaging`` and ``pyparsing`` to match the downstream vendored versions.
- ansible-test - RHEL 8.2+ provisioning can now be used with the ``--python 3.8`` option, taking advantage of the Python 3.8 AppStream.
- ansible-test - Raise the number of bytes scanned by ansible-test to determine if a file is binary to 4096.
- ansible-test - Refactor code for installing ``cryptography`` to allow re-use in the future.
- ansible-test - Refactor code to remove unused logic for obsolete support of multiple provisioning endpoints.
- ansible-test - Remove ``pytest < 6.0.0`` constraint for managed installations on Python 3.x now that pytest 6 is supported.
- ansible-test - Remove em dash from the Pytest configuration file in order to be readable on systems where preferred encoding is ASCII. (https://github.com/ansible/ansible/issues/71739)
- ansible-test - Remove outdated ``--docker`` completion entries: fedora30, fedora31, ubuntu1604
- ansible-test - Remove outdated ``--remote`` completion entries: freebsd/11.1, freebsd/12.1, osx/10.11, macos/10.15, rhel/7.6, rhel/7.8, rhel/8.1, rhel/8.2
- ansible-test - Remove outdated ``--windows`` completion entries: 2008, 2008-R2
- ansible-test - Remove the discontinued ``us-east-2`` choice from the ``--remote-aws-region`` option.
- ansible-test - Remove unused ``--remote`` completion entry: power/centos/7
- ansible-test - Removed ``pip`` constraints related to integration tests that have been moved to collections. This should reduce conflicts with ``pip`` requirements and constraints when testing collections.
- ansible-test - Removed the obsolete ``--remote-aws-region`` provisioning option.
- ansible-test - Removed the obsolete ``tower`` test plugin for testing Tower modules.
- ansible-test - Removed unused provisioning code and cleaned up remote provider management logic.
- ansible-test - Rename internal functions to match associated constant names that were previously updated.
- ansible-test - Reorganize internal ``pylint`` configuration files for easier comparison and maintenance.
- ansible-test - Report the correct line number in the ``yamllint`` sanity test when reporting ``libyaml`` parse errors in module documentation.
- ansible-test - Request remote resources by provider name for all provider types.
- ansible-test - Show a warning when the obsolete ``--remote-aws-region`` option is used.
- ansible-test - Silence ``pip`` warnings about Python 3.5 being EOL when installing requirements.
- ansible-test - Support custom remote endpoints with the ``--remote-endpoint`` option.
- ansible-test - The ``--remote`` option no longer pre-installs the ``virtualenv`` module on Python 3.x instances. The Python built-in ``venv`` module should be used instead.
- ansible-test - The ``default`` container for both collections and core have been updated to versions 2.11.0 and 1.9.0 respectively.
- ansible-test - The ``pylint`` sanity test is now skipped with a warning on Python 3.9 due to unresolved upstream regressions.
- ansible-test - The ``pylint`` sanity test is now supported on Python 3.8.
- ansible-test - The ``rstcheck`` sanity test is no longer used for collections, but continues to be used for ansible-core.
- ansible-test - The generated ``resource_prefix`` variable now meets the host name syntax requirements specified in RFC 1123 and RFC 952. The value used for local tests now places the random number before the hostname component, rather than after. If the resulting value is too long, it will be truncated.
- ansible-test - Ubuntu containers as well as ``default-test-container`` and ``ansible-base-test-container`` are now slightly smaller due to apt cleanup (https://github.com/ansible/distro-test-containers/pull/46).
- ansible-test - Update ``pylint`` and its dependencies to the latest available versions to support Python 3.9.
- ansible-test - Update built-in service endpoints for the ``--remote`` option.
- ansible-test - Update distribution test containers from version 2.0.1 to 2.0.2.
- ansible-test - Update the Ansible Core and Ansible Collection default test containers to 3.2.0 and 3.2.2 respectively.
- ansible-test - Updated the default test containers to version 3.1.0.
- ansible-test - Upgrade ansible-runner version used in compatibility tests, remove some tasks that were only needed with older versions, and skip in python2 because ansible-runner is soon dropping it.
- ansible-test - Use new endpoint for Parallels based instances with the ``--remote`` option.
- ansible-test - ``default-test-container`` and ``ansible-base-test-container`` now use Python 3.9.0 instead of 3.9.0rc1.
- ansible-test - add https endpoint for ansible-test
- ansible-test - add macOS 11.1 as a remote target (https://github.com/ansible/ansible/pull/72622)
- ansible-test - add the collection plugin directories ``plugin_utils`` and ``sub_plugins`` to list of plugin types. This ensures such plugins are tested for the ``import`` sanity test (https://github.com/ansible/ansible/pull/73599).
- ansible-test - centos6 end of life - container image updated to point to vault base repository (https://github.com/ansible/distro-test-containers/pull/54)
- ansible-test - centos6 image now has multiple fallback yum repositories for CentOS Vault.
- ansible-test - default container now uses default-test-container 2.7.0 and ansible-base-test-container 1.6.0. This brings in Python 3.9.0rc1 for testing.
- ansible-test - now makes a better attempt to support podman when calling ``docker images`` and asking for JSON format.
- ansible-test - python-cryptography is now bounded at <3.2, as 3.2 drops support for OpenSSL 1.0.2 upon which some of our CI infrastructure still depends.
- ansible-test - remote macOS instances no longer install ``virtualenv`` during provisioning
- ansible-test - the ACME test container was updated, it now supports external account creation and has a basic OCSP responder (https://github.com/ansible/ansible/pull/71097, https://github.com/ansible/acme-test-container/releases/tag/2.0.0).
- ansible-test - the ``import`` sanity test now also tries to import all non-module and non-module_utils Python files in ``lib/ansible/`` resp. ``plugins/`` (https://github.com/ansible/ansible/pull/72497).
- ansible-test - virtualenv helper scripts now prefer ``venv`` on Python 3 over ``virtualenv``
- ansible-test Now supports RHEL 8.3
- ansible-test pylint - ensure that removal collection version numbers conform to the semantic versioning specification at https://semver.org/ (https://github.com/ansible/ansible/pull/71679).
- ansible-test pylint sanity test - stop ignoring ``used-before-assignment`` errors (https://github.com/ansible/ansible/pull/73639).
- ansible-test runtime-metadata - compare deprecation and tombstone versions to the current version to ensure that they are correct (https://github.com/ansible/ansible/pull/72625).
- ansible-test runtime-metadata - ensure that removal collection version numbers conform to the semantic versioning specification at https://semver.org/ (https://github.com/ansible/ansible/pull/71679).
- ansible-test runtime-metadata - ensure that the tombstone removal date is not in the future (https://github.com/ansible/ansible/pull/72625).
- ansible-test runtime-metadata - validate removal version numbers, and check removal dates more strictly (https://github.com/ansible/ansible/pull/71679).
- ansible-test validate-modules - ensure that removal collection version numbers and version_added collection version numbers conform to the semantic versioning specification at https://semver.org/ (https://github.com/ansible/ansible/pull/71679).
- ansible-test validate-modules - no longer assume that ``default`` for ``type=bool`` options is ``false``, as the default is ``none`` and for some modules, ``none`` and ``false`` mean different things (https://github.com/ansible/ansible/issues/69561).
- ansible-test validate-modules - option names that seem to indicate they contain secret information that should be marked ``no_log=True`` are now flagged in the validate-modules sanity test. False positives can be marked by explicitly setting ``no_log=False`` for these options in the argument spec. Please note that many false positives are expected; the assumption is that it is by far better to have false positives than false negatives (https://github.com/ansible/ansible/pull/73508).
- ansible-test validate-modules - validate removal version numbers (https://github.com/ansible/ansible/pull/71679).
- ansible.utils.encrypt now returns `AnsibleError` instead of crypt.crypt's `OSError` on Python 3.9
- apt - module now works under any supported Python interpreter
- apt_repository - module now works under any supported Python interpreter
- callback plugins - ``meta`` tasks now get sent to ``v2_playbook_on_task_start``. Explicit tasks are always sent. Plugins can opt in to receiving implicit ones.
- callbacks - Add feature allowing forks to send callback events (https://github.com/ansible/ansible/issues/14681)
- conditionals - change the default of CONDITIONAL_BARE_VARS to False (https://github.com/ansible/ansible/issues/70682).
- config - more types are now automatically coerced to string when ``type: str`` is used and the value is parsed as a different type
- constructed - Add a toggle to allow the separator to be omitted if no prefix has been provided.
- constructed inventory plugin - Sanitize group names created from the ``groups`` option silently.
- create ``get_type_validator`` standalone function and move that functionality out of ``AnsibleModule`` (https://github.com/ansible/ansible/pull/72667)
- create ``get_unsupported_parameters`` validation function (https://github.com/ansible/ansible/pull/72447/files)
- debconf - add a note about no_log=True since module might expose sensitive information to logs (https://github.com/ansible/ansible/issues/32386).
- default callback - add ``show_task_path_on_failure`` option to display file and line number of tasks only on failed tasks when running at normal verbosity level (https://github.com/ansible/ansible/issues/64625)
- default callback - task name is now shown for ``include_tasks`` when using the ``free`` strategy (https://github.com/ansible/ansible/issues/71277).
- default callback - task name is now shown for ``include_tasks`` when using the ``linear`` strategy with ``ANSIBLE_DISPLAY_SKIPPED_HOSTS=0``.
- default_callback - moving 'check_mode_markers' documentation in default_callback doc_fragment (https://github.com/ansible-collections/community.general/issues/565).
- distribution - add facts about Amazon Linux Distribution facts (https://github.com/ansible/ansible/issues/73742).
- distribution - add support for DragonFly distribution (https://github.com/ansible/ansible/issues/43739).
- distribution - added distribution fact and hostname support for Parrot OS (https://github.com/ansible/ansible/pull/69158).
- distribution - handle NetBSD OS Family (https://github.com/ansible/ansible/issues/43739).
- distribution facts - ``distribution_release`` is now ``"Stream"`` on CentOS Stream (https://github.com/ansible/ansible/issues/73027).
- dnf - Add nobest option (https://github.com/ansible/ansible/issues/69983)
- dnf - When ``state: absent``, package names are now matched similarly to how the ``dnf`` CLI matches them (https://github.com/ansible/ansible/issues/72809).
- dnf - module now works under any supported Python interpreter
- dnf - now shows specific package changes (installations/removals) under ``results`` in check_mode. (https://github.com/ansible/ansible/issues/66132)
- facts - ``/dev/kvm`` is now consulted in Linux virtualization facts, and the host is considered a KVM host if this file exists and none of the pre-existing checks matched.
- facts - add new fact ``date_time['tz_dst']``, which returns the daylight saving timezone (https://github.com/ansible/ansible/issues/69004).
- facts - add uptime to openbsd
- find module - Now has a ``read_whole_file`` boolean parameter which allows for reading the whole file and doing an ``re.search()`` regex evaluation on it when searching using the ``contains`` option. This allows (for example) for ensuring the very end of the file matches a pattern.
- galaxy - add documentation about galaxy parameters in examples/ansible.cfg (https://github.com/ansible/ansible/issues/68402).
- galaxy - handle token as dict while loading from yaml file (https://github.com/ansible/ansible/issues/70887).
- get_url - allow checksum urls to point to file:// resources, moving scheme test to function
- get_url - handle same SHA sum for checksum file (https://github.com/ansible/ansible/issues/71420).
- git - add ``single_branch`` parameter (https://github.com/ansible/ansible/pull/28465)
- hash filter - fail when unsupported hash type is passed as an argument (https://github.com/ansible/ansible/issues/70258)
- inventory cache - do not show a warning when the cache file does not (yet) exist.
- iptables - add a note about ipv6-icmp in protocol parameter (https://github.com/ansible/ansible/issues/70905).
- iptables - fixed get_chain_policy API (https://github.com/ansible/ansible/issues/68612).
- iptables - reorder comment postition to be at the end (https://github.com/ansible/ansible/issues/71444).
- lineinfile - add search_string parameter for non-regexp searching (https://github.com/ansible/ansible/issues/70470)
- linux facts - Add additional check to ensure 'container' virtual fact gets added to guest_tech when appropriate (https://github.com/ansible/ansible/pull/71385)
- meta - now include a ``skip_reason`` when skipped (https://github.com/ansible/ansible/pull/71355).
- module payload builder - module_utils imports in any nested block (eg, ``try``, ``if``) are treated as optional during module payload builds; this allows modules to implement runtime fallback behavior for module_utils that do not exist in older versions of Ansible.
- module_utils - ``get_file_attributes()`` now takes an optional ``include_version`` boolean parameter. When ``True`` (default), the file's version/generation number is included in the result (but requires ``lsattr -v`` to work on the target platform).
- now !unsafe works on all types of data, not just strings, even recursively for mappings and sequences.
- package_facts - module support for apt and rpm now works under any supported Python interpreter
- pipe lookup - update docs for Popen with shell=True usages (https://github.com/ansible/ansible/issues/70159).
- plugin examples - Allow non-YAML examples, so that examples for plugins like the INI and TOML inventory plugins can be directly represented (https://github.com/ansible/ansible/pull/71184)
- plugin option validation - now the option type ``dict``/``dictionary`` is also validated by the config manager (https://github.com/ansible/ansible/pull/71928).
- reboot - add ``reboot_command`` parameter to allow specifying the command used to reboot the system (https://github.com/ansible/ansible/issues/51359)
- remove ``excommunicate`` debug command from AnsiballZ
- selinux - return selinux_getpolicytype facts correctly.
- service_facts - return service state information on AIX.
- service_facts - return service state information on OpenBSD.
- setup - allow list of filters (https://github.com/ansible/ansible/pull/68551).
- setup - fix distribution facts for Older Amazon Linux with ``/etc/os-release`` (https://github.com/ansible/ansible/issues/73946).
- setup.py - Declare that Python 3.9 is now supported (https://github.com/ansible/ansible/pull/72861).
- setup.py - Skip doing conflict checks for ``sdist`` and ``egg_info`` commands (https://github.com/ansible/ansible/pull/71310)
- subelements - clarify the lookup plugin documentation for parameter handling (https://github.com/ansible/ansible/issues/38182).
- subversion - ``validate_certs`` option, which, when true, will avoid passing ``--trust-server-cert`` to ``svn`` commands (https://github.com/ansible/ansible/issues/22599).
- unarchive - Add support for .tar.zst (zstd compression) (https://github.com/ansible/ansible/pull/73265).
- unarchive - add ``RETURN`` documentation (https://github.com/ansible/ansible/issues/67445).
- unarchive - add ``include`` parameter to allow extracting specific files from an archive (https://github.com/ansible/ansible/pull/40522)
- update sphinx to 2.1.2 and rstcheck to 3.3.1 for building documentation.
- uri - add ``ca_path`` argument to allow specification of a CA certificate (https://github.com/ansible/ansible/pull/71979).
- user - add new parameters ``password_expire_max`` and ``password_expire_min`` for controlling password expiration (https://github.com/ansible/ansible/issues/68775)
- varnames lookup plugin - Fixed grammar error in exception message when the plugin is given a non-string term.
- vault - Provide better error for single value encrypted values to indicate the file, line, and column of the errant vault (https://github.com/ansible/ansible/issues/72276)
- version test - Add semantic version functionality
- virtual facts - containerd cgroup is now recognized as container tech (https://github.com/ansible/ansible/issues/66304).
- virtualization facts - Detect ``vdsmd`` in addition to ``vdsm`` when trying to detect RHEV hosts. (https://github.com/ansible/ansible/issues/66147)
- winrm - Added ``ansible_winrm_kinit_args`` that can be used to control the args that are sent to the ``kinit`` call for Kerberos authentication.
- yum - module now works under any supported Python interpreter
- yum_repository - added boolean option module_hotfixes which allows to enable functionality for dnf.
Breaking Changes / Porting Guide
--------------------------------
- Made SCM collections be reinstalled regardless of ``--force`` being present.
- NetBSD virtualization facts (specifically ``ansible_virtualization_type``) now returns a more accurate value by checking the value of the ``machdep.hypervisor`` ``sysctl`` key. This change is breaking because in some cases previously, we would erroneously report ``xen`` even when the target is not running on Xen. This prevents that behavior in most cases. (https://github.com/ansible/ansible/issues/69352)
- Replaced the in-tree dependency resolver with an external implementation that pip >= 20.3 uses now by default — ``resolvelib``. (https://github.com/ansible/ansible/issues/71784)
- The ``meta`` module now supports tags for user-defined tasks. Internal ``meta`` tasks continue to always run. (https://github.com/ansible/ansible/issues/64558)
- ansible-galaxy login command has been removed (see https://github.com/ansible/ansible/issues/71560)
Deprecated Features
-------------------
- Starting in 2.14, shell and command modules will no longer have the option to warn and suggest modules in lieu of commands. The ``warn`` parameter to these modules is now deprecated and defaults to ``False``. Similarly, the ``COMMAND_WARNINGS`` configuration option is also deprecated and defaults to ``False``. These will be removed and their presence will become an error in 2.14.
- apt_key - the paramater ``key`` does not have any effect, has been deprecated and will be removed in ansible-core version 2.14 (https://github.com/ansible/ansible/pull/70319).
- psrp - Set the minimum version of ``pypsrp`` to ``0.4.0``.
Removed Features (previously deprecated)
----------------------------------------
- Removed `SharedPluginLoaderObj` class from ansible.plugins.strategy. It was deprecated in favor of using the standard plugin loader.
- Removed `_get_item()` alias from callback plugin base class which had been deprecated in favor of `_get_item_label()`.
- The "user" parameter was previously deprecated and is now removed in favor of "scope"
- The deprecated ``ansible.constants.BECOME_METHODS`` has been removed.
- The deprecated ``ansible.constants.get_config()`` has been removed.
- The deprecated ``ansible.constants.mk_boolean()`` has been removed.
- `with_*` loops are no longer optimized for modules whose `name` parameters can take lists (mostly package managers). Use `name` instead of looping over individual names with `with_items` and friends.
Security Fixes
--------------
- **security issue** - Mask default and fallback values for ``no_log`` module options (CVE-2021-20228)
- **security issue** - copy - Redact the value of the no_log 'content' parameter in the result's invocation.module_args in check mode. Previously when used with check mode and with '-vvv', the module would not censor the content if a change would be made to the destination path. (CVE-2020-14332)
- Sanitize no_log values from any response keys that might be returned from the uri module (CVE-2020-14330).
- dnf - Previously, regardless of the ``disable_gpg_check`` option, packages were not GPG validated. They are now. (CVE-2020-14365)
Bugfixes
--------
- A handler defined within a role will now search handlers subdir for included tasks (issue https://github.com/ansible/ansible/issues/71222).
- ALLOW_WORLD_READABLE_TMP, switched to 'moved' message as 'deprecation' is misleading since config settings still work w/o needing change.
- ANSIBLE_COLLECTIONS_PATHS - remove deprecation so that users of Ansible 2.9 and 2.10+ can use the same var when specifying a collection path without a warning.
- Added unsafe_writes test.
- Address compat with rpmfluff-0.6 for integration tests
- Address the deprecation of the use of stdlib distutils in packaging. It's a short-term hotfix for the problem (https://github.com/ansible/ansible/issues/70456, https://github.com/pypa/setuptools/issues/2230, https://github.com/pypa/setuptools/commit/bd110264)
- Adjust various hard-coded action names to also include their ``ansible.builtin.`` and ``ansible.legacy.`` prefixed version (https://github.com/ansible/ansible/issues/71817, https://github.com/ansible/ansible/issues/71818, https://github.com/ansible/ansible/pull/71824).
- Allow TypeErrors on Undefined variables in filters to be handled or deferred when processing for loops.
- Allow `~` to be present in file names in galaxy roles (https://github.com/ansible/ansible/issues/72966)
- Always mention the name of the deprecated or tombstoned plugin in routing deprecation/tombstone messages (https://github.com/ansible/ansible/pull/73059).
- Ansible output now uses stdout to determine column width instead of stdin
- AnsibleModule - added arg ``ignore_invalid_cwd`` to ``AnsibleModule.run_command()``, to control its behaviour when ``cwd`` is invalid. (https://github.com/ansible/ansible/pull/72390)
- Apply ``_wrap_native_text`` only for builtin filters specified in STRING_TYPE_FILTERS.
- Automatically remove async cache files for polled async tasks that have completed (issue https://github.com/ansible/ansible/issues/73206).
- Be smarter about collection paths ending with ansible_collections, emulating a-galaxy behaviour. Issue 72628
- CLI - Restore git information in version output when running from source
- Collection callbacks were ignoring options and rules for stdout and adhoc cases.
- Collections - Ensure ``action_loader.get`` is called with ``collection_list`` to properly find collections when ``collections:`` search is specified (https://github.com/ansible/ansible/issues/72170)
- Command module now returns stdout & stderr if executable is missing or an unknown error occurs
- ConfigManager - Normalize ConfigParser between Python2 and Python3 to for handling comments (https://github.com/ansible/ansible/issues/73709)
- Continue execution when 'flatten' filter when it hits a None/null value as part of the list.
- Correct the inventory source error parse handling, specifically make the config INVENTORY_ANY_UNPARSED_IS_FAILED work as expected.
- Correctly set template_path and template_fullpath for usage in template lookup and action plugins.
- Deal with failures when sorting JSON and you have incompatible key types.
- Display - Use wcswidth to calculate printable width of a text string (https://github.com/ansible/ansible/issues/63105)
- Enabled unsafe_writes for get_url which was ignoring the paramter.
- Ensure Ansible's unique filter preserves order (https://github.com/ansible/ansible/issues/63417)
- Ensure if a traceback halts ``strategy.run`` that we still attempt to clean up (https://github.com/ansible/ansible/issues/23958)
- Ensure password passed in by -k is used on delegated hosts that do not have ansible_password set
- Ensure the correct options are used when ssh executables are used that don't match ssh executable names.
- Facts collection - get serial number of NVMe device without sg_inq (https://github.com/ansible/ansible/issues/66663).
- Fix --list-tasks format `role_name : task_name` when task name contains the role name. (https://github.com/ansible/ansible/issues/72505)
- Fix ``RecursionError`` when templating large vars structures (https://github.com/ansible/ansible/issues/71920)
- Fix ``delegate_facts: true`` when ``ansible_python_interpreter`` is not set. (https://github.com/ansible/ansible/issues/70168)
- Fix adding unrelated candidate names to the plugin loader redirect list.
- Fix an exit code for a non-failing playbook (https://github.com/ansible/ansible/issues/71306)
- Fix ansible-galaxy collection list to show collections in site-packages (https://github.com/ansible/ansible/issues/70147)
- Fix bytestring vs string comparison in module_utils.basic.is_special_selinux_path() so that special-cased filesystems which don't support SELinux context attributes still allow files to be manipulated on them. (https://github.com/ansible/ansible/issues/70244)
- Fix execution of the meta tasks 'clear_facts', 'clear_host_errors', 'end_play', 'end_host', and 'reset_connection' when the CLI flag '--flush-cache' is provided.
- Fix fileglob bug where it could return different results for different order of parameters (https://github.com/ansible/ansible/issues/72873).
- Fix incorrect msg in the results dict in loops
- Fix incorrect re-run of roles with tags (https://github.com/ansible/ansible/issues/69848)
- Fix incorrect variable scoping when using ``import with context`` in Jinja2 templates. (https://github.com/ansible/ansible/issues/72615)
- Fix jsonfile cache plugin option '_uri' to be a type path instead of a string. (https://github.com/ansible/ansible/issues/38002)
- Fix notifying handlers via `role_name : handler_name` when handler name contains the role name. (https://github.com/ansible/ansible/issues/70582)
- Fix parsing of values when using empty string as a key (https://github.com/ansible/ansible/issues/57132)
- Fix statistics reporting when rescue block contains another block (issue https://github.com/ansible/ansible/issues/61253).
- Fix to previous deprecation change (#70504) which caused command warning deprecation to show in all cases, even when not specified by the user.
- Fixed TypeError instancemethod expecting at least 2 arguments for apt_repository(issue https://github.com/ansible/ansible/issues/69308, PR https://github.com/ansible/ansible/pull/69463)
- Fixed issue when `netstat` is either missing or doesn't have execution permissions leading to incorrect command being executed.
- Fixes ``ansible-galaxy role info`` to support multiple roles on the command line (https://github.com/ansible/ansible/pull/70148)
- Fixes ansible-test traceback when plugin author is not a string or a list of strings (https://github.com/ansible/ansible/pull/70507)
- Handle more varnames that can create conflicts, expand a function in general, handle jinja2 globals in particular (https://github.com/ansible/ansible/issues/41955).
- INTERPRETER_PYTHON_DISTRO_MAP - prefer ``/usr/libexec/platform-python`` on ``oraclelinux 8`` when other pythons are present.
- Improve Ansible config deprecations to show the source of the deprecation (ansible-core). Also remove space before a comma in config deprecations (https://github.com/ansible/ansible/pull/72697).
- Improved/fixed regular expressions in ``validate-modules/validate_modules/schema.py`` and ``utils/collection_loader/_collection_finder.py`` (https://github.com/ansible/ansible/pull/73577).
- Includes - Explicitly get the include task, and not assume it is the parent (https://github.com/ansible/ansible/issues/65710)
- InventoryManager - Fix unhandled exception when given limit file was actually a directory.
- InventoryManager - Fix unhandled exception when inventory directory was empty or contained empty subdirectories (https://github.com/ansible/ansible/issues/73658).
- JSON Encoder - Ensure we treat single vault encrypted values as strings (https://github.com/ansible/ansible/issues/70784)
- Lookup user by UID in password database if login name is not found (https://github.com/ansible/ansible/issues/17029)
- OpenBSD module_utils - update sysctl variable name
- Pass expression in angle-bracket notation as filename argument to a ``compile()`` built-in function, so that Python debuggers do not try to parse it as filename.
- Pass the connection's timeout to connection plugins instead of the task's timeout.
- Provide more information in AnsibleUndefinedVariable (https://github.com/ansible/ansible/issues/55152)
- Python module_utils finder - refactor logic to eliminate many corner cases, remove recursion, fix base module_utils redirections
- Remove an embedded function from RoleMixin and add tests for it (https://github.com/ansible/ansible/pull/72754).
- Remove the warning displayed when validating the arg spec of a role with dependencies and add it to the documentation.
- Restore the ability for changed_when/failed_when to function with group_by (#70844).
- Restored unsafe_writes functionality which was being skipped.
- Restructured pipelining settings to be at the connection plugins leaving base config as global and for backwards compatiblity.
- SSH plugin - Improve error message when ssh client is not found on the host
- Setup virtualization_facts - add RHV and oVirt type. This change will fully work for VMs in clusters at cluster level 4.4 or newer (https://github.com/ansible/ansible/pull/72876).
- Skip invalid collection names when listing in ansible-doc instead of throwing exception. Issue#72257
- Skip literal_eval for string filters results in native jinja. (https://github.com/ansible/ansible/issues/70831)
- Stop adding the connection variables to the output results
- Strategy - When building the task in the Strategy from the Worker, ensure it is properly marked as finalized and squashed. Addresses an issue with ``ansible_failed_task``. (https://github.com/ansible/ansible/issues/57399)
- Suppress warning when user directory used in --playbook-dir option with ansible-inventory command (https://github.com/ansible/ansible/issues/65262).
- TOML inventory - Ensure we register dump functions for ``AnsibleUnsafe`` to support dumping unsafe values. Note that the TOML format has no functionality to mark that the data is unsafe for re-consumption. (https://github.com/ansible/ansible/issues/71307)
- Terminal plugins - add "\e[m" to the list of ANSI sequences stripped from device output
- The ``docker`` and ``k8s`` action groups / module default groups now also support the moved modules in `community.docker <https://galaxy.ansible.com/community/docker>`_, `community.kubevirt <https://github.com/ansible-collections/community.kubevirt>`_, `community.okd <https://galaxy.ansible.com/community/okd>`_, and `kubernetes.core <https://galaxy.ansible.com/kubernetes/core>`_ (https://github.com/ansible/ansible/pull/72428).
- The ``flush()`` method of ``CachePluginAdjudicator`` now calls the plugin's ``flush()`` method instead of iterating over the keys that the adjudicator knows about and deleting those from the cache. (https://github.com/ansible/ansible/issues/68770)
- The `ansible_become` value was not being treated as a boolean value when set in an INI format inventory file (fixes bug https://github.com/ansible/ansible/issues/70476).
- The machine-readable changelog ``changelogs/changelog.yaml`` is now contained in the release.
- Try to avoid kernel 'blocking' state on reading files while fact gathering.
- Updated docs and added warning on max_fail_percentage and free strategy usage. fixes issue 16666.
- VariableManager - Add the 'vars' key before getting delegated variables (https://github.com/ansible/ansible/issues/71092).
- Vault - Allow single vault encrypted values to be used directly as module parameters. (https://github.com/ansible/ansible/issues/68275)
- WorkerProcess - Implement workaround for stdout deadlock in multiprocessing shutdown to avoid process hangs.
- WorkerProcess - Python 3.5 fix for workaround for stdout deadlock in multiprocessing shutdown to avoid process hangs. (https://github.com/ansible/ansible/issues/74149)
- [set_fact] Corrected and expanded documentation as well as now raise errors that were previously ignored.
- account for bug in Python 2.6 that occurs during interpreter shutdown to avoid stack trace
- action plugins - change all action/module delegations to use FQ names while allowing overrides (https://github.com/ansible/ansible/issues/69788)
- add AlmaLinux to fact gathering (https://github.com/ansible/ansible/pull/73458)
- add constraints file for ``ansible_runner`` test since an update to ``psutil`` is now causing test failures
- add magic/connection vars updates from delegated host info.
- add support for alpine linux 'apk' package manager in package_facts
- allow become method 'su' to work on 'local' connection by allocating a fake tty.
- ansible-console - Ctrl+C (in a task) abort current task, and put you back on prompt (this behavior doesn't change) (ditto)
- ansible-console - Ctrl+C (on prompt) used to exit the shell, unlike most shells, it should just reset the current line (ie. abort it and spawn a new prompt) (https://github.com/ansible/ansible/issues/68529)
- ansible-console - Ctrl+D (on prompt) now exit the shell, this is the expected behavior in a shell (cf bash, sh, zsh, ipython, ...) (ditto)
- ansible-console - add more documentation, specifically on various commands[1] (https://github.com/ansible/ansible/issues/72195)
- ansible-console - fixes few strings' typos
- ansible-console - remove useless and poorly formatted comment section (replaced with [1])
- ansible-doc - account for an empty ``meta/main.yml`` file when displaying role information (https://github.com/ansible/ansible/pull/73590)
- ansible-doc - collection name for plugin top-level deprecation was not inserted when deprecating by version (https://github.com/ansible/ansible/pull/70344).
- ansible-doc - improve error message in text formatter when ``description`` is missing for a (sub-)option or a return value or its ``contains`` (https://github.com/ansible/ansible/pull/70046).
- ansible-doc - improve man page formatting to avoid problems when YAML anchors are used (https://github.com/ansible/ansible/pull/70045).
- ansible-doc - include the collection name in the text output (https://github.com/ansible/ansible/pull/70401).
- ansible-doc - plugin option deprecations now also get ``collection_name`` added (https://github.com/ansible/ansible/pull/71735).
- ansible-doc - properly show plugin name when ``name:`` is used instead of ``<plugin_type>:`` (https://github.com/ansible/ansible/pull/71966).
- ansible-galaxy - Cache the responses for available collection versions after getting all pages. (https://github.com/ansible/ansible/issues/73071)
- ansible-galaxy - Instead of assuming the first defined server is galaxy, filter based on the servers that support the v1 API, and return the first of those (https://github.com/ansible/ansible/issues/65440)
- ansible-galaxy - Use ``sys.exit`` instead of ``exit`` when reporting an error for the removed login command.
- ansible-galaxy - correct ``collections-path`` command line argument (https://github.com/ansible/ansible/issues/73127)
- ansible-galaxy - fixed galaxy role init command (https://github.com/ansible/ansible/issues/71977).
- ansible-galaxy collection download - fix downloading tar.gz files and collections in git repositories (https://github.com/ansible/ansible/issues/70429)
- ansible-galaxy collection install - fix fallback mechanism if the AH server did not have the collection requested - https://github.com/ansible/ansible/issues/70940
- ansible-galaxy download - fix bug when downloading a collection in a SCM subdirectory
- ansible-pull - Run all playbooks that when multiple are supplied via the command line (https://github.com/ansible/ansible/issues/72708)
- ansible-test - Add ``pytest < 6.0.0`` constraint for managed installations on Python 3.x to avoid issues with relative imports.
- ansible-test - Add a ``six < 1.14.0`` constraint for Python 2.6.
- ansible-test - Always connect additional Docker containers to the network used by the current container (if any).
- ansible-test - Always map ``/var/run/docker.sock`` into test containers created by the ``--docker`` option if the docker host is not ``localhost``.
- ansible-test - Attempt to detect the Docker hostname instead of assuming ``localhost``.
- ansible-test - Avoid using ``/tmp`` to resolve occasional failures starting tests with the ``--docker`` option.
- ansible-test - Change classification using ``--changed`` now consistently handles common configuration files for supported CI providers.
- ansible-test - Change detection now properly resolves relative imports instead of treating them as absolute imports.
- ansible-test - Correctly detect changes in a GitHub pull request when running on Azure Pipelines.
- ansible-test - Correctly detect running in a Docker container on Azure Pipelines.
- ansible-test - Do not try to validate PowerShell modules ``setup.ps1``, ``slurp.ps1``, and ``async_status.ps1``
- ansible-test - Prefer container IP at ``.NetworkSettings.Networks.{NetworkName}.IPAddress`` over ``.NetworkSettings.IPAddress``.
- ansible-test - Running tests using an installed version of ``ansible-test`` against one Python version from another no longer fails due to a missing ``egg-info`` directory. This could occur when testing plugins which import ``pkg_resources``.
- ansible-test - Running tests using an installed version of ``ansible-test`` no longer generates an error attempting to create an ``egg-info`` directory when an existing one is not found in the expected location. This could occur if the existing ``egg-info`` directory included a Python version specifier in the name.
- ansible-test - Skip installing requirements if they are already installed.
- ansible-test - Symbolic links are no longer used to inject ``python`` into the environment, since they do not work reliably in all cases. Instead, the existing Python based exec wrapper is always used.
- ansible-test - Temporarily limit ``cryptography`` to versions before 3.4 to enable tests to function.
- ansible-test - The ``--export`` option for ``ansible-test coverage`` is now limited to the ``combine`` command. It was previously available for reporting commands on which it had no effect.
- ansible-test - The ``--raw`` option for ``ansible-test shell --remote`` now uses ``sh`` for the shell instead of ``bash``, which may not be present.
- ansible-test - The ``--remote`` option has been updated for Python 2.7 to work around breaking changes in the newly released ``get-pip.py`` bootstrapper.
- ansible-test - The ``--remote`` option has been updated to use a versioned ``get-pip.py`` bootstrapper to avoid issues with future releases.
- ansible-test - The ``ansible-doc`` sanity test now works for ``netconf`` plugins.
- ansible-test - The ``ansible-test coverage combine`` option ``--export`` now exports relative paths. This avoids loss of coverage data when aggregating across systems with different absolute paths. Paths will be converted back to absolute when generating reports.
- ansible-test - The ``changelog`` sanity test has been updated to ensure ``rstcheck`` does not load the ``sphinx`` module.
- ansible-test - The ``cs`` and ``openshift`` test plugins now search for containers on the current network instead of assuming the ``bridge`` network.
- ansible-test - The ``resource_prefix`` variable provided to tests running on Azure Pipelines is now converted to lowercase to match other CI providers.
- ansible-test - Unified SSH key management for all instances created with the ``--remote`` or ``--docker`` options.
- ansible-test - Using the ``--remote`` option on Azure Pipelines now works from a job running in a container.
- ansible-test - ``cryptography`` is now limited to versions prior to 3.2 only when an incompatible OpenSSL version (earlier than 1.1.0) is detected
- ansible-test - add constraint for ``cffi`` to prevent failure on systems with older versions of ``gcc`` (https://foss.heptapod.net/pypy/cffi/-/issues/480)
- ansible-test - convert target paths to unicode on Python 2 to avoid ``UnicodeDecodeError`` (https://github.com/ansible/ansible/issues/68398, https://github.com/ansible/ansible/pull/72623).
- ansible-test - ensure the correct unit test target is given when the ``__init__.py`` file is modified inside the connection plugins directory
- ansible-test - ensure unit test paths for connection and inventory plugins are correctly identified for collections (https://github.com/ansible/ansible/issues/73876).
- ansible-test - improve classification of changes to ``.gitignore``, ``COPYING``, ``LICENSE``, ``Makefile``, and all files ending with one of ``.in`, ``.md`, ``.rst``, ``.toml``, ``.txt`` in the collection root directory (https://github.com/ansible/ansible/pull/72353).
- ansible-test - integration and unit test change detection now works for filter, lookup and test plugins
- ansible-test now always uses the ``--python`` option for ``virtualenv`` to select the correct interpreter when creating environments with the ``--venv`` option
- ansible-test sanity changelog test - bump dependency on antsibull-changelog to 0.9.0 so that `fragments that add new plugins or objects <https://github.com/ansible-community/antsibull-changelog/blob/main/docs/changelogs.rst#adding-new-roles-playbooks-test-and-filter-plugins>`_ will not fail validation (https://github.com/ansible/ansible/pull/73428).
- ansible-test units - fixed collection location code to work under pytest >= 6.0.0
- ansible-test validate-modules - ``version_added`` on module level was not validated for modules in collections (https://github.com/ansible/ansible/pull/70869).
- ansible-test validate-modules - return correct error codes ``option-invalid-version-added`` resp. ``return-invalid-version-added`` instead of the wrong error ``deprecation-either-date-or-version`` when an invalid value of ``version_added`` is specified for an option or a return value (https://github.com/ansible/ansible/pull/70869).
- ansible-test validate-modules - when a module uses ``add_file_common_args=True`` and does not use a keyword argument for ``argument_spec`` in ``AnsibleModule()``, the common file arguments were not considered added during validation (https://github.com/ansible/ansible/pull/72334).
- ansible_pkg_mgr fact - now correctly returns ``atomic_container`` when run on "RHEL for Edge" images and Fedora/RHEL/CentOS Atomic Host (https://github.com/ansible/ansible/issues/73084).
- api - time.clock is removed in Python 3.8, add backward compatible code (https://github.com/ansible/ansible/issues/70649).
- apt - add ``fail_on_autoremove`` param to apt module to avoid unintended package removals (https://github.com/ansible/ansible/issues/63231)
- apt - fix policy_rc_d parameter throwing an exception when restoring original file (https://github.com/ansible/ansible/issues/66211)
- apt - include exception message from apt python library in error output
- apt_key - Specifying ``file`` as mutually exclusive with ``data``, ``keyserver``, ``url`` (https://github.com/ansible/ansible/pull/70492).
- apt_repository - fixes ``mode`` doc to remove ineffective default (https://github.com/ansible/ansible/pull/70319).
- argument spec validation - fix behavior of ``apply_defaults=True`` when an empty dictionary is specified for such an option (https://github.com/ansible/ansible/pull/74029).
- assemble - fix decrypt argument in the module (https://github.com/ansible/ansible/issues/65450).
- async - Fix Python 3 interpreter parsing from module by comparing with bytes (https://github.com/ansible/ansible/issues/70690)
- async_wrapper - Fix race condition when ``~/.ansible_async`` folder tries to be created by multiple async tasks at the same time - https://github.com/ansible/ansible/issues/59306
- avoid possible errors accessing os.environ by not assuming existance of variables.
- basic - handle exceptions for default selectors in Python 2.7 (https://github.com/ansible/ansible/issues/71704).
- basic - use PollSelector implementation when DefaultSelector fails (https://github.com/ansible/ansible/issues/70238).
- bcrypt hashing - Ensure we repair the salt, to avoid warnings (https://github.com/ansible/ansible/issues/36129)
- blockinfile - properly insert a block at the end of a file that does not have a trailing newline character (https://github.com/ansible/ansible/issues/72055)
- blockinfile now returns name of backup file when this option is used.
- clarified changed status to reflect existing rule that had never been written down.
- collection loader - fix bogus code coverage entries for synthetic packages
- collection metadata - ensure collection loader uses libyaml/CSafeLoader to parse collection metadata if available
- connection/ssh, ensure parameters come from correct source get_option, so functionality matches docs.
- connection/ssh, fix reset to use same parameters to check if socket exists as actually used, was hardcoded to default string construction previouslly.
- cron - cron file should not be empty after adding var (https://github.com/ansible/ansible/pull/71207)
- cron - encode and decode crontab files in UTF-8 explicitly to allow non-ascii chars in cron filepath and job (https://github.com/ansible/ansible/issues/69492)
- debug action, prevent setting facts when displaying ansible_facts.
- default callback - Ensure that the ``host_pinned`` strategy is not treated as lockstep (https://github.com/ansible/ansible/issues/73364)
- delegate_to - Ensure that calculating ``delegate_to`` vars with a loop uses the correct context to correctly evaluate the loop (https://github.com/ansible/ansible/issues/37132)
- display correct error information when an error exists in the last line of the file (https://github.com/ansible/ansible/issues/16456)
- distribution - add support for Pardus Linux distribution (https://github.com/ansible/ansible/issues/71636).
- distribution facts - Allow ``distribution_major_version`` and ``distribution_version`` to work for RC and PRERELEASE versions of FreeBSD (and derived distributions) (https://github.com/ansible/ansible/issues/72331).
- dnf - fix filtering to avoid dependncy conflicts (https://github.com/ansible/ansible/issues/72316)
- dnf - it is now possible to specify both ``security: true`` and ``bugfix: true`` to install updates of both types. Previously, only security would get installed if both were true. (https://github.com/ansible/ansible/issues/70854)
- ensure 'local' connection always has the correct default user for actions to consume.
- ensure delegated vars can resolve hostvars object and access vars from hostvars[inventory_hostname].
- ensure find_mount_point consistently returns text.
- ensure we don't clobber role vars data when getting an empty file
- expect - Operate pexpect with bytes to avoid potential encoding issues (https://github.com/ansible/ansible/issues/29351)
- facts - account for Slackware OS with ``+`` in the name (https://github.com/ansible/ansible/issues/38760)
- facts - fix distribution fact for SLES4SAP (https://github.com/ansible/ansible/pull/71559).
- facts - fix incorrect UTC timestamp in ``iso8601_micro`` and ``iso8601``
- facts - properly report virtualization facts for Linux guests running on bhyve (https://github.com/ansible/ansible/issues/73167)
- file - prevent link src from being rewritten when src is not specified explicitly (https://github.com/ansible/ansible/issues/65448)
- file - the module should warn in check_mode when path an owner/group don't exist (https://github.com/ansible/ansible/issues/67307).
- find module - Don't treat empty excludes as a match (https://github.com/ansible/ansible/issues/70640)
- find module - Stop traversing directories past the requested depth. (https://github.com/ansible/ansible/issues/73627)
- find module, fix default pattern when use_regex is true.
- fix issue with inventory_hostname and delegated host vars mixing on connection settings.
- fortimanager httpapi plugin - fix redirect to point to the ``fortinet.fortimanager`` collection (https://github.com/ansible/ansible/pull/71073).
- galaxy - handle plus sign in user token appearing in role url (https://github.com/ansible/ansible/issues/45475).
- get_sysctl now handles multiline values and does not die silently anymore.
- get_url - skip checksum during ``--check`` (https://github.com/ansible/ansible/issues/61369).
- git - Only pass ``--raw`` flag to git verify commands (verify-tag, verify-commit) when ``gpg_whitelist`` is in use. Otherwise don't pass it so that non-whitelist GPG validation still works on older Git versions. (https://github.com/ansible/ansible/issues/64469)
- gluster modules - fix redirect to point to the ``gluster.gluster`` collection (https://github.com/ansible/ansible/pull/71240).
- hostname - Fixed an issue where the hostname on the alinux could not be set.
- hostname - add Almalinux support (https://github.com/ansible/ansible/pull/73619)
- hostname - add macOS support (https://github.com/ansible/ansible/pull/54439)
- if the ``type`` for a module parameter in the argument spec is callable, do not pass ``kwargs`` to avoid errors (https://github.com/ansible/ansible/issues/70017)
- import_playbook - change warning about extra parameters to deprecation (https://github.com/ansible/ansible/issues/72745)
- improve deprecation message when using bare variable (https://github.com/ansible/ansible/pull/70687)
- inventory - pass the vars dictionary to combine_vars instead of an individual key's value (https://github.com/ansible/ansible/issues/72975).
- inventory plugins - Let plugins define the sanitization method for the constructed ``groups`` feature.
- inventory_hostnames - Use ``InventoryManager`` instead of trying to replicate its behavior (https://github.com/ansible/ansible/issues/17268)
- is_string/vault - Ensure the is_string helper properly identifies AnsibleVaultEncryptedUnicode as a string (https://github.com/ansible/ansible/pull/71609)
- j2 plugin loader clarified comments, made note with better fqcn detection.
- lineinfile - fix not subscriptable error in exception handling around file creation
- linux network facts - get the correct value for broadcast address (https://github.com/ansible/ansible/issues/64384)
- native jinja2 types - properly handle Undefined in nested data.
- notify keyword is not ignored anymore on import_tasks, also able to apply to blocks now.
- package - use list of built in package managers from facts rather than creating a new list
- paramiko connection plugin - Ensure we only reset the connection when one has been previously established (https://github.com/ansible/ansible/issues/65812)
- password hashing - Ensure we validate salts against allowed characters and length when using ``crypt`` (https://github.com/ansible/ansible/issues/71107)
- password lookup - Try to automatically generate salts using known salt sizes (https://github.com/ansible/ansible/issues/53750)
- pause - Fix indefinite hang when using a pause task on a background process (https://github.com/ansible/ansible/issues/32142)
- pause - catch additional error on setting up curses (https://github.com/ansible/ansible/pull/73588).
- pause - do not accept enter to continue when a timeout is set (https://github.com/ansible/ansible/issues/73948)
- pause - do not warn when running in the background if a timeout is provided (https://github.com/ansible/ansible/issues/73042)
- pause - handle exception when there is no stdout (https://github.com/ansible/ansible/pull/47851)
- powershell - fix escaping of strings that broken modules like fetch when dealing with special chars - https://github.com/ansible/ansible/issues/62781
- powershell - fix the CLIXML parser when it contains nested CLIXML objects - https://github.com/ansible/ansible/issues/69550
- powershell - remove getting the PowerShell version from the env var ``POWERSHELL_VERSION``. This feature never worked properly and can cause conflicts with other libraries that use this var
- psrp - Fix hang when copying an empty file to the remote target
- psrp - Use native PSRP mechanism when copying files to support custom endpoints
- quote filter - normalize how ``None`` is handled, to match Python3 behavior (https://github.com/ansible/ansible/issues/32174)
- reboot - Add support for the runit init system, used on Void Linux, that does not support the normal Linux syntax.
- remove contradictory recomendation from template docs. https://github.com/ansible/ansible/issues/63484
- remove redundant remote_user setting in play_context for local as plugin already does it, also removes fork/thread issue from use of pwd library.
- reset logging level to INFO due to CVE-2019-14846.
- restrict module valid JSON parsed output to objects as lists are not valid responses.
- runas - create a new token when running as ``SYSTEM`` to ensure it has the full privileges assigned to that account
- service - Fix for the BSD rcconf code using a Python 2 specific string replace function
- set_mode_if_different - handle symlink if it is inside a directory with sticky bit set (https://github.com/ansible/ansible/pull/45198)
- setup module, fix error handling on bad subset given
- setup, don't give up on all local facts gathering if one script file fails.
- several fixes to make apt_key better at identifying needs for change and also to avoid changes in check_mode.
- shell - fix quoting of mkdir command in creation of remote_tmp in order to allow spaces and other special characters (https://github.com/ansible/ansible/issues/69577).
- splunk httpapi plugin - switch from splunk.enterprise_security to splunk.es in runtime.yml to reflect upstream change of Collection Name
- ssh connection plugin - use ``get_option()`` rather than ``_play_context`` to ensure ``ANSBILE_SSH_ARGS`` are applied properly (https://github.com/ansible/ansible/issues/70437)
- stat - handle colons in filename while parsing the mimetype output (https://github.com/ansible/ansible/issues/70256).
- strftime filter - Input epoch is allowed to be a float (https://github.com/ansible/ansible/issues/71257)
- su become plugin, ensure correct type for localization option.
- systemd - account for templated unit files using ``@`` when searching for the unit file (https://github.com/ansible/ansible/pull/72347#issuecomment-730626228)
- systemd - fixed chroot usage on new versions of systemd, that broke because of upstream changes in systemctl output
- systemd - follow up fix to https://github.com/ansible/ansible/issues/72338 to use ``list-unit-files`` rather than ``list-units`` in order to show all units files on the system.
- systemd - made the systemd module work correctly when the SYSTEMD_OFFLINE environment variable is set
- systemd - preserve the full unit name when using a templated service and ``systemd`` failed to parse dbus due to a known bug in ``systemd`` (https://github.com/ansible/ansible/pull/72985)
- systemd - work around bug with ``systemd`` 245 and 5.8 kernel that does not correctly report service state (https://github.com/ansible/ansible/issues/71528)
- task parsing - strip spaces from action name when using ``action: foo bar=baz`` form. (https://github.com/ansible/ansible/issues/62136)
- templating - fix error message for ``x in y`` when y is undefined (https://github.com/ansible/ansible/issues/70984)
- the unvault lookup plugin returned a byte string. Now returns a real string.
- to_text(stdout) before json.loads in psrp.Connection.put_file in case stdout is bytes
- unarchive - ``zip`` unarchive no longer errors on RHEL/CentOS 6 and old Fedora when attempting to use a numeric gid (https://github.com/ansible/ansible/issues/71903).
- unarchive - check ``fut_gid`` against ``run_gid`` in addition to supplemental groups (https://github.com/ansible/ansible/issues/49284)
- undeprecate hash_merge setting and add more docs clarifying its use and why not to use it.
- uri - ``status_code`` elements are type ``int``
- url lookup - make sure that options supplied in ansible.cfg are actually used (https://github.com/ansible/ansible/pull/71736).
- url lookup - set default user agent to ``ansible-httpget`` (https://github.com/ansible/ansible/pull/72324)
- urls - Close filedescriptor of certificate chain tempfile to prevent stale filedescriptor leakage (https://github.com/ansible/ansible/pull/71825).
- user - AnsibleModule.run_command returns a tuple of return code, stdout and stderr. The module main function of the user module expects user.create_user to return a tuple of return code, stdout and stderr. Fix the locations where stdout and stderr got reversed.
- user - Local users with an expiry date cannot be created as the ``luseradd`` / ``lusermod`` commands do not support the ``-e`` option. Set the expiry time in this case via ``lchage`` after the user was created / modified. (https://github.com/ansible/ansible/issues/71942)
- user - do the right thing when ``password_lock=True`` and ``password`` are used together (https://github.com/ansible/ansible/issues/72992)
- user - don't create home directory and missing parents when create_home == false (https://github.com/ansible/ansible/pull/70600).
- validate-modules - do not raise an ``AttributeError`` if a value is assigned to a module attribute in a try/except block.
- vault - Support reading raw binary data from stdin under python3
- virtual facts - kubevirt is now identified as "KubeVirt" and with a "guest" role instead of "kvm" and "host" role (https://github.com/ansible/ansible/issues/72001).
- wait_for - catch and ignore errors when getting active connections with psutil (https://github.com/ansible/ansible/issues/72322)
- wait_for module, move missing socket into function to get proper comparrison in time.
- win setup - Fix redirection path for the windows setup module
- windows async - use full path when calling PowerShell to reduce reliance on environment vars being correct - https://github.com/ansible/ansible/issues/70655
- winrm - preserve winrm forensic data on put_file failures
- yamllint - do not raise an ``AttributeError`` if a value is assigned to a module attribute at the top of the module.
Known Issues
------------
- ansible-test - The ``pylint`` sanity test no longer correctly detects "bad" variable names for non-constants. See https://github.com/PyCQA/pylint/issues/3701 for additional details.
New Modules
-----------
- validate_argument_spec - Validate role argument specs.

View File

@ -0,0 +1,388 @@
=================================================
ansible-core 2.14 "C'mon Everybody" Release Notes
=================================================
.. contents:: Topics
v2.14.0
=======
Release Summary
---------------
| Release Date: 2022-11-07
| `Porting Guide <https://docs.ansible.com/ansible/devel/porting_guides.html>`__
Major Changes
-------------
- Move handler processing into new ``PlayIterator`` phase to use the configured strategy (https://github.com/ansible/ansible/issues/65067)
- ansible - At startup the filesystem encoding and locale are checked to verify they are UTF-8. If not, the process exits with an error reporting the errant encoding.
- ansible - Increase minimum Python requirement to Python 3.9 for CLI utilities and controller code
- ansible-test - At startup the filesystem encoding is checked to verify it is UTF-8. If not, the process exits with an error reporting the errant encoding.
- ansible-test - At startup the locale is configured as ``en_US.UTF-8``, with a fallback to ``C.UTF-8``. If neither encoding is available the process exits with an error. If the fallback is used, a warning is displayed. In previous versions the ``en_US.UTF-8`` locale was always requested. However, no startup checking was performed to verify the locale was successfully configured.
Minor Changes
-------------
- Add a new "INVENTORY_UNPARSED_WARNING" flag add to hide the "No inventory was parsed, only implicit localhost is available" warning
- Add an 'action_plugin' field for modules in runtime.yml plugin_routing.
This fixes module_defaults by supporting modules-as-redirected-actions
without redirecting module_defaults entries to the common action.
.. code: yaml
plugin_routing:
action:
facts:
redirect: ns.coll.eos
command:
redirect: ns.coll.eos
modules:
facts:
redirect: ns.coll.eos_facts
command:
redirect: ns.coll.eos_command
With the runtime.yml above for ns.coll, a task such as
.. code: yaml
- hosts: all
module_defaults:
ns.coll.eos_facts: {'valid_for_eos_facts': 'value'}
ns.coll.eos_command: {'not_valid_for_eos_facts': 'value'}
tasks:
- ns.coll.facts:
will end up with defaults for eos_facts and eos_command
since both modules redirect to the same action.
To select an action plugin for a module without merging
module_defaults, define an action_plugin field for the resolved
module in the runtime.yml.
.. code: yaml
plugin_routing:
modules:
facts:
redirect: ns.coll.eos_facts
action_plugin: ns.coll.eos
command:
redirect: ns.coll.eos_command
action_plugin: ns.coll.eos
The action_plugin field can be a redirected action plugin, as
it is resolved normally.
Using the modified runtime.yml, the example task will only use
the ns.coll.eos_facts defaults.
- Add support for parsing ``-a`` module options as JSON and not just key=value arguments - https://github.com/ansible/ansible/issues/78112
- Added Kylin Linux Advanced Server OS in RedHat OS Family.
- Allow ``when`` conditionals to be used on ``flush_handlers`` (https://github.com/ansible/ansible/issues/77616)
- Allow meta tasks to be used as handlers.
- Display - The display class will now proxy calls to Display.display via the queue from forks/workers to be handled by the parent process for actual display. This reduces some reliance on the fork start method and improves reliability of displaying messages.
- Jinja version test - Add pep440 version_type for version test. (https://github.com/ansible/ansible/issues/78288)
- Loops - Add new ``loop_control.extended_allitems`` to allow users to disable tracking all loop items for each loop (https://github.com/ansible/ansible/issues/75216)
- NetBSD - Add uptime_seconds fact
- Provide a `utc` option for strftime to show time in UTC rather than local time
- Raise a proper error when ``include_role`` or ``import_role`` is used as a handler.
- Remove the ``AnsibleContext.resolve`` method as its override is not necessary. Furthermore the ability to override the ``resolve`` method was deprecated in Jinja 3.0.0 and removed in Jinja 3.1.0.
- Utilize @classmethod and @property together to form classproperty (Python 3.9) to access field attributes of a class
- ``LoopControl`` is now templated through standard ``post_validate`` method (https://github.com/ansible/ansible/pull/75715)
- ``ansible-galaxy collection install`` - add an ``--offline`` option to prevent querying distribution servers (https://github.com/ansible/ansible/issues/77443).
- ansible - Add support for Python 3.11 to Python interpreter discovery.
- ansible - At startup the stdin/stdout/stderr file handles are checked to verify they are using blocking IO. If not, the process exits with an error reporting which file handle(s) are using non-blocking IO.
- ansible-config adds JSON and YAML output formats for list and dump actions.
- ansible-connection now supports verbosity directly on cli
- ansible-console added 'collections' command to match playbook keyword.
- ansible-doc - remove some of the manual formatting, and use YAML more uniformly. This in particular means that ``true`` and ``false`` are used for boolean values, instead of ``True`` and ``False`` (https://github.com/ansible/ansible/pull/78668).
- ansible-galaxy - Support resolvelib versions 0.6.x, 0.7.x, and 0.8.x. The full range of supported versions is now >= 0.5.3, < 0.9.0.
- ansible-galaxy now supports a user defined timeout, instead of existing hardcoded 60s (now the default).
- ansible-test - Add FreeBSD 13.1 remote support.
- ansible-test - Add RHEL 9.0 remote support.
- ansible-test - Add support for Python 3.11.
- ansible-test - Add support for RHEL 8.6 remotes.
- ansible-test - Add support for Ubuntu VMs using the ``--remote`` option.
- ansible-test - Add support for exporting inventory with ``ansible-test shell --export {path}``.
- ansible-test - Add support for multi-arch remotes.
- ansible-test - Add support for provisioning Alpine 3.16 remote instances.
- ansible-test - Add support for provisioning Fedora 36 remote instances.
- ansible-test - Add support for provisioning Ubuntu 20.04 remote instances.
- ansible-test - Add support for provisioning remotes which require ``doas`` for become.
- ansible-test - Add support for running non-interactive commands with ``ansible-test shell``.
- ansible-test - Alpine remotes now use ``sudo`` for tests, using ``doas`` only for bootstrapping.
- ansible-test - An improved error message is shown when the download of a pip bootstrap script fails. The download now uses ``urllib2`` instead of ``urllib`` on Python 2.
- ansible-test - Avoid using the ``mock_use_standalone_module`` setting for unit tests running on Python 3.8 or later.
- ansible-test - Become support for remote instance provisioning is no longer tied to a fixed list of platforms.
- ansible-test - Blocking mode is now enforced for stdin, stdout and stderr. If any of these are non-blocking then ansible-test will exit during startup with an error.
- ansible-test - Distribution specific test containers are now multi-arch, supporting both x86_64 and aarch64.
- ansible-test - Distribution specific test containers no longer contain a ``/etc/ansible/hosts`` file.
- ansible-test - Enable loading of ``coverage`` data files created by older supported ansible-test releases.
- ansible-test - Fedora 36 has been added as a test container.
- ansible-test - FreeBSD remotes now use ``sudo`` for tests, using ``su`` only for bootstrapping.
- ansible-test - Improve consistency of output messages by using stdout or stderr for most output, but not both.
- ansible-test - Improve consistency of version specific documentation links.
- ansible-test - Remote Alpine instances now have the ``acl`` package installed.
- ansible-test - Remote Fedora instances now have the ``acl`` package installed.
- ansible-test - Remote FreeBSD instances now have ACLs enabled on the root filesystem.
- ansible-test - Remote Ubuntu instances now have the ``acl`` package installed.
- ansible-test - Remove Fedora 34 test container.
- ansible-test - Remove Fedora 35 test container.
- ansible-test - Remove FreeBSD 13.0 remote support.
- ansible-test - Remove RHEL 8.5 remote support.
- ansible-test - Remove Ubuntu 18.04 test container.
- ansible-test - Remove support for Python 2.7 on provisioned FreeBSD instances.
- ansible-test - Remove support for Python 3.8 on the controller.
- ansible-test - Remove the ``opensuse15py2`` container.
- ansible-test - Support multiple pinned versions of the ``coverage`` module. The version used now depends on the Python version in use.
- ansible-test - Test containers have been updated to remove the ``VOLUME`` instruction.
- ansible-test - The Alpine 3 test container has been updated to Alpine 3.16.0.
- ansible-test - The ``http-test-container`` container is now multi-arch, supporting both x86_64 and aarch64.
- ansible-test - The ``pypi-test-container`` container is now multi-arch, supporting both x86_64 and aarch64.
- ansible-test - The ``shell`` command can be used outside a collection if no controller delegation is required.
- ansible-test - The openSUSE test container has been updated to openSUSE Leap 15.4.
- ansible-test - Ubuntu 22.04 has been added as a test container.
- ansible-test - Update ``base`` and ``default`` containers to include Python 3.11.0.
- ansible-test - Update ``default`` containers to include new ``docs-build`` sanity test requirements.
- ansible-test - Update pinned sanity test requirements for all tests.
- ansible-test - Update the ``base`` container to 3.4.0.
- ansible-test - Update the ``default`` containers to 6.6.0.
- ansible-test validate-modules - Added support for validating module documentation stored in a sidecar file alongside the module (``{module}.yml`` or ``{module}.yaml``). Previously these files were ignored and documentation had to be placed in ``{module}.py``.
- apt_repository remove dependency on apt-key and use gpg + /usr/share/keyrings directly instead
- apt_repository will use the trust repo directories in order of preference (more appropriate to less) as they exist on the target.
- blockinfile - The presence of the multiline flag (?m) in the regular expression for insertafter opr insertbefore controls whether the match is done line by line or with multiple lines (https://github.com/ansible/ansible/pull/75090).
- calls to listify_lookup_plugin_terms in core do not pass in loader/dataloader anymore.
- collections - ``ansible-galaxy collection build`` can now utilize ``MANIFEST.in`` style directives from ``galaxy.yml`` instead of ``build_ignore`` effectively inverting the logic from include by default, to exclude by default. (https://github.com/ansible/ansible/pull/78422)
- config manager, move templating into main query function in config instead of constants
- config manager, remove updates to configdata as it is mostly unused
- configuration entry INTERPRETER_PYTHON_DISTRO_MAP is now 'private' and won't show up in normal configuration queries and docs, since it is not 'settable' this avoids user confusion.
- distribution - add distribution_minor_version for Debian Distro (https://github.com/ansible/ansible/issues/74481).
- documentation construction now gives more information on error.
- facts - add OSMC to Debian os_family mapping
- get_url - permit to pass to parameter ``checksum`` an URL pointing to a file containing only a checksum (https://github.com/ansible/ansible/issues/54390).
- new tests url, uri and urn will verify string as such, but they don't check existance of the resource
- plugin loader - add ansible_name and ansible_aliases attributes to plugin objects/classes.
- systemd is now systemd_service to better reflect the scope of the module, systemd is kept as an alias for backwards compatibility.
- templating - removed internal template cache
- uri - cleanup write_file method, remove overkill safety checks and report any exception, change shutilcopyfile to use module.atomic_move
- urls - Add support to specify SSL/TLS ciphers to use during a request (https://github.com/ansible/ansible/issues/78633)
- validate-modules - Allow ``type: raw`` on a module return type definition for values that have a dynamic type
- version output now includes the path to the python executable that Ansible is running under
- yum_repository - do not give the ``async`` parameter a default value anymore, since this option is deprecated in RHEL 8. This means that ``async = 1`` won't be added to repository files if omitted, but it can still be set explicitly if needed.
Breaking Changes / Porting Guide
--------------------------------
- Allow for lazy evaluation of Jinja2 expressions (https://github.com/ansible/ansible/issues/56017)
- The default ansible-galaxy role skeletons no longer contain .travis.yml files. You can configure ansible-galaxy to use a custom role skeleton that contains a .travis.yml file to continue using Galaxy's integration with Travis CI.
- ansible - At startup the filesystem encoding and locale are checked to verify they are UTF-8. If not, the process exits with an error reporting the errant encoding.
- ansible - Increase minimum Python requirement to Python 3.9 for CLI utilities and controller code
- ansible-test - At startup the filesystem encoding is checked to verify it is UTF-8. If not, the process exits with an error reporting the errant encoding.
- ansible-test - At startup the locale is configured as ``en_US.UTF-8``, with a fallback to ``C.UTF-8``. If neither encoding is available the process exits with an error. If the fallback is used, a warning is displayed. In previous versions the ``en_US.UTF-8`` locale was always requested. However, no startup checking was performed to verify the locale was successfully configured.
- ansible-test validate-modules - Removed the ``missing-python-doc`` error code in validate modules, ``missing-documentation`` is used instead for missing PowerShell module documentation.
- strategy plugins - Make ``ignore_unreachable`` to increase ``ignored`` and ``ok`` and counter, not ``skipped`` and ``unreachable``. (https://github.com/ansible/ansible/issues/77690)
Deprecated Features
-------------------
- Deprecate ability of lookup plugins to return arbitrary data. Lookup plugins must return lists, failing to do so will be an error in 2.18. (https://github.com/ansible/ansible/issues/77788)
- Encryption - Deprecate use of the Python crypt module due to it's impending removal from Python 3.13
- PlayContext.verbosity is deprecated and will be removed in 2.18. Use ansible.utils.display.Display().verbosity as the single source of truth.
- ``DEFAULT_FACT_PATH``, ``DEFAULT_GATHER_SUBSET`` and ``DEFAULT_GATHER_TIMEOUT`` are deprecated and will be removed in 2.18. Use ``module_defaults`` keyword instead.
- ``PlayIterator`` - deprecate ``cache_block_tasks`` and ``get_original_task`` which are noop and unused.
- ``Templar`` - deprecate ``shared_loader_obj`` option which is unused. ``ansible.plugins.loader`` is used directly instead.
- listify_lookup_plugin_terms, deprecate 'loader/dataloader' parameter as it not used.
- vars plugins - determining whether or not to run ansible.legacy vars plugins with the class attribute REQUIRES_WHITELIST is deprecated, set REQUIRES_ENABLED instead.
Removed Features (previously deprecated)
----------------------------------------
- PlayIterator - remove deprecated ``PlayIterator.ITERATING_*`` and ``PlayIterator.FAILED_*``
- Remove deprecated ``ALLOW_WORLD_READABLE_TMPFILES`` configuration option (https://github.com/ansible/ansible/issues/77393)
- Remove deprecated ``COMMAND_WARNINGS`` configuration option (https://github.com/ansible/ansible/issues/77394)
- Remove deprecated ``DISPLAY_SKIPPED_HOSTS`` environment variable (https://github.com/ansible/ansible/issues/77396)
- Remove deprecated ``LIBVIRT_LXC_NOSECLABEL`` environment variable (https://github.com/ansible/ansible/issues/77395)
- Remove deprecated ``NETWORK_GROUP_MODULES`` environment variable (https://github.com/ansible/ansible/issues/77397)
- Remove deprecated ``UnsafeProxy``
- Remove deprecated ``plugin_filters_cfg`` config option from ``default`` section (https://github.com/ansible/ansible/issues/77398)
- Remove deprecated functionality that allows loading cache plugins directly without using ``cache_loader``.
- Remove deprecated functionality that allows subclassing ``DefaultCallback`` without the corresponding ``doc_fragment``.
- Remove deprecated powershell functions ``Load-CommandUtils`` and ``Import-PrivilegeUtil``
- apt_key - remove deprecated ``key`` module param
- command/shell - remove deprecated ``warn`` module param
- get_url - remove deprecated ``sha256sum`` module param
- import_playbook - remove deprecated functionality that allows providing additional parameters in free form
Bugfixes
--------
- "meta: refresh_inventory" does not clobber entries added by add_host/group_by anymore.
- Add PyYAML >= 5.1 as a dependency of ansible-core to be compatible with Python 3.8+.
- Avoid 'unreachable' error when chmod on AIX has 255 as return code.
- BSD network facts - Do not assume column indexes, look for ``netmask`` and ``broadcast`` for determining the correct columns when parsing ``inet`` line (https://github.com/ansible/ansible/issues/79117)
- Bug fix for when handlers were ran on failed hosts after an ``always`` section was executed (https://github.com/ansible/ansible/issues/52561)
- Do not allow handlers from dynamic includes to be notified (https://github.com/ansible/ansible/pull/78399)
- Do not crash when templating an expression with a test or filter that is not a valid Ansible filter name (https://github.com/ansible/ansible/issues/78912, https://github.com/ansible/ansible/pull/78913).
- Ensure handlers observe ``any_errors_fatal`` (https://github.com/ansible/ansible/issues/46447)
- Ensure syntax check errors include playbook filenames
- Ensure the correct ``environment_class`` is set on ``AnsibleJ2Template``
- Error for collection redirects that do not use fully qualified collection names, as the redirect would be determined by the ``collections`` keyword.
- Fix PluginLoader to mimic Python import machinery by adding module to sys.modules before exec
- Fix ``-vv`` output for meta tasks to not have an empty message when skipped, print the skip reason instead. (https://github.com/ansible/ansible/issues/77315)
- Fix an issue where ``ansible_play_hosts`` and ``ansible_play_batch`` were not properly updated when a failure occured in an explicit block inside the rescue section (https://github.com/ansible/ansible/issues/78612)
- Fix dnf module documentation to indicate that comparison operators for package version require spaces around them (https://github.com/ansible/ansible/issues/78295)
- Fix for linear strategy when tasks were executed in incorrect order or even removed from execution. (https://github.com/ansible/ansible/issues/64611, https://github.com/ansible/ansible/issues/64999, https://github.com/ansible/ansible/issues/72725, https://github.com/ansible/ansible/issues/72781)
- Fix for network_cli not getting all relevant connection options
- Fix handlers execution with ``serial`` in the ``linear`` strategy (https://github.com/ansible/ansible/issues/54991)
- Fix potential, but unlikely, cases of variable use before definition.
- Fix reusing a connection in a task loop that uses a redirected or aliased name - https://github.com/ansible/ansible/issues/78425
- Fix setting become activation in a task loop - https://github.com/ansible/ansible/issues/78425
- Fix traceback when installing a collection from a git repository and git is not installed (https://github.com/ansible/ansible/issues/77479).
- GALAXY_IGNORE_CERTS reworked to allow each server entry to override
- More gracefully handle separator errors in jinja2 template overrides (https://github.com/ansible/ansible/pull/77495).
- Move undefined check from concat to finalize (https://github.com/ansible/ansible/issues/78156)
- Prevent losing unsafe on results returned from lookups (https://github.com/ansible/ansible/issues/77535)
- Propagate ``ansible_failed_task`` and ``ansible_failed_result`` to an outer rescue (https://github.com/ansible/ansible/issues/43191)
- Properly execute rescue section when an include task fails in all loop iterations (https://github.com/ansible/ansible/issues/23161)
- Properly send a skipped message when a list in a ``loop`` is empty and comes from a template (https://github.com/ansible/ansible/issues/77934)
- Support colons in jinja2 template override values (https://github.com/ansible/ansible/pull/77495).
- ``ansible-galaxy`` - remove extra server api call during dependency resolution for requirements and dependencies that are already satisfied (https://github.com/ansible/ansible/issues/77443).
- `ansible-config init -f vars` will now use shorthand format
- action plugins now pass cannonical info to modules instead of 'temporary' info from play_context
- ansible - Exclude Python 2.6 from Python interpreter discovery.
- ansible-config dump - Only display plugin type headers when plugin options are changed if --only-changed is specified.
- ansible-config limit shorthand format to assigned values
- ansible-configi init should now skip internal reserved config entries
- ansible-connection - decrypt vaulted parameters before sending over the socket, as vault secrets are not available on the other side.
- ansible-console - Renamed the first argument of ``ConsoleCLI.default`` from ``arg`` to ``line`` to match the first argument of the same method on the base class ``Cmd``.
- ansible-console commands now all have a help entry.
- ansible-console fixed to load modules via fqcn, short names and handle redirects.
- ansible-console now shows installed collection modules.
- ansible-doc - fix listing plugins.
- ansible-doc will not add 'website for' in ":ref:" substitutions as it made them confusing.
- ansible-doc will not again warn and skip when missing docs, always show the doc file (for edit on github) and match legacy plugins.
- ansible-doc will not traceback when legacy plugins don't have docs nor adjacent file with docs
- ansible-doc will now also display until as an 'implicit' templating keyword.
- ansible-doc will now not display version_added_collection under same conditions it does not display version_added.
- ansible-galaxy - Fix detection of ``--role-file`` in arguments for implicit role invocation (https://github.com/ansible/ansible/issues/78204)
- ansible-galaxy - Fix exit codes for role search and delete (https://github.com/ansible/ansible/issues/78516)
- ansible-galaxy - Fix loading boolean server options so False doesn't become a truthy string (https://github.com/ansible/ansible/issues/77416).
- ansible-galaxy - Fix reinitializing the whole collection directory with ``ansible-galaxy collection init ns.coll --force``. Now directories and files that are not included in the collection skeleton will be removed.
- ansible-galaxy - Fix unhandled traceback if a role's dependencies in meta/main.yml or meta/requirements.yml are not lists.
- ansible-galaxy - do not require mandatory keys in the ``galaxy.yml`` of source collections when listing them (https://github.com/ansible/ansible/issues/70180).
- ansible-galaxy - fix installing collections that have dependencies in the metadata set to null instead of an empty dictionary (https://github.com/ansible/ansible/issues/77560).
- ansible-galaxy - fix listing collections that contains metadata but the namespace or name are not strings.
- ansible-galaxy - fix missing meta/runtime.yml in default galaxy skeleton used for ansible-galaxy collection init
- ansible-galaxy - fix setting the cache for paginated responses from Galaxy NG/AH (https://github.com/ansible/ansible/issues/77911).
- ansible-galaxy - handle unsupported versions of resolvelib gracefully.
- ansible-galaxy --ignore-certs now has proper precedence over configuration
- ansible-test - Add ``wheel < 0.38.0`` constraint for Python 3.6 and earlier.
- ansible-test - Allow disabled, unsupported, unstable and destructive integration test targets to be selected using their respective prefixes.
- ansible-test - Allow unstable tests to run when targeted changes are made and the ``--allow-unstable-changed`` option is specified (resolves https://github.com/ansible/ansible/issues/74213).
- ansible-test - Always remove containers after failing to create/run them. This avoids leaving behind created containers when using podman.
- ansible-test - Correctly detect when running as the ``root`` user (UID 0) on the origin host. The result of the detection was incorrectly being inverted.
- ansible-test - Delegation for commands which generate output for programmatic consumption no longer redirect all output to stdout. The affected commands and options are ``shell``, ``sanity --lint``, ``sanity --list-tests``, ``integration --list-targets``, ``coverage analyze``
- ansible-test - Delegation now properly handles arguments given after ``--`` on the command line.
- ansible-test - Don't fail if network cannot be disconnected (https://github.com/ansible/ansible/pull/77472)
- ansible-test - Fix bootstrapping of Python 3.9 on Ubuntu 20.04 remotes.
- ansible-test - Fix broken documentation link for ``aws`` test plugin error messages.
- ansible-test - Fix change detection for ansible-test's own integration tests.
- ansible-test - Fix internal validation of remote completion configuration.
- ansible-test - Fix skipping of tests marked ``needs/python`` on the origin host.
- ansible-test - Fix skipping of tests marked ``needs/root`` on the origin host.
- ansible-test - Prevent ``--target-`` prefixed options for the ``shell`` command from being combined with legacy environment options.
- ansible-test - Sanity test output with the ``--lint`` option is no longer mixed in with bootstrapping output.
- ansible-test - Subprocesses are now isolated from the stdin, stdout and stderr of ansible-test. This avoids issues with subprocesses tampering with the file descriptors, such as SSH making them non-blocking. As a result of this change, subprocess output from unit and integration tests on stderr now go to stdout.
- ansible-test - Subprocesses no longer have access to the TTY ansible-test is connected to, if any. This maintains consistent behavior between local testing and CI systems, which typically do not provide a TTY. Tests which require a TTY should use pexpect or another mechanism to create a PTY.
- ansible-test - Temporary executables are now verified as executable after creation. Without this check, path injected scripts may not be found, typically on systems with ``/tmp`` mounted using the "noexec" option. This can manifest as a missing Python interpreter, or use of the wrong Python interpreter, as well as other error conditions.
- ansible-test - Test configuration for collections is now parsed only once, prior to delegation. Fixes issue: https://github.com/ansible/ansible/issues/78334
- ansible-test - Test containers are now run with the ``--tmpfs`` option for ``/tmp``, ``/run`` and ``/run/lock``. This allows use of containers built without the ``VOLUME`` instruction. Additionally, containers with those volumes defined no longer create anonymous volumes for them. This avoids leaving behind volumes on the container host after the container is stopped and deleted.
- ansible-test - The ``shell`` command no longer redirects all output to stdout when running a provided command. Any command output written to stderr will be mixed with the stderr output from ansible-test.
- ansible-test - The ``shell`` command no longer requests a TTY when using delegation unless an interactive shell is being used. An interactive shell is the default behavior when no command is given to pass to the shell.
- ansible-test - Update the ``pylint`` sanity test requirements to resolve crashes on Python 3.11. (https://github.com/ansible/ansible/issues/78882)
- ansible-test - Update the ``pylint`` sanity test to use version 2.15.4.
- ansible-test - Update the ``pylint`` sanity test to use version 2.15.5.
- ansible-test - ansible-doc sanity test - Correctly determine the fully-qualified collection name for plugins in subdirectories, resolving https://github.com/ansible/ansible/issues/78490.
- ansible-test - validate-modules - Documentation-only modules, used for documenting actions, are now allowed to have docstrings (https://github.com/ansible/ansible/issues/77972).
- ansible-test compile sanity test - do not crash if a column could not be determined for an error (https://github.com/ansible/ansible/pull/77465).
- apt - Fix module failure when a package is not installed and only_upgrade=True. Skip that package and check the remaining requested packages for upgrades. (https://github.com/ansible/ansible/issues/78762)
- apt - don't actually update the cache in check mode with update_cache=true.
- apt - don't mark existing packages as manually installed in check mode (https://github.com/ansible/ansible/issues/66413).
- apt - fix package selection to include /etc/apt/preferences(.d) (https://github.com/ansible/ansible/issues/77969)
- apt module now correctly handles virtual packages.
- apt module should not traceback on invalid type given as package. issue 78663.
- arg_spec - Fix incorrect ``no_log`` warning when a parameter alias is used (https://github.com/ansible/ansible/pull/77576)
- callback plugins - do not crash when ``exception`` passed from a module is not a string (https://github.com/ansible/ansible/issues/75726, https://github.com/ansible/ansible/pull/77781).
- cli now emits clearer error on no hosts selected
- config, ensure that pulling values from configmanager are templated if possible.
- display itself should be single source of 'verbosity' level to the engine.
- dnf - Condense a few internal boolean returns.
- dnf - The ``nobest`` option now also works for ``state=latest``.
- dnf - The ``skip_broken`` option is now used in installs (https://github.com/ansible/ansible/issues/73072).
- dnf - fix output parsing on systems with ``LANGUAGE`` set to a language other than English (https://github.com/ansible/ansible/issues/78193)
- facts - fix IP address discovery for specific interface names (https://github.com/ansible/ansible/issues/77792).
- facts - fix processor facts on AIX: correctly detect number of cores and threads, turn ``processor`` into a list (https://github.com/ansible/ansible/pull/78223).
- fetch_file - Ensure we only use the filename when calculating a tempfile, and do not incude the query string (https://github.com/ansible/ansible/issues/29680)
- fetch_file - properly split files with multiple file extensions (https://github.com/ansible/ansible/pull/75257)
- file - setting attributes of symbolic links or files that are hard linked no longer fails when the link target is unspecified (https://github.com/ansible/ansible/issues/76142).
- file backed cache plugins now handle concurrent access by making atomic updates to the files.
- git module fix docs and proper use of ssh wrapper script and GIT_SSH_COMMAND depending on version.
- handlers - fix an issue where the ``flush_handlers`` meta task could not be used with FQCN: ``ansible.builtin.meta`` (https://github.com/ansible/ansible/issues/79023)
- if a config setting prevents running ansible it should at least show it's "origin".
- include module - add docs url to include deprecation message (https://github.com/ansible/ansible/issues/76684).
- items2dict - Handle error if an item is not a dictionary or is missing the required keys (https://github.com/ansible/ansible/issues/70337).
- keyword inheritance - Ensure that we do not squash keywords in validate (https://github.com/ansible/ansible/issues/79021)
- known_hosts - do not return changed status when a non-existing key is removed (https://github.com/ansible/ansible/issues/78598)
- local facts - if a local fact in the facts directory cannot be stated, store an error message as the fact value and emit a warning just as if just as if the facts execution has failed. The stat can fail e.g. on dangling symlinks.
- lookup plugin - catch KeyError when lookup returns dictionary (https://github.com/ansible/ansible/pull/77789).
- module_utils - Make distro.id() report newer versions of OpenSuSE (at least >=15) also report as ``opensuse``. They report themselves as ``opensuse-leap``.
- module_utils.service - daemonize - Avoid modifying the list of file descriptors while iterating over it.
- null_representation config entry changed to 'raw' as it must allow 'none/null' and empty string.
- omit on keywords was resetting to default value, ignoring inheritance.
- paramiko - Add a new option to allow paramiko >= 2.9 to easily work with all devices now that rsa-sha2 support was added to paramiko, which prevented communication with numerous platforms. (https://github.com/ansible/ansible/issues/76737)
- paramiko - Add back support for ``ssh_args``, ``ssh_common_args``, and ``ssh_extra_args`` for parsing the ``ProxyCommand`` (https://github.com/ansible/ansible/issues/78750)
- password lookup does not ignore k=v arguments anymore.
- pause module will now report proper 'echo' vs always being true.
- pip - fix cases where resolution of pip Python module fails when importlib.util has not already been imported
- plugin loader - Sort results when fuzzy matching plugin names (https://github.com/ansible/ansible/issues/77966).
- plugin loader will now load config data for plugin by name instead of by file to avoid issues with the same file being loaded under different names (fqcn + short name).
- plugin loader, fix detection for existing configuration before initializing for a plugin
- plugin loader, now when skipping a plugin due to an abstract method error we provide that in 'verbose' mode instead of totally obscuring the error. The current implementation assumed only the base classes would trigger this and failed to consider 'in development' plugins.
- prevent lusermod from using group name instead of group id (https://github.com/ansible/ansible/pull/77914)
- prevent type annotation shim failures from causing runtime failures (https://github.com/ansible/ansible/pull/77860)
- psrp connection now handles default to inventory_hostname correctly.
- roles, fixed issue with roles loading paths not contained in the role itself when using the `_from` options.
- service_facts - Use python re to parse service output instead of grep (https://github.com/ansible/ansible/issues/78541)
- setup - Adds a default value to ``lvm_facts`` when lvm or lvm2 is not installed on linux (https://github.com/ansible/ansible/issues/17393)
- shell plugins now give a more user friendly error when fed the wrong type of data.
- template module/lookup - fix ``convert_data`` option that was effectively always set to True for Jinja macros (https://github.com/ansible/ansible/issues/78141)
- unarchive - if unzip is available but zipinfo is not, use unzip -Z instead of zipinfo (https://github.com/ansible/ansible/issues/76959).
- uri - properly use uri parameter use_proxy (https://github.com/ansible/ansible/issues/58632)
- uri module - failed status when Authentication Bearer used with netrc, because Basic authentication was by default. Fix now allows to ignore netrc by changing use_netrc=False (https://github.com/ansible/ansible/issues/74397).
- urls - Guard imports of ``urllib3`` by catching ``Exception`` instead of ``ImportError`` to prevent exceptions in the import process of optional dependencies from preventing use of ``urls.py`` (https://github.com/ansible/ansible/issues/78648)
- user - Fix error "Permission denied" in user module while generating SSH keys (https://github.com/ansible/ansible/issues/78017).
- user - fix creating a local user if the user group already exists (https://github.com/ansible/ansible/pull/75042)
- user module - Replace uses of the deprecated ``spwd`` python module with ctypes (https://github.com/ansible/ansible/pull/78050)
- validate-modules - fix validating version_added for new options.
- variablemanager, more efficient read of vars files
- vault secrets file now executes in the correct context when it is a symlink (not resolved to canonical file).
- wait_for - Read file and perform comparisons using bytes to avoid decode errors (https://github.com/ansible/ansible/issues/78214)
- winrm - Ensure ``kinit`` is run with the same ``PATH`` env var as the Ansible process
- winrm connection now handles default to inventory_hostname correctly.
- yaml inventory plugin - fix the error message for non-string hostnames (https://github.com/ansible/ansible/issues/77519).
- yum - fix traceback when ``releasever`` is specified with ``latest`` (https://github.com/ansible/ansible/issues/78058)
New Plugins
-----------
Test
~~~~
- uri - is the string a valid URI
- url - is the string a valid URL
- urn - is the string a valid URN

File diff suppressed because it is too large Load Diff

View File

@ -1,3 +0,0 @@
minor_changes:
- callbacks - Add feature allowing forks to send callback events
(https://github.com/ansible/ansible/issues/14681)

View File

@ -1,2 +0,0 @@
bugfixes:
- display correct error information when an error exists in the last line of the file (https://github.com/ansible/ansible/issues/16456)

View File

@ -1,2 +0,0 @@
minor_changes:
- Allow for the skipped filter to be used on a registered looped task results. (https://github.com/ansible/ansible/issues/16949)

View File

@ -1,2 +0,0 @@
bugfixes:
- Lookup user by UID in password database if login name is not found (https://github.com/ansible/ansible/issues/17029)

View File

@ -1,3 +0,0 @@
bugfixes:
- inventory_hostnames - Use ``InventoryManager`` instead of trying to replicate its behavior
(https://github.com/ansible/ansible/issues/17268)

View File

@ -0,0 +1,2 @@
bugfixes:
- setup - Adds a default value to ``lvm_facts`` when lvm or lvm2 is not installed on linux (https://github.com/ansible/ansible/issues/17393)

View File

@ -1,2 +0,0 @@
minor_changes:
- subversion - ``validate_certs`` option, which, when true, will avoid passing ``--trust-server-cert`` to ``svn`` commands (https://github.com/ansible/ansible/issues/22599).

View File

@ -0,0 +1,2 @@
bugfixes:
- "Properly execute rescue section when an include task fails in all loop iterations (https://github.com/ansible/ansible/issues/23161)"

View File

@ -1,3 +0,0 @@
bugfixes:
- Ensure if a traceback halts ``strategy.run`` that we still attempt to clean up
(https://github.com/ansible/ansible/issues/23958)

View File

@ -1,3 +0,0 @@
bugfixes:
- expect - Operate pexpect with bytes to avoid potential encoding issues
(https://github.com/ansible/ansible/issues/29351)

View File

@ -0,0 +1,3 @@
bugfixes:
- fetch_file - Ensure we only use the filename when calculating a tempfile, and do not incude the query string
(https://github.com/ansible/ansible/issues/29680)

View File

@ -1,4 +0,0 @@
bugfixes:
- >
pause - Fix indefinite hang when using a pause task on a background
process (https://github.com/ansible/ansible/issues/32142)

View File

@ -1,3 +0,0 @@
bugfixes:
- quote filter - normalize how ``None`` is handled, to match Python3 behavior
(https://github.com/ansible/ansible/issues/32174)

View File

@ -1,2 +0,0 @@
bugfixes:
- hostname - add macOS support (https://github.com/ansible/ansible/pull/54439)

View File

@ -1,2 +0,0 @@
minor_changes:
- debconf - add a note about no_log=True since module might expose sensitive information to logs (https://github.com/ansible/ansible/issues/32386).

View File

@ -1,2 +0,0 @@
bugfixes:
- subversion - fix stack trace when getting information about the repository (https://github.com/ansible/ansible/issues/36498)

View File

@ -1,4 +0,0 @@
bugfixes:
- delegate_to - Ensure that calculating ``delegate_to`` vars with a loop
uses the correct context to correctly evaluate the loop
(https://github.com/ansible/ansible/issues/37132)

View File

@ -1,2 +0,0 @@
minor_changes:
- subelements - clarify the lookup plugin documentation for parameter handling (https://github.com/ansible/ansible/issues/38182).

View File

@ -1,2 +0,0 @@
bugfixes:
- facts - account for Slackware OS with ``+`` in the name (https://github.com/ansible/ansible/issues/38760)

View File

@ -1,4 +0,0 @@
minor_changes:
- >
unarchive - add ``include`` parameter to allow extracting specific files
from an archive (https://github.com/ansible/ansible/pull/40522)

View File

@ -0,0 +1,2 @@
bugfixes:
- Propagate ``ansible_failed_task`` and ``ansible_failed_result`` to an outer rescue (https://github.com/ansible/ansible/issues/43191)

View File

@ -1,2 +0,0 @@
minor_changes:
- distribution - add support for DragonFly distribution (https://github.com/ansible/ansible/issues/43739).

View File

@ -1,2 +0,0 @@
bugfixes:
- galaxy - handle plus sign in user token appearing in role url (https://github.com/ansible/ansible/issues/45475).

View File

@ -1,2 +0,0 @@
minor_changes:
- Force the template module to use non-native Jinja2 (https://github.com/ansible/ansible/issues/46169)

View File

@ -1,2 +0,0 @@
minor_changes:
- Allow an attribute to be passed to the min and max filters with Jinja 2.10+

View File

@ -1,2 +0,0 @@
bugfixes:
- vault - Support reading raw binary data from stdin under python3

View File

@ -1,2 +0,0 @@
bugfixes:
- Provide more information in AnsibleUndefinedVariable (https://github.com/ansible/ansible/issues/55152)

View File

@ -0,0 +1,2 @@
breaking_changes:
- Allow for lazy evaluation of Jinja2 expressions (https://github.com/ansible/ansible/issues/56017)

View File

@ -1,2 +0,0 @@
minor_changes:
- default_callback - moving 'check_mode_markers' documentation in default_callback doc_fragment (https://github.com/ansible-collections/community.general/issues/565).

View File

@ -1,5 +0,0 @@
bugfixes:
- Strategy - When building the task in the Strategy from the Worker,
ensure it is properly marked as finalized and squashed. Addresses an
issue with ``ansible_failed_task``.
(https://github.com/ansible/ansible/issues/57399)

View File

@ -0,0 +1,2 @@
bugfixes:
- uri - properly use uri parameter use_proxy (https://github.com/ansible/ansible/issues/58632)

View File

@ -1,2 +0,0 @@
minor_changes:
- Added name of aliases in user error (https://github.com/ansible/ansible/issues/58752).

View File

@ -1,2 +0,0 @@
minor_changes:
- constructed - Add a toggle to allow the separator to be omitted if no prefix has been provided.

View File

@ -1,2 +0,0 @@
bugfixes:
- AnsibleModule.set_mode_if_different - don't check file existence when check_mode is activated (https://github.com/ansible/ansible/issues/61185).

View File

@ -1,2 +0,0 @@
minor_changes:
- Add yum/dnf version comparison documentation for package install

View File

@ -1,2 +0,0 @@
bugfixes:
- get_url - skip checksum during ``--check`` (https://github.com/ansible/ansible/issues/61369).

View File

@ -0,0 +1,2 @@
bugfixes:
- prevent lusermod from using group name instead of group id (https://github.com/ansible/ansible/pull/77914)

View File

@ -1,2 +0,0 @@
bugfixes:
- "task parsing - strip spaces from action name when using ``action: foo bar=baz`` form. (https://github.com/ansible/ansible/issues/62136)"

View File

@ -1,3 +0,0 @@
bugfixes:
- Display - Use wcswidth to calculate printable width of a text string
(https://github.com/ansible/ansible/issues/63105)

View File

@ -1,2 +0,0 @@
minor_changes:
- find module - Now has a ``read_whole_file`` boolean parameter which allows for reading the whole file and doing an ``re.search()`` regex evaluation on it when searching using the ``contains`` option. This allows (for example) for ensuring the very end of the file matches a pattern.

View File

@ -1,2 +0,0 @@
bugfixes:
- Ensure Ansible's unique filter preserves order (https://github.com/ansible/ansible/issues/63417)

View File

@ -1,2 +0,0 @@
bugfixes:
- git - Only pass ``--raw`` flag to git verify commands (verify-tag, verify-commit) when ``gpg_whitelist`` is in use. Otherwise don't pass it so that non-whitelist GPG validation still works on older Git versions. (https://github.com/ansible/ansible/issues/64469)

View File

@ -0,0 +1,2 @@
bugfixes:
- fetch_file - properly split files with multiple file extensions (https://github.com/ansible/ansible/pull/75257)

View File

@ -1,5 +0,0 @@
minor_changes:
- >-
default callback - add ``show_task_path_on_failure`` option to display file and
line number of tasks only on failed tasks when running at
normal verbosity level (https://github.com/ansible/ansible/issues/64625)

View File

@ -1,2 +0,0 @@
bugfixes:
- Suppress warning when user directory used in --playbook-dir option with ansible-inventory command (https://github.com/ansible/ansible/issues/65262).

View File

@ -0,0 +1,2 @@
minor_changes:
- Add a new "INVENTORY_UNPARSED_WARNING" flag add to hide the "No inventory was parsed, only implicit localhost is available" warning

View File

@ -1,3 +0,0 @@
bugfixes:
- Includes - Explicitly get the include task, and not assume it is the parent
(https://github.com/ansible/ansible/issues/65710)

View File

@ -1,3 +0,0 @@
bugfixes:
- paramiko connection plugin - Ensure we only reset the connection when one has been
previously established (https://github.com/ansible/ansible/issues/65812)

View File

@ -1,2 +0,0 @@
minor_changes:
- dnf - now shows specific package changes (installations/removals) under ``results`` in check_mode. (https://github.com/ansible/ansible/issues/66132)

View File

@ -1,2 +0,0 @@
minor_changes:
- virtualization facts - Detect ``vdsmd`` in addition to ``vdsm`` when trying to detect RHEV hosts. (https://github.com/ansible/ansible/issues/66147)

View File

@ -1,2 +0,0 @@
minor_changes:
- virtual facts - containerd cgroup is now recognized as container tech (https://github.com/ansible/ansible/issues/66304).

View File

@ -1,2 +0,0 @@
bugfixes:
- "slurp - Fix error messages for unreadable files and directories (https://github.com/ansible/ansible/issues/67340)."

View File

@ -1,2 +0,0 @@
breaking_changes:
- The ``meta`` module now supports tags for user-defined tasks. Internal ``meta`` tasks continue to always run. (https://github.com/ansible/ansible/issues/64558)

View File

@ -1,3 +0,0 @@
bugfixes:
- Vault - Allow single vault encrypted values to be used directly as module
parameters. (https://github.com/ansible/ansible/issues/68275)

View File

@ -1,2 +0,0 @@
minor_changes:
- galaxy - add documentation about galaxy parameters in examples/ansible.cfg (https://github.com/ansible/ansible/issues/68402).

View File

@ -1,2 +0,0 @@
minor_changes:
- setup - allow list of filters (https://github.com/ansible/ansible/pull/68551).

View File

@ -1,3 +0,0 @@
minor_changes:
- Errors - Ensure that errors passed with ``orig_exc`` include the context of that exception
(https://github.com/ansible/ansible/issues/68605)

View File

@ -1,2 +0,0 @@
minor_changes:
- iptables - fixed get_chain_policy API (https://github.com/ansible/ansible/issues/68612).

View File

@ -1,2 +0,0 @@
bugfixes:
- The ``flush()`` method of ``CachePluginAdjudicator`` now calls the plugin's ``flush()`` method instead of iterating over the keys that the adjudicator knows about and deleting those from the cache. (https://github.com/ansible/ansible/issues/68770)

View File

@ -1,2 +0,0 @@
breaking_changes:
- NetBSD virtualization facts (specifically ``ansible_virtualization_type``) now returns a more accurate value by checking the value of the ``machdep.hypervisor`` ``sysctl`` key. This change is breaking because in some cases previously, we would erroneously report ``xen`` even when the target is not running on Xen. This prevents that behavior in most cases. (https://github.com/ansible/ansible/issues/69352)

View File

@ -1,2 +0,0 @@
bugfixes:
- Fixed TypeError instancemethod expecting at least 2 arguments for apt_repository(issue https://github.com/ansible/ansible/issues/69308, PR https://github.com/ansible/ansible/pull/69463)

View File

@ -1,2 +0,0 @@
minor_changes:
- user - add new parameters ``password_expire_max`` and ``password_expire_min`` for controlling password expiration (https://github.com/ansible/ansible/issues/68775)

View File

@ -1,2 +0,0 @@
bugfixes:
- shell - fix quoting of mkdir command in creation of remote_tmp in order to allow spaces and other special characters (https://github.com/ansible/ansible/issues/69577).

View File

@ -1,2 +0,0 @@
bugfixes:
- file - the module should warn in check_mode when path an owner/group don't exist (https://github.com/ansible/ansible/issues/67307).

View File

@ -1,2 +0,0 @@
bugfixes:
- Fix incorrect re-run of roles with tags (https://github.com/ansible/ansible/issues/69848)

View File

@ -1,4 +0,0 @@
bugfixes:
- >-
if the ``type`` for a module parameter in the argument spec is callable,
do not pass ``kwargs`` to avoid errors (https://github.com/ansible/ansible/issues/70017)

View File

@ -1,2 +0,0 @@
minor_changes:
- yum_repository - added boolean option module_hotfixes which allows to enable functionality for dnf.

View File

@ -1,2 +0,0 @@
bugfixes:
- "ansible-doc - improve man page formatting to avoid problems when YAML anchors are used (https://github.com/ansible/ansible/pull/70045)."

View File

@ -1,2 +0,0 @@
bugfixes:
- "ansible-doc - improve error message in text formatter when ``description`` is missing for a (sub-)option or a return value or its ``contains`` (https://github.com/ansible/ansible/pull/70046)."

View File

@ -1,2 +0,0 @@
bugfixes:
- apt - add ``fail_on_autoremove`` param to apt module to avoid unintended package removals (https://github.com/ansible/ansible/issues/63231)

View File

@ -1,2 +0,0 @@
bugfixes:
- apt - include exception message from apt python library in error output

View File

@ -1,2 +0,0 @@
bugfixes:
- SSH plugin - Improve error message when ssh client is not found on the host

Some files were not shown because too many files have changed in this diff Show More