Compare commits

...

1563 Commits

Author SHA1 Message Date
6d40beeef4 New release v2.16.1 (#82346) 2023-12-04 15:46:24 -06:00
59aa0145d2 Fix various issues in unsafe_proxy (#82326)
- Use str/bytes directly instead of text_type/binary_type
- Fix AnsibleUnsafeBytes.__str__ implementation
- Fix AnsibleUnsafeBytes.__format__ return type
- Remove invalid methods from AnsibleUnsafeBytes (casefold, format, format_map)
- Use `chars` instead of `bytes` to match stdlib naming
- Remove commented out code
2023-12-01 09:28:05 -08:00
6655343d6d Update Ansible release version to v2.16.1rc1.post0. (#82304) 2023-11-27 22:05:00 +00:00
5007068bfe New release v2.16.1rc1 (#82301) 2023-11-27 15:24:38 -06:00
270b39f6ff Ensure that unsafe is more difficult to lose [stable-2.16] (#82293)
* Ensure that unsafe is more difficult to lose

* Add Task.untemplated_args, and switch assert over to use it
* Don't use re in first_found, switch to using native string methods
* If nested templating results in unsafe, just error, don't continue

* ci_complete
2023-11-27 10:26:45 -08:00
f302b2f592 Allow include_tasks handlers for searching role subdirs (#82248) (#82268)
Fixes #82241

(cherry picked from commit d664f13b4a)
2023-11-27 17:55:57 +00:00
bb787c119d ansible-pull: expand destinantion directoy to avoid purgin in / (#82030) (#82221)
* expand destinantion directoy to avoid purgin in /

  bad things could happen and help alone is not enough

(cherry picked from commit 8825e60add)
2023-11-27 17:31:33 +00:00
8a87e1c5d3 no_log avoid masking booleans (#82217) (#82235)
* no_log avoid masking booleans (#82217)

* no_log avoid masking booleans

* clog

* fix issues

(cherry picked from commit 6e448edc63)

* unused boil is hot
2023-11-27 08:29:41 -08:00
fb5d254a79 wait_for, fallback to read for non mmapable files (#82064) (#82233)
* wait_for, fallback to read for non mmapable files (#82064)

* also handle oserror, added debug jic

(cherry picked from commit 8b102dca4a)

* skip problem versions
2023-11-27 08:28:03 -08:00
2f7376ce06 flush_handlers: handle a failure in a nested block with force_handlers (#81572) (#82197)
Fixes #81532

ci_complete

(cherry picked from commit a8b6ef7e7c)
2023-11-27 08:25:54 -08:00
32aedb8bab setup.cfg: add Programming Language :: Python :: 3.12 classifier (#82152)
ansible-core 2.16+ supports Python 3.12. This corrects missing metadata.
2023-11-27 08:25:01 -08:00
71b00cefac restore role param precedence (#82106) (#82138)
* add test for setfact/param override

(cherry picked from commit 20a54eb236)
2023-11-27 08:24:25 -08:00
6f8261bcf9 [bp-2.16] Fix the strategy plugin description in keywords (#82133)
Fixes: https://github.com/ansible/ansible-documentation/issues/762

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
(cherry picked from commit 8ecc1d485b)
2023-11-27 08:23:15 -08:00
c2a3cad466 Remove duplicate winrm test (#82124) (#82127)
(cherry picked from commit f8a9fd4758)
2023-11-27 08:22:29 -08:00
75bce4b9d5 add pep668 note to pip module docs (#82096) (#82098)
(cherry picked from commit 3ea5304a57)
2023-11-27 07:38:15 -08:00
e13569d0e2 ansible-pull now handles all secret files CLI options (#82009) (#82070)
* ansible-pull added missing pasthrough for secrets

 Both become and connection password file options were missing.
 Also added test

(cherry picked from commit 99e0d25857)
2023-11-27 07:37:51 -08:00
6cfa8ec021 Fix Jinja plugin deduplication (#82002) (#82053)
for j2 plugins dedupe on path and  not basename
for j2 this is a container file , for other plugins file name == plugin name

(cherry picked from commit b4566c18b3)
2023-11-27 07:37:00 -08:00
859f2876f0 [bp-2.16] Update Python3 (#82203)
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>

(cherry picked from commit c5b68ef16d)
2023-11-13 13:21:46 -08:00
862c5824d0 Update Ansible release version to v2.16.0.post0. (#82144) 2023-11-06 18:41:14 +00:00
704ee70943 New release v2.16.0 (#82141) 2023-11-06 11:56:55 -06:00
a13df22c02 remove args passthru on role runme tests that use grep (#82060) (#82061)
* varying verbosity was masking some first-pass test failures

(cherry picked from commit 40263992df)
2023-10-23 17:59:01 +00:00
31aac52a72 [stable-2.16] ansible-test - Fix parsing of cgroup entries
(cherry picked from commit e933d9d8a6)

Co-authored-by: Matt Clay <matt@mystile.com>
2023-10-23 09:47:54 -07:00
00f74e03b2 [stable-2.16] Fix subversion integration test (#82029)
- Remove dependency on the htpasswd module (and thus passlib)
- Fix setup/teardown of the httpd process
- Fix cleanup of temporary directories.
(cherry picked from commit 09d943445c)

Co-authored-by: Matt Clay <matt@mystile.com>
2023-10-23 09:46:55 -07:00
f6fb5b2031 Update Ansible release version to v2.16.0rc1.post0. (#81987) 2023-10-16 22:07:45 +00:00
2223709bdd New release v2.16.0rc1 (#81986) 2023-10-16 16:27:53 -05:00
33248690fe ansible-test - Update base/default containers (#81956) 2023-10-11 16:37:29 -07:00
f9dfd28cff [stable-2.16] Update default test container Python to 3.12 and support for PyLint 3.0.1 (#81953) (#81955)
* temporary PyLint plugin to mask 3.12 finalizer noise

* ansible-test - Default to Python 3.12 for base/default

* ansible-test - Update pylint requirements

* ansible-test - Remove obsoleted changelog entry

* Add changelog fragment for pylint work-around.

(cherry picked from commit d8484f0af7)
2023-10-11 13:53:55 -07:00
9c91e578d0 [stable-2.16] run_once: unnotify hosts on handlers that are not run (#81667) (#81920)
Fixes #81666
(cherry picked from commit 2d5861c)
2023-10-09 11:34:58 -05:00
f3f0e6a0f8 [stable-2.16] Properly template tags in parent blocks (#81624) (#81921)
When templating tags (which happens outside of standard `post_validate`) we
need to template each object in the inheritance chain and set the templated
values on those objects individually. That way when `task.tags` is called the
`extend` functionality properly picks up the templated values of all
parents into one flatten list.

Fixes #81053
(cherry picked from commit 9b3ed5e)
2023-10-09 11:34:48 -05:00
e856696f09 ansible-galaxy - fix traceback error for invalid req file (#81917) (#81924)
Provide a better error message when encountering a YAML requirements file that is not a dictionary or list.

Fixes: #81901
(cherry picked from commit 8a5ccc9d63)
2023-10-09 11:34:36 -05:00
c70f7d829f Add test coverage for winrm (#81910) - 2.16 (#81914)
* Add test coverage for winrm (#81910)

(cherry picked from commit 282908c57e)

* Add more winrm coverage (#81923)

(cherry picked from commit 976067c15f)
2023-10-09 10:59:32 -05:00
889248bcf7 optimize host_group_vars and vars plugin loading (#79945) (#81878)
* Improve host_group_vars efficiency:

* normalize the basedir with `os.path.realpath()` once and cache it
* cache missing paths/files
* reduce the calls to `isinstance`

Add a couple more general improvements in vars/plugins.py get_vars_from_path():

* call `PluginLoader.all()` once for vars plugins and reload specific
  plugins subsequently
* don't reload legacy/builtin vars plugins that are not enabled

Add a test for host_group_vars and legacy plugin loading

Co-authored-by: Matt Davis <mrd@redhat.com>

* changelog

* Add a new is_stateless attribute to the vars plugin baseclass

update integration tests to be quieter and use the same test pattern

Fix deprecation and adjust test that didn't catch the issue (deprecation only occured when the value was False)

move realpath cache to host_group_vars (do not smuggle call state as instance data)

refactor under a single 'if cache:' statement

Call os.path.isdir instead of always calling os.path.exists first. Just call os.path.exists to differentiate between missing and non-directory.

remove call to super(VarsModule, self).get_vars()

use the entity name as the cache key instead of variable location

Remove isinstance checks and use a class attribute just in case any plugins are subclassing Host/Group

Replace startswith by checking index 0 of the name instead, since host/group names are required

* rename is_stateless to cache_instance to make it more clear what it does

* add plugin instance cache using the path to plugin loader

reduce loading stage option if a new instance isn't created

don't require a known subdir on PluginLoader instantiation for backwards
compatibility

rename attribute again

contain reading from/initializing cached instances to a plugin loader method

* Deprecate v2 vars plugins

* Refactor to use the cache in existing plugin loader methods

Rename the attribute again

Refactor host_group_vars with requested changes

Make changelog a bugfixes fragment

Add a deprecation fragment for v2 vars plugins.

Add type hints

* unbreak group_vars

* Apply suggestions from code review

* misc tweaks

* always cache instance by both requested and resolved FQ name
* add lru_cache to stage calculation to avoid repeated config consultation

* handle KeyError from missing stage option

---------

Co-authored-by: Matt Davis <mrd@redhat.com>
(cherry picked from commit debf2be913)
2023-10-09 10:59:22 -05:00
7d789de400 switch available_hosts to frozenset from list in ansible-inventory (#81870) (#81875)
* major speedup large inventories, since it's consulted iteratively

(cherry picked from commit c1343cc304)
2023-10-09 10:59:09 -05:00
5665eca5e9 win_fetch - improve test time by not scanning Win dir (#81884) (#81888)
(cherry picked from commit dfc62589f6)
2023-10-04 10:24:30 -07:00
4ac5b51529 Update Ansible release version to v2.16.0b2.post0. (#81868) 2023-10-03 17:37:33 -04:00
2dd22e3025 New release v2.16.0b2 (#81864) 2023-10-03 16:01:03 -04:00
2578664198 [stable-2.16] ansible-test - Update distro containers (#81851) (#81859)
* ansible-test - Update distro containers

* Update the alpine3 container to Python 3.11

* Update changelog.

(cherry picked from commit b7903669b4)
2023-10-03 18:29:45 +00:00
9a4bc7e7b3 Restore import_role variable exporting behavior (#81840)
* Import role public (#81772)

revert to previous behavior to push vars to play at compile time
add `public` parameter to allow per import control of exporting (vs just the global config)

Co-authored-by: tchernomax <maxime.deroucy@gmail.com>
Co-authored-by: Sloane Hertel <19572925+s-hertel@users.noreply.github.com>
(cherry picked from commit ab6a544e86)

* adapted to prev version

 - removed new functionality
 - restored global config functioning overriding specific public option

* remove typoe

* quote it
2023-10-03 13:59:01 -04:00
cbae91501a Update the test containers to include Python 3.12.0 final (#81857) 2023-10-03 10:51:58 -07:00
8c4736dd76 [stable-2.16] ansible-test - Invoke container sleep through env (#81853) (#81856)
(cherry picked from commit 20f17687da)
2023-10-03 16:50:15 +00:00
a8e59b2547 [backport/2.16] Bump Pylint sanity test requirements for 3.12 (#81850)
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2023-10-03 07:51:55 -07:00
de732ed712 [backport/2.16] Bump sanity test requirements for 3.12 (#81848) 2023-10-03 07:51:37 -07:00
c7793e65ec Bump coverage.py to v7.3.2 in ansible-test (#81844) (#81845)
(cherry picked from commit ec265ec08a)
2023-10-03 09:13:06 -04:00
58cf53b3c3 [stable-2.16] ansible-test - Improve compatibility with pylint 3 (#81841) (#81842)
(cherry picked from commit f31c287348)
2023-10-02 13:07:27 -07:00
755a7c7387 Fix reporting role as not found when remote_data is None (#81829) (#81838)
(cherry picked from commit 7fab552563)
2023-10-02 19:57:23 +00:00
5008c56c50 [stable-2.16] Install upgraded crun from edge (#81833) (#81839)
(cherry picked from commit e78cc1e)
2023-10-02 18:58:19 +00:00
831dc6e444 Add compat function for parsing Content-Disposition header (#81807)
* py2 compat for get_param

* Add tests, and handle ValueError

* Add clog frag
2023-10-02 09:30:33 -04:00
c2567b1d67 [stable-2.16] ansible-test - Update sanity test requirements (#81810) (#81811)
(cherry picked from commit d6a356d7cd)
2023-09-28 15:49:58 -07:00
9632086901 winrm - make command input more resiliant (#81538) (#81794)
* winrm - make command input more resiliant

* Expand warning message

(cherry picked from commit f22231de20)
2023-09-27 09:10:59 -05:00
42d7a06cd8 Update test container versions for stable-2.16 (#81790) 2023-09-27 09:10:33 -05:00
fffb3c403f [stable-2.16] Prevent roles from using symlinks to overwrite files outside of the installation directory (#81780) (#81783)
* Sanitize linkname during role installs

* Add tests

* add clog frag
(cherry picked from commit ddf0311)
2023-09-27 08:44:18 -05:00
c6affcf7c1 Update Ansible release version to v2.16.0b1.post0. (#81779) 2023-09-26 11:19:49 -05:00
00ca6b94d0 New release v2.16.0b1 (#81778) 2023-09-26 09:37:26 -05:00
37a0754cbf Daemonize follow-up fixes (#81584) (#81766)
* Ensure binary data transmission in daemonize

* Add changelog fragment

(cherry picked from commit 91f94fb59d)
2023-09-26 08:56:38 -05:00
9033002a86 Allow for searching handler subdir for included task via include_role (#81733) (#81759)
Fixes #81722

(cherry picked from commit 1e7f7875c6)
2023-09-26 08:51:57 -05:00
e470954985 Always allow "no-other-choice" pre-release dependencies when resolving collection dependency tree (#81746)
PR #81606.

Prior to this patch, when `--pre` CLI flag was not passed, the
dependency resolver would treat concrete collection dependency
candidates (Git repositories, subdirs, tarball URLs, or local dirs or
files etc) as not meeting the requirements.

This patch makes it so pre-releases in any concrete artifact
references, and the ones being specifically pinned dependencies or
user requests, met anywhere in the dependency tree, are allowed
unconditionally.

This is achieved by moving the pre-release check from
`is_satisfied_by()` to the `find_matches()` hook, following the
Pip's example.

As a bonus, this change also fixes the situation when a collection
pre-releases weren't considered if it didn't have any stable releases.
This now works even if `--pre` wasn't requested explicitly.

Finally, this patch partially reverts commit
6f4b4c345b, except for the tests. And it
also improves the `--pre` hint warning to explain that it mostly
affects Galaxy/Automation Hub-hosted collection releases.

Ref #73416
Ref #79112
Fixes #79168
Fixes #80048
Resolves #81605

Co-authored-by: Sloane Hertel <19572925+s-hertel@users.noreply.github.com>
(cherry picked from commit 7662a05085)
2023-09-26 08:37:16 -05:00
e3eecf096f [stable-2.16] ansible-test - Skip pylint test on Python 3.12 (#81706) (#81757)
(cherry picked from commit 3794612832)
2023-09-21 23:05:04 -07:00
a1a6550daf inventory_ini: Handle SyntaxWarning in ini parsing (#81707)
* handle SyntaxWarning ini inventory parsing

Fixes: #81328

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2023-09-18 10:50:50 -04:00
2793dfa594 reboot: show last error message in verbose log (#81578)
* The last error message is now presented in a verbose log

Fixes: #81574

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2023-09-15 17:50:26 +00:00
81c83c623c Add an example for cleaning up the async job cache, and clarify how that works (#81697) 2023-09-15 05:11:28 +10:00
6f65397871 galaxy: check if the target for symlink exists (#81586)
* Symlinks in the collection might be pointing to non-existent
  targets. Check and report the failure to the user.

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2023-09-12 16:05:51 -07:00
7f0baabbe0 blockinfile: avoid crash on Python 3 when creating directory fails (#81662)
* Avoid crash on Python 3.

* Add a test for the crash on Python 3
2023-09-12 15:46:44 -04:00
3b608f97b1 sanity: update requirements (#81680)
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2023-09-12 11:33:08 -04:00
e4468dc944 copy: print correct dest path when content + diff is used (#81678)
* when --diff is used with content parameter, print destination
  path instead of temporary file path.

Fixes: #79749

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2023-09-12 11:32:41 -04:00
243197f2d4 env-setup.fish: Correct syntax errors (#81677)
- Single quote regular expression values to avoid shell expansion
- Properly test if the $QUIET variable is set and non-zero
2023-09-12 11:31:19 -04:00
67cdaa49f8 ansible-galaxy-collection - fix config permissions for galaxy-importer (#81679)
* Fix permissions for the galaxy-importer config, previously only root had
read/write

* fix ownership instead
2023-09-12 08:43:46 -05:00
7d3d4572ed Fix set filters to use set operations (#81639)
* Fix set filters to use set operations

* Fix integration tests

* Update filter documentation
2023-09-11 09:32:32 -07:00
b1b029c6b5 ansible-doc: allow to filter by more than one collection (#81450)
Make collection filters more flexible for listing collections.
Co-authored-by: Maxwell G <maxwell@gtmx.me>
2023-09-11 09:31:52 -04:00
8034651cd2 Only mark a role as complete once a task in it executes for the target host (#81565)
* If all tasks in the role are skipped or unreachable, the role is not marked as complete for the host.

* Only mark the role as complete if a task in the role succeeds or fails for the host.
2023-09-08 12:11:48 -04:00
3eb96f2c68 Lazy load Templar for [changed,failed]_when (#81650)
The `handler_templar` in `StrategyBase._process_pending_results` was
used for templating handler names which is no longer the case. Now it is
only used for templating `changed_when`/`failed_when`. To prevent
re-creating templars each time results are processed, just create it
on-demand when whens are processed.
2023-09-08 10:06:58 +02:00
cd0aa35c19 encrypt: deprecate passlib_or_crypt (#81571)
* deprecate passlib_or_crypt in favor of do_encrypt

Fixes: #55839
2023-09-07 14:44:26 -07:00
6177888cf6 ansible-vault: Check if the destination is writable (#81660)
* Before performing shredding the original file, check if the
  destination file location is writable or not. This will
  prevent corruption of original file.

Fixes: #81455

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2023-09-07 15:30:05 -04:00
a861b1adba Replace ConfigParser.readfp() with read_file() (#81657)
* Replace ConfigParser.readfp() with read_file()

readfp was removed in Python 3.12.

Fixes #81656

* py2?

* Use PY3 for the python check
2023-09-07 15:24:50 -04:00
a65c331e8e Corrected a typo In options list (#81655)
There was a typo in the word "container", it was spelled "contianer"
2023-09-07 15:23:46 -04:00
45f4fc8389 Update user.py (#81653)
The phrase `Does nothing when used with other platforms.` sometimes appears before the supported platforms. Combine this phrase with the supported platform line.
2023-09-07 15:23:26 -04:00
dedc48bda4 Improve ansible-pull documentation (#81646)
* Improve ansible-pull documentation

* chnaged description from local/remote to target
2023-09-07 15:13:23 -04:00
3ec0850df9 Support packaging and importlib.metadata for pip module (#80881) 2023-09-05 16:11:18 -05:00
dd79c49a4d fix various Jinja plugin caching issues (#79781)
* fix various Jinja plugin caching issues

* consolidate the wrapper plugin cache
* remove redundant cache in J2 filter/test interceptor

* intra-template loader bypass

* fix early exits swallowing some exception detail

* misc comment cleanup
2023-09-05 13:32:36 -07:00
4d40988876 Add type hints to ansible.utils.display::Display (#81400)
* Add type hints to ansible.utils.display::Display

Fixes #80841

* Avoid circular import

* Fix sanity

* type hint some of the functions of the module?

* Fix units

* Not sure about this

* Fix some of the issues from reviews

* Add changelog

* ...

* Update lib/ansible/utils/display.py

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

* remove py2 boilerplate

---------

Co-authored-by: Sviatoslav Sydorenko <wk.cvs.github@sydorenko.org.ua>
2023-09-05 12:08:13 -07:00
48d8e067bf changed link ‘Risks of becoming an unprivileged user’ (#81623)
* changes made in become linkœ

* change become link

* Update lib/ansible/plugins/action/__init__.py

---------

Co-authored-by: Martin Krizek <martin.krizek@gmail.com>
2023-09-05 17:45:57 +02:00
24aac50369 utils/encrypt.py: remove unused private _LOCK (#81614)
Added in #15299, unused since #30160.

Fixes #81613
2023-09-05 17:02:56 +02:00
786a8abee6 yum/dnf/dnf5/zypper documentation - fix grammatical error (#81601) 2023-08-31 15:14:27 -04:00
0f20540e96 Docs: Clarify copy module's purpose; tweak wording (#81592) 2023-08-31 15:03:10 -04:00
1cc5efa77b tarfile: Handle deprecation warning for extract and extractall (#81545)
* Python 3.11.4 introduces a new parameter 'filter' in extract and
extractall in tarfile. Handle deprecation warning message emitted
in Python 3.12.
* added probing mechanism in ansible-galaxy code to detect broken
data filter implementation in tarfile.

Fixes: #80832

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
Co-authored-by: Matt Clay <matt@mystile.com>
2023-08-31 12:02:48 -07:00
5a059b81c8 ansible-test - Fix Python coverage stub generation (#81611)
As of coverage 7.1.0, files without arcs are not generated.

To work around this, an empty (0, 0) arc is used for each file instead.

This is a follow-up to https://github.com/ansible/ansible/pull/81077

ci_coverage
ci_complete
2023-08-31 10:53:10 -07:00
ae69b280ad Add short option for --ask-vault-pass (#80527)
Fixes: #80523
2023-08-31 09:43:26 -07:00
e1e0e2709c ansible-test - Enable thread code coverage (#81604)
ci_complete
ci_coverage
2023-08-30 14:39:47 -07:00
261e5ce381 ansible-test - Update mypy to 1.5.1 (#81602) 2023-08-30 10:39:25 -07:00
c59bcbe627 Bump coverage.py to v7.3.0 in ansible-test (#81077) 2023-08-30 08:58:45 -07:00
65a96daaf4 Fix typos in url lookup plugin options (#81587) 2023-08-29 16:27:09 -05:00
509be19357 Fix nested jinja statements in integration tests (#81591) 2023-08-29 14:33:19 -05:00
5dc3a2ee6d mode is a module option. (#81590) 2023-08-29 18:42:43 +01:00
aeec51ac54 Improve ansible.builtin.copy directory_mode parameter docs (#81127)
* Improve ansible.builtin.copy directory_mode parameter docs
2023-08-29 11:23:41 +01:00
bdaa091b33 Add warnings for illegal file names in role (#81555)
Co-authored-by: Aleksey Tsalolikhin <atsaloli.tech@gmail.com>
2023-08-28 14:54:08 -04:00
4ab5ecbe81 dnf - fix for a package from URI and update_only (#81568)
Fixes #81376
2023-08-28 10:48:45 +02:00
da63f32d59 script: add argument validation (#81469)
partially fixes: #81349

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2023-08-25 10:27:26 -07:00
37cb44ec37 find: correct typo (#81512) 2023-08-25 10:22:43 -07:00
7865b198d2 PowerShell - Improve error checking (#80984)
Improves the error checking when running PowerShell modules using
Ansible.ModuleUtils.Legacy. It will only return an rc of 1 if both the
PowerShell module runner signalled an error occurred and those error
records were present in the output. This should reduce some false
positive errors when using the older module style.
2023-08-25 05:24:02 +10:00
f3976117fb PowerShell - remove uneeded dotnet code for future compatibility (#81472) 2023-08-25 05:23:48 +10:00
116948cd14 user - set current expiration correctly when no shadow entry exists (#75194) 2023-08-23 11:18:57 -07:00
2e6d849bdb apt: ignore fail_on_autoremove and allow_downgrade when using aptitude (#81445)
* apt: ignore fail_on_autoremove and allow_downgrade when using aptitude

* fail_on_autoremove (--no-remove) and allow_downgrade (--allow-downgrades)
  parameters are only valid for apt-get and not for aptitude. Ignore them when
  aptitude is detected and used.

Fixes: #77868
2023-08-23 08:42:03 -07:00
5deb4ee991 Remove duplicate FILE_ATTRIBUTES definition (#81494)
* Remove duplicated definition of the FILE_ATTRIBUTES constant in basic.py by importing it from the new location.
2023-08-23 09:34:29 -04:00
194f829b0f Fix pause CPU consumption (#81519)
* Sleep for the DEFAULT_INTERNAL_POLL_INTERVAL between polling for user input

Fixes #81516
2023-08-22 15:03:22 -04:00
3e9d374fda fix typo in example human_to_bytes filter (#81559) 2023-08-22 11:25:51 -04:00
aa8a29a9d4 group: remove extraneous warning (#81557)
* remove extraneous warning shown when group does not exist

Fixes: #77049

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2023-08-22 11:23:10 -04:00
4a96b3d5b4 path_join: update docs and examples for absolute path (#81544)
Document path_join behavior -
    If a path component is an absolute path, then all previous components
    are ignored and joining continues from the absolute path.

Fixes: #81446

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2023-08-22 11:12:21 -04:00
863e2571db debconf: idempotency for password question (#81484)
* Gather value of password using debconf-get-selections command,
  use this information for idempotency.

Fixes: #47676

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2023-08-21 18:25:03 -07:00
6627ba9ace Unit test cleanup (#81556)
* Fix cleanup_tmp_file unit tests

* Simplify the problematic wcwidth chars unit test
2023-08-21 15:54:03 -07:00
f28e32c063 ansible-test - Limit deprecated check to core (#81552)
Using `# deprecated:` comment checks in collections would effectively limit those collections to a single version of ansible-core.
2023-08-21 12:58:09 -07:00
c69c83c962 Fix macos defaults (#79999) 2023-08-21 10:02:47 -07:00
390e508d27 ansible-test - Always use managed entry points (#81537) 2023-08-17 19:13:29 -07:00
a48feb4cfc "retries" without "until": retry until success (#81531)
Fixes #20802
2023-08-17 15:17:26 -04:00
98f1627817 include_role: expose vars from parent roles to role's handlers (#81524)
* include_role: expose vars from parent roles to role's handlers

Fixes #80459
2023-08-17 15:14:20 -04:00
a2673cb564 Pre-calculate date early and use it for all zipfile writes (#81521)
* Pre-calculate date early and use it for all zipfile writes

Fixes #80089
Closes #80578
2023-08-17 15:08:53 -04:00
9afaf2216b Remove obsolete text from release.py PR template (#81526) 2023-08-16 10:52:20 -07:00
470f41b275 Deprecate STRING_CONVERSION_ACTION (#78860) 2023-08-16 08:44:35 -07:00
ca08261f08 Add ability to filter find on mode (#81485) 2023-08-15 11:58:19 -05:00
a2d9c4d62f docs: Update examples in systemd_service to use the new name (#81518) 2023-08-15 15:45:31 +00:00
0cba3b7504 Last handler with same name wins for listen too (#81358)
Fixes #49371
Fixes #81013
2023-08-15 15:03:56 +02:00
bd3ffbe109 fix incorrect ansible_managed formatting (#79129)
Ansible breaks configs if file name could be parsed as jinja template
or contains `%` chars.
Especially `%n`[ame%] which is a line break pattern according to [strftime (3)](https://manpages.debian.org/bullseye/manpages-dev/strftime.3.en.html)
2023-08-14 09:59:40 -04:00
01469c558c sanity: Document pep8 known issue with Python 3.12 (#81495)
The ``pep8`` sanity test may detect issues with f-strings on
Python 3.12, such as E201/E202, that are not detected under earlier
Python versions.

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
Co-authored-by: Matt Clay <matt@mystile.com>
2023-08-11 13:23:16 -07:00
6347da9696 Document return values of template module (#75980)
* Document return values of template module

Add documentation for some return values of template module. 

I have not tested this extensively, so it's possible that under special
circumstances this might not be entirely accurate, but briefly looking
at the code as far as I can tell they are correct.

Co-authored-by: mprasil <mprasil@mpT15p>
2023-08-11 14:04:23 -04:00
47ab59753c Clean up release script (#81488)
* Enable mypy for the entire packaging directory

* Return CompletedProcess only when capturing output

This allows stdout/stderr on CompletedProcess to be `str` instead of `str | None`.
The unused args on CompletedProcess have been removed.
Overload type hints have been added to reflect these changes.

* Relax return type on ensure_venv

This improves consistency with its usage, since `run` accepts `env` of `dict[str, t.Any]`.
Also removed unnecssary `str()` usage when updating `env`.

* Fix type hint on suppress_when

* Fix callable annotation

* Add type hint for command_parser

PyCharm complains about using a protected member, and also that it can't find the type in the type stubs.
However, mypy properly recognizes the type.

* Avoid unnecessary TypeVar usage
2023-08-10 13:39:37 -07:00
5dbcf47e02 Add documentation for systemd reload (#81473)
* Add documentation for systemd reload
2023-08-10 15:04:23 -04:00
b4943e45d0 Update cliconf-> __init__.py -> get_capabilities() (#79097)
Doc string was incorrect. 
The `get_capabilities` method returns a Python Dict data structure not a JSON string as stated.
2023-08-10 10:54:15 -07:00
d0699cb44a Add unit tests for module_utils.compat.datetime (#81483) 2023-08-09 12:24:10 -07:00
580b87252c Remove unreachable code in password lookup test (#81482) 2023-08-09 12:23:58 -07:00
726d9a5fcc Fix constructed inventory plugin unit test (#81481) 2023-08-09 12:23:47 -07:00
553f51e728 Revert logic to use Popen.communicate (#80874)
* Back out use of communicate, add better comments, add bufsize, and align with subprocess._communicate

* tests

* re-order logic slightly

* more comments

* loopty loop

* yet another comment

* Revert "yet another comment"

This reverts commit 96cd8ada5fa0441b92f2298bdaa6cb40594847d2.

* Revert "loopty loop"

This reverts commit 96ea066f6a7d18902c04a14f18dd79b38e56f5e7.

* ci_complete

* Copy in comment too

* Wording updates

Co-authored-by: Matt Davis <6775756+nitzmahone@users.noreply.github.com>

* Back out bufsize

---------

Co-authored-by: Matt Davis <6775756+nitzmahone@users.noreply.github.com>
2023-08-09 11:09:43 -07:00
85d3305889 Fix f-string whitespace in release script (#81477) 2023-08-09 09:35:38 -07:00
1c765a6afc restore conditional lookup nerfing (#81460)
* a recent optimization lost the unsafe lookup disable behavior when templating conditionals with inline templates that referred to untrusted values
* added regression test to catch this case
2023-08-09 09:25:20 -07:00
fa5fe8a7db Bump test container versions to latest (#81471)
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2023-08-08 19:53:04 -07:00
493c678795 Sanity: Bump version to match Python 3.12 (#81399)
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2023-08-08 09:05:46 -07:00
f3a15a4a95 filters vault/unvault fix vault_id parameter usage (#81422)
* vault/unvault filters, fixed id field to match documented.

fixes #81420

Co-authored-by: Felix Fontein <felix@fontein.de>
2023-08-04 17:50:57 -04:00
a1569ea4ca iptables chain creation does not populate with a rule (#80257)
* iptables chain creation does not populate with a rule

fixes #80256

* Add changelog fragment

* Add rules and flush chain during integration tests

* Check chain rule on comment

* Update test/integration/targets/iptables/tasks/chain_management.yml
2023-08-04 13:59:21 -04:00
f10d11bcdc dpkg_selections: Check if package exists before selection operation (#81406)
* dpkg_selections: Check if the package exists before the selection operation

Fixes: #81404

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2023-08-03 14:01:20 -07:00
95fdd555b3 galaxy: Cross check the collection type (#81423)
* User-provided collection type might differ from collection
  source. Cross-check the type before proceeding

Fixes: #79463

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2023-08-03 13:59:59 -07:00
f894ce89b4 Overhaul package-data sanity test (#81427)
The sanity test now only inspects the sdist and wheel instead of trying to install the sdist using setup.py.
2023-08-03 13:24:25 -07:00
c07652f42e yum_repository: deprecate keepcache parameter (#81426)
* keepcache parameter can not be set in repository file
  instead it goes in yum.conf or dnf.conf

Fixes: #78693 

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2023-08-03 12:33:43 -07:00
cc01a73ef0 service action: improve documenation about service and service (#81405)
* service action: improve documenation about service and service

moudule used as backup and cli that confuses everyone

* Update service.py

---------

Co-authored-by: Matt Davis <6775756+nitzmahone@users.noreply.github.com>
2023-08-03 19:17:07 +00:00
ab9a48d4b1 Fix comment about authorization (#81401)
Move all information about supported platforms to the same bullet point.
2023-08-03 12:06:27 -07:00
f5431321a2 password_hash - fix bcrypt algorithm when passlib is not installed (#81385) 2023-08-03 14:32:42 -04:00
dbb3feddaf Update update-sanity-requirements.py script (#81424)
Frozen requirements can now preserve any explicitly installed package that would normally be omitted, not just setuptools.
2023-08-03 10:58:19 -07:00
2ebeb43d6f ansible-galaxy - improve ignoring multiple signature status codes (#77610)
* ansible-galaxy - improve ignoring multiple signature status codes when using --ignore-signature-status-code

* fix backwards compatibility by adding a new plural option instead, and hide the singular from --help
2023-08-03 13:00:07 +00:00
76aa0bdbd6 Update bot link in the GH templates (#81390)
Also remove "Component Name" section from the PR template as components
are automatically detected by the bot from the list of changed files.
2023-08-03 09:20:32 +02:00
c525514994 ansible-test - Update source layout detection (#81418) 2023-08-02 20:24:13 -07:00
0c03a6bcf6 Add changelog fragment for docs/examples removal (#81410) 2023-08-02 12:27:10 -07:00
d1cd06073f Extend setup_collections timeout to 3 minutes (#81408) 2023-08-02 10:43:21 -07:00
b9daa6891f Remove unused sanity test code (#81398) 2023-08-01 14:08:01 -07:00
11e261b54f CI: remove FreeBSD 12.4 from test matrix (#81315)
Fixes: #80417

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2023-08-01 13:37:26 -07:00
691c8e8603 Omit pre-built man pages from sdist (#81395)
Since man pages aren't accessible to users after a `pip install`, there's no need to include them in the sdist.
This change makes it trivial to build man pages from source, which makes them much easier to iterate on.
It also simplifies creation and testing of the sdist, since it no longer requires building man pages.

The new `packaging/cli-doc/build.py` script can generate both man pages and RST documentation.
This supports inclusion on the docs site without a dependency on `ansible-core` internals.
Having a single implementation for both simplifies keeping the two formats in sync.
2023-08-01 12:48:01 -07:00
6d1f85bbe9 ansible-test: remove alpine 3.17 (#81124) 2023-08-01 11:54:33 -07:00
0b9d83ccdb fixed become page link in PE error message (#81391) 2023-08-01 11:35:06 -04:00
b8db05f13e Update reboot module to include message option (#81374) 2023-08-01 11:24:45 -04:00
2e4a501549 add type hints for DataLoader methods (#81359)
* add type hints for DataLoader methods

* fix list of tuples

* remove mention of pre-2.4 vault method

* Add None return type

Use | instead of typing.Optional or typing.Union
2023-08-01 11:20:20 -04:00
081c60b9d3 Include subcommands in generated man pages (#81378)
Sub commands of `ansible-galaxy role` and `ansible-galaxy collection` are now documented.
2023-07-31 13:04:17 -07:00
32b388b4ca Fix missing command descriptions in manpages/docs (#81366) 2023-07-28 18:01:11 -07:00
f9d674fcfd Fix command doc lookup in man page generation (#81365) 2023-07-28 16:24:04 -07:00
fead654671 Exclude internal options from man pages and docs (#81360) 2023-07-28 14:58:18 -07:00
6db006a5fa fix networking path (#81295)
* now uses class property instead of only relying on network_os variable

---------

Co-authored-by: Martin Krizek <martin.krizek@gmail.com>
2023-07-27 10:59:55 -04:00
010e542a13 Fix blockinfile code comment (#81351) 2023-07-26 18:19:04 -04:00
d5d1c27bf3 Add option to blockinfile to wrap inserted block with blank lines (#81083)
* Add new blockinfile options 'prepend_newline' and 'append_newline' to wrap inserted block with blank lines
2023-07-26 17:38:07 -04:00
4c41562270 remove deprecated datetime.datetime methods (#81323)
* Remove datetime.datetime.utcfromtimestamp and datetime.datetime.uctnow
  from controller code since they are deprecated in Python 3.12.

* Update target side code to use new utcfromtimestamp and utcnow utils in ansible.module_utils.compat.datetime that return aware datetime objects on Python 2.7 and 3.

Co-authored-by: Matt Clay <matt@mystile.com>
2023-07-26 17:26:33 -04:00
923ede4f72 pep8: fix sanity for 3.12 (#81348)
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2023-07-26 14:17:08 -07:00
a5ccc0124f Fix ansible_pkg_mgr is unknown in Kylin Linux (#81314)
Signed-off-by: bo.jiang <bo.jiang@daocloud.io>
2023-07-25 14:45:30 -07:00
6a8c51bb9c fix redis cache setup (#81329)
* use https repo
* increase default download timeout of 10s for slow/lagged connections
2023-07-25 13:09:40 -07:00
2a19c80b89 Refactor test cases to improve unit test quality (#81334) 2023-07-25 11:35:57 -07:00
cd13812e32 Fix ansible_pkg_mgr incorrect in TencentOS Server Linux (#81336)
Signed-off-by: denisecheng <denisecheng@tencent.com>
Co-authored-by: denisecheng <denisecheng@tencent.com>
2023-07-25 17:18:18 +02:00
c8bc393871 Raise the minimum setuptools version to 66.1.0 (#81341)
* Raise the minimum setuptools version to 66.1.0

This is the first version to support Python 3.12.

While Python 3.10 and 3.11 could use an older version, a consistent minimum is easier to work with and test against.

* Fix PEP 517 integration test
2023-07-24 16:02:05 -07:00
5167618e46 Update ansible-test containers to test Python 3.12 with the test venvs (#81330) 2023-07-21 20:15:07 -07:00
48dfe8e215 add Python 3.12 support to ansible-test (#80834)
* update docker containers versions to use newer ansible-test ref in the pre-built venvs

* Allow invoking ansible-test with Python 3.12

* Add python3.12 to the INTERPRETER_PYTHON_FALLBACK

* changelog

* add Python 3.12 as a non-default Python version for the test containers

* Update mypy ignores for Python 3.12

* Add Python 3.12 to CI matrix for unit tests, generic tests, and galaxy

* Update unit test for using the Python 2 collection loader path with Python 3.

Skip the existing test on Python 3.12, since find_module is removed.

Suppress the pre-existing deprecation warnings using the Python 2
codepath with Python 3.

Add a test for Python >= 3.12, which doesn't call find_module.

* Ignore sanity test errors on systems without libselinux present.
2023-07-21 10:23:14 -07:00
efbc00b6e4 Consider all configured collection paths when installing collections (#81243)
* Only install collections which can't be satisfied by a collection in any of the configured paths.

* Improve warning for unexpected collection install path

Fix warning when path is configured, but is a pip-managed path

Normalize the path before validating to fix warning consistency
2023-07-20 18:30:59 -04:00
c5d18c39d8 Update sanity requirements comments (#81321)
Also remove a redundant indirect dependency.

The requirements file updates are being deferred until other changes are required.
2023-07-20 14:31:25 -07:00
99eeaf7da8 ansible-test: cloudstack: bump test container version (#81319) 2023-07-20 14:26:00 -07:00
26d855c87e update ansible-galaxy testserver to use SSLContext.load_cert_chain (#80961)
* update ansible-galaxy testserver to use SSLContext.load_cert_chain for Python 3.12 compatibility
2023-07-20 16:15:13 -04:00
e34807d010 find, stay simple (#81313)
* find, stay simple

* Apply suggestions from code review

Co-authored-by: Abhijeet Kasurde <akasurde@redhat.com>
2023-07-20 15:02:16 -04:00
d20a0c02cc ansible-test - update module_utils/urls.py unit test to support cryptography >= 41.0.0 (#81296) 2023-07-20 09:47:47 -04:00
79560410bf Update user module documentation to include MacOS password change behavior (#80958) 2023-07-19 17:59:32 -04:00
371b62eab1 Add test for 256-color configuration values (#78613)
* Add test for 256-color configuration values

See #78607.

* color is not restricted to 16 choices

 currently supports up to 256, not listing them all
 TOOD: create examples and point to/list the basic 16

---------

Co-authored-by: Brian Coca <brian.coca+git@gmail.com>
Co-authored-by: Matt Clay <matt@mystile.com>
2023-07-19 15:46:47 -04:00
18cbfc688b Add missing skip entries for selinux module_util (#81305) 2023-07-18 18:27:25 -07:00
e964078a83 ansible-test - Pre-build PyYAML wheels (#81300)
This works around Cython failures when attempting to install PyYAML >= 5.4 <= 6.0.
2023-07-18 18:17:48 -07:00
261a12b8a9 Disable cron integration test on Alpine (#81301)
The tests are now failing due to the lack of `libfaketime` in the Alpine repos.
2023-07-18 17:38:37 -07:00
1e929ada6f filter: fix documentation (#81113)
* Updated urldecode documentation
* Misc typo fixes
* Better formatting
* Corrected some example

Fixes: #81112

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2023-07-18 15:14:05 -04:00
528e7859d0 smart connection deprecation version fix (#81262) 2023-07-18 17:19:27 +02:00
894c339df8 Fix stealth exceptions and blocking select() in daemonize() (#81064)
* Fix stealth exceptions and blocking select() in daemonize()

* Add changelog entry
2023-07-17 12:47:57 -04:00
b771e59793 The split filter was added in ansible-core 2.11. (#81275)
I thought it was 'hysterical' ...
2023-07-17 10:00:08 -04:00
9d6179780c Update comment to match correct form parameter (#81270)
Updated `refresh_token` to match value in the form payload from line 63.
2023-07-14 17:39:05 -07:00
765b2bd783 ansible-test - Narrow the scope of some sanity tests (#81273)
* ansible-test - Limit scope of replace-urlopen test

Only ansible-core code and plugins in collections can be expected to rely on module_utils.

* ansible-test - Limit scope of use-compat-six test

Only ansible-core code and plugins in collections can be expected to rely on module_utils.

* ansible-test - Limit scope of no-get-exception test

Only ansible-core code and plugins in collections should be checked for usage of outdated module_utils functions.

* Add integration tests
2023-07-14 17:19:33 -07:00
3f7bf0bcd4 ansible-test - Fix sanity traceback with -e opt (#81271)
Also remove redundant warning about missing programs.

Includes integration tests to verify `-e` does not traceback.
2023-07-14 15:50:14 -07:00
39ef570e16 Remove BOTMETA.yml and sanity tests for it (#81198) 2023-07-14 14:03:52 +02:00
26cb1652bc Add docs and examples to obsolete-files test (#81258) 2023-07-13 16:20:37 -07:00
479928c199 Add missing use case with module purge (#81237)
Co-authored-by: Abhijeet Kasurde <akasurde@redhat.com>
2023-07-13 15:47:06 -07:00
c5e54be5ea apt: Return calculated diff while running apt clean (#81247)
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2023-07-14 05:27:05 +10:00
c3015c5eb1 replace: handle exception while parsing escape char (#81244)
* replace: handle exception while parsing escape char

* Fail early when bad escape character is provided in replace module

Fixes: #79364

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

* Run tests in Python 3.6 or greater env

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

---------

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2023-07-14 05:25:08 +10:00
d373ec572b regex_replace: correct Python function in docs (#81253)
regex_replace calls re.sub()
2023-07-13 10:51:06 -07:00
b6ebb9d41a Replace reboot_command integration test with unit tests (#78956)
Co-authored-by: Matt Clay <matt@mystile.com>
2023-07-13 19:26:21 +02:00
ee12bafe48 deprecate 'smart' connection value (#81218)
Co-authored-by: Jordan Borean <jborean93@gmail.com>
2023-07-13 12:57:26 -04:00
59a791ee3b ansible-test - remove Fedora 37 container and remote support (#81093) 2023-07-13 08:50:15 -04:00
effb494db4 Update wait_for_connection to not reference configure script (#81250) 2023-07-13 17:12:19 +10:00
08307de366 ansible-test - Remove obsolete WinRM setup script (#81249)
The WinRM setup is handled internally by ansible-core-ci now.
2023-07-12 19:52:49 -07:00
8edba0bb72 filter: add documentation for msg parameter (#81110)
* mandatory filter provides `msg` parameter. Document the same.

Fixes: #81105

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2023-07-12 16:02:56 -07:00
b93a628aed Omit hacking directory from MANIFEST.in (#81245)
* Omit `hacking` directory from `MANIFEST.in`

* Update package-data sanity test
2023-07-12 14:43:08 -07:00
3e3fb26b35 Use semantic markup for modules. (#81190) 2023-07-12 10:06:32 -04:00
f2ade88334 Fix yaml syntax in csvfile_lookup example (#81221)
Testing this example gives a parse error.
The correct syntax needs a colon for assignment, not equal sign
2023-07-12 09:57:48 -04:00
1ca03139cc Update regex_* docs (#81016)
* Update regex_* docs
* Remove Python 3 regex link
* Added references to inline regex flags

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2023-07-11 19:38:36 -07:00
7c6564ad0e Revert "define code owners to support branch-protection rules on docs (#81041)" (#81228)
This reverts commit 9117762358.
2023-07-11 16:27:29 -07:00
2915424541 Update env-setup.fish (#81208)
## Description

This commit includes improvements and optimizations to the script:

- Clarified the purpose of the quiet flag with a comment.
- Adjusted conditions for appending to PYTHONPATH and MANPATH variables.
- Enhanced Python executable check for reliability and cross-platform support.
- Improved comments and function clarity.
- Ensured consistency with the original code.

These changes enhance readability, efficiency, and maintainability of the script.
2023-07-11 16:16:14 -07:00
876be11f8c Add pymarkdown sanity test for core (#81220)
* Clean up markdown

* Add pymarkdown sanity test for core

* Update unit test SHA
2023-07-11 14:40:47 -07:00
72e038e823 Remove docs and examples directories (#81011)
* Remove docs dir

* Updates to reflect docs removal

* Fix integration test

* Remove examples dir

* Updates to reflect examples removal

* Remove build_library and build-ansible.py

* Remove refs to build_library and build-ansible.py

* Remove obsolete template

* Remove obsolete template reference

* Remove the now obsolete rstcheck sanity test
2023-07-11 12:40:06 -07:00
38e50c9f81 Convert non-docs *.rst files to *.md (#81217)
* Rename README.rst to README.md

* Change README format from reStructuredText to Markdown

* Fix whitespace in README.md

* Update setup.cfg to use README.md

* Replace changelog placeholder with README.md

* Update package-data sanity test
2023-07-11 11:42:40 -07:00
dce51f4ff4 Module docs fixes. (#81213) 2023-07-11 12:10:16 -04:00
c7eca0e5c0 first_found lookup, let lookup handle templating errors (#81178)
* first_found lookup, let lookup handle templating errors

Avoids case in which TE was not sending valid and templatable entries to the lookup
The lookup already handles the case TE was attempting to itself, so no need for this code anymore.

Co-authored-by: Sloane Hertel <19572925+s-hertel@users.noreply.github.com>
2023-07-11 11:48:33 -04:00
5014a6025e Add space to make linter happy (#81175) 2023-07-11 11:41:27 -04:00
c3f479e378 Add type annotation for connection plugins (#78552)
* Add type annotation for connection plugins

* Use new | syntax instead of Union/Optional

* Fix pep issue

* Use ParamSpec and other minor fixes

* Fix up ParmaSpec args and kwargs type
2023-07-11 11:23:57 +10:00
67b78a17c4 Remove Python 3.9 support for the controller (#80973)
* Remove obsolete Python <=3.9 controller code
* Remove Python 3.9 test controller bootstrapping
* Update test requirements

Co-authored-by: Matt Clay <matt@mystile.com>
2023-07-10 12:01:47 -04:00
73b95db66b fix doc report template (#81202)
* fix doc report template

* Update .github/ISSUE_TEMPLATE/documentation_report.yml

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

---------

Co-authored-by: Sandra McCann <samccann@redhat.com>
2023-07-10 11:56:44 -04:00
faca205ca1 Add multirepo tip to doc issue report (#81140) 2023-07-10 10:40:47 -04:00
7cf15d0732 Use semantic markup for remaining plugins. (#81189)
also change  `ansible_psrp_protocol` for `protocol`  as what matters is the option itself, not what was used to set it
2023-07-10 09:30:33 -04:00
c3af71a2c8 dnf5: utilize automatic gpg check via transaction.run() (#81144)
https://github.com/rpm-software-management/dnf5/pull/607
2023-07-10 15:19:17 +02:00
eb19692f48 Properly disable modularity tests for dnf5 only (#81195) 2023-07-10 10:51:05 +02:00
7b2647f3b2 Re-introduce RHEL 9 modularity testing in CI (#81160) 2023-07-10 09:54:36 +02:00
f4ff6768f3 ansible-test - Remove old pytest-forked constraint (#81185) 2023-07-07 13:10:42 -07:00
3d2ff64264 ansible-test - Fix import sanity test for targets (#81184) 2023-07-06 22:57:10 -07:00
ca3ffbf4c2 ansible-test - remove test remotes: rhel 8.7/9.1 (#81065)
Fixes #80419
Fixes #80420
2023-07-06 11:25:57 -07:00
ad0e082ac0 script inventory plugin, link to dev script howto docs (#80796) 2023-07-06 10:26:06 -04:00
5cf58f9a15 Use semantic markup for docs fragments (#81152) 2023-07-06 09:41:24 -04:00
73dde45f0f ansible-galaxy - add pre-release hint to dependency resolution error (#81147)
* add pre-release hint to dependency resolution error if --pre wasn't provided

Co-authored-by: Sviatoslav Sydorenko <wk.cvs.github@sydorenko.org.ua>
2023-06-30 10:36:12 -04:00
f1ddcb4ae4 Simplify release name tracking and testing (#81151)
Convert the release names list from YAML to plain text, removing the need for YAML parsing in the sanity test.
2023-06-29 10:18:15 -07:00
8c9f5c9106 Remove unused unit test code (#81150) 2023-06-28 16:26:00 -07:00
bcdb82992a user - add parameter for password expiration warning days (#79884)
* user - add parameter to set number of warning days before password expires

Signed-off-by: Norman Ziegner <norman.ziegner@ufz.de>
2023-06-28 17:36:35 -04:00
b06f7de24a Remove unused strategy plugin unit tests (#81146) 2023-06-28 12:07:25 -07:00
0cc50e0673 dnf5: enable now implemented cacheonly functionality (#81141)
Note that this also fixes a traceback caused by backwards incompatible
change in dnf5 where cacheonly was changed from bool to string:
https://github.com/rpm-software-management/dnf5/pull/665/files#diff-ab65249ff7fccadfb2864b6826f6559f7f16fad43fd3bf2da0b4fe8db790d59aR179
2023-06-28 16:05:59 +02:00
63946eaed6 Remove unreachable code in curses unit test (#81138) 2023-06-27 23:24:42 -07:00
5f58775a1f More unit test code coverage improvements (#81136) 2023-06-27 17:38:35 -07:00
a5a4903b03 edited the documentation for 'groups' in user.py (#81114)
* edited the documentation for 'groups' in user.py

* Update user.py
2023-06-27 11:03:20 -04:00
2f820381ea Inventory Script Plugin: raise execution error (#81104)
It adds exception treatment when execute a inventory based on script with the --host argument

---------

Co-authored-by: Everson Leal <everson.leal@sonda.com>
2023-06-26 17:29:59 -04:00
ed8a404f4a add coverage for Python 3.12 (#81125) 2023-06-26 10:38:22 -07:00
e780b5e56d ansible-galaxy - add config option for the default ansible-galaxy timeout (#81108)
allow configuring the default server timeout via env/ini
2023-06-26 13:10:41 -04:00
e22fe9be56 ansible-test add alpine 3.18 as remote (#81109)
* add crun to avoid runc
2023-06-26 10:41:31 -04:00
e535eb625b Remove long obsolete hacking/get_library.py (#81122) 2023-06-23 18:42:48 -07:00
5b586096b3 Remove hacking/fix_test_syntax.py (#81121)
This script is no longer needed, since using tests as filters was removed in 2.9.
2023-06-23 18:31:42 -07:00
7e2b25beac Revert "Add a custom policy for hackers using ansible-test (#68535)" (#81120)
This reverts commit bd9e31fcb0.
2023-06-23 17:36:36 -07:00
82b5544b09 Improve code coverage of unit tests (#81119)
- Remove unused code
- Remove unnecessary code
- Ignore coverage for unreachable code
- Use previously unused code to increase coverage
2023-06-23 16:08:54 -07:00
da2cd157f1 Fix arg splitting and key/value parsing (#80030)
* Improve readability of unit test output

This drops the trailing `-expectedXXX` suffixes from test names generated by parametrize.

* Add more splitter unit tests

This fills in code coverage gaps in the exising unit tests.

* Bug fixes and code cleanup

- Fix IndexError exceptions caused by parsing a leading newline, space or escaped space.
- Fix an AttributeError exception in `parse_args` when parsing `None`.
- Fix incorrect parsing of multi-line Jinja2 blocks, which resulted in doubling newlines.
- Remove unreachable exception handlers in the `parse_kv` function.
  The unreachable code was verified through analysis of the code as well as use of the `atheris` fuzzer.
- Remove unnecessary code in the `split_args` function.
- Add an optimization to `split_args` for the empty args case.

* Add unit tests for bug fixes

The splitter code is now fully covered by unit tests.

* Add another issue ref in changelog
2023-06-22 16:19:52 -07:00
98d1cf7aa2 Deprecate plural collections_paths option (#81063)
* Deprecate plural collections_paths option

* Fix test assumption
2023-06-23 04:41:59 +10:00
a7d2a4e032 display, also proxy warnings and deprecations (#81060)
Use generic proxy for display  methods with decorator
2023-06-22 13:57:59 -04:00
38067860e2 template escaping: use configured variable start instead of default one (#81001)
this will handle escaping correctly in tempaltes that override the default jinja variable tokens
also fix optimization for single var path when overrides happen
2023-06-22 11:40:25 -04:00
c3926268e2 ansible-test - Avoid using atexit module (#81096) 2023-06-21 14:41:25 -07:00
1f9836fe9a Fix typo in to_yaml filter examples (#81094) 2023-06-21 10:13:07 -04:00
bd5b0b4293 Avoid deprecated importlib.abc.TraversableResources (#81082)
* Avoid usage of deprecated importlib.abc.TraversableResources

This fixes ansible-compat test failures with Python 3.12.

* Add deprecated: marker for compat code

Co-authored-by: Matt Davis <6775756+nitzmahone@users.noreply.github.com>

* add declarative deprecation comment to < 3.9 case

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

---------

Co-authored-by: Matt Davis <6775756+nitzmahone@users.noreply.github.com>
Co-authored-by: Matt Clay <matt@mystile.com>
2023-06-20 11:54:06 -07:00
c69951daca ansible-test: remove Ubuntu 20.04 LTS (#81070) 2023-06-20 11:25:12 -07:00
bc68ae8b97 ansible-test: Added Fedora 38 (#81074) 2023-06-20 11:24:08 -07:00
56b67cccc5 Resolve issues on python pre-3.10.6 with collection dirs longer than 100 characters (#81061) 2023-06-15 16:15:11 -05:00
6fead15334 Pylint deprecated comment checker (#81071)
Co-authored-by: Matt Clay <matt@mystile.com>
2023-06-15 16:14:52 -05:00
534f688a53 remove Freebsd 13.1 from test matrix (#81058)
* remove Freebsd 13.1 from test matrix

fixes #80416


Co-authored-by: Matt Clay <matt@mystile.com>
2023-06-15 14:59:33 -04:00
cde15f3c81 Add test support for Python 3.11 on RHEL 8.8/9.2 (#80990)
Fixes #80412
Fixes #80413
2023-06-14 18:16:28 -07:00
c1bc445aa7 ansible-test - Update openSUSE containers (#81062)
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2023-06-14 17:54:43 -07:00
ecbbd7e5d1 Remove Python 3.5 support (#80972)
* Remove Python 3.5 support

* changelog

* add requested changes

* Update changelogs/fragments/remove-python3.5.yml

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

* remove Python3 < 3.5 error handling

* remove Python3 < 3.5 error handling in TE too

---------

Co-authored-by: Matt Clay <matt@mystile.com>
2023-06-15 00:05:50 +02:00
660f1726c8 Register handlers immediately if currently iterating handlers (#80898)
This fixes the issue where handlers notifying other handlers are
not properly run because the notification is not registered unless
another flush_handlers occurs. Instead, if the current host state
is iterating handlers we immediately register the handler to be
run so the notification is not lost.

Fixes #80880
2023-06-14 17:39:20 +02:00
73e04ef2d6 Don't mutate templar.environment, only overlay on local myenv (#81005) 2023-06-13 11:37:17 -05:00
cf803d6d58 Improved return docs (#81006)
* Improved the return docs for modules `sysvinit`
  and `systemd_service`

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2023-06-13 08:23:50 -07:00
f13e35cbf9 dnf5 - enable env groups testing in CI (#81032)
Implemented in https://github.com/rpm-software-management/dnf5/pull/585
2023-06-13 11:20:22 -04:00
440b5fd040 Make sure that values that should be strings are actually strings. (#81029) 2023-06-13 11:19:40 -04:00
ce55e0faf5 Update example in apt_key module (#81017)
* Verify checksum of downloaded key

Fixes: #79892

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2023-06-13 11:17:42 -04:00
9117762358 define code owners to support branch-protection rules on docs (#81041)
* during interim docs/ (and related dirs) split to separate repo, prevent merges that might require a rebase of the target repo
2023-06-12 11:16:40 -07:00
796d41ff18 Bump azure-pipelines-test-container to v4.0.1 @ CI (#80916)
This patch updates the test container used in CI to the new v4 that
defaults to using Python 3.10 and is based on Ubuntu 22.04 Jammy[[1]].

[1]: https://github.com/ansible/azure-pipelines-test-container/pull/17
2023-06-12 09:23:03 -07:00
42ca0803a1 Bump azure-pipelines-test-container to v4.0.1 @ CI (#80916)
* Bump azure-pipelines-test-container to v4.0.1 @ CI

This patch updates the test container used in CI to the new v4 that
defaults to using Python 3.10 and is based on Ubuntu 22.04 Jammy[[1]].

[1]: https://github.com/ansible/azure-pipelines-test-container/pull/17
2023-06-12 09:22:35 -07:00
cf4d4577ac Remove hacking dir dependency from build backend (#81021)
* Copy man generation files into build backend

* Use copied files in build backend
2023-06-09 16:56:48 -07:00
a473bb798d modules/find: param contains: Describe matching behavior (#80744) 2023-06-09 13:47:01 -04:00
6ac0ea3567 Use *.md instead of *.rst for test READMEs (#81009) 2023-06-08 23:04:32 -07:00
faa6d55ee6 Fix Source Mage family mapping (#80985)
* Fix Source Mage family mapping

* Update docs too

* Add changelog fragment
2023-06-09 14:03:39 +10:00
ff359fa8e1 Reorganize CI sanity test matrix (#81004) 2023-06-08 13:07:54 -07:00
b3f1290bcd Remove docs dir dependency from man page build (#81003) 2023-06-08 12:41:45 -07:00
30a8ef0277 Roadmap: Update 8.1.0 ETA (#80998) 2023-06-08 11:58:49 -04:00
6e137433ae Ansible 9 roadmap (#80851) 2023-06-08 09:08:52 +01:00
519caca70c Update modules_intro.rst (#80588) 2023-06-07 17:05:41 -04:00
ef56284f9d Revert "update intersphinx links for Ansible 8" (#80960)" (#80993)
This reverts commit 7a01fb221a.
2023-06-07 12:46:14 -07:00
6fcbed0f3f Simplify conditional.py (#80584)
* Simplify conditional.py
2023-06-07 12:14:07 -04:00
25b3d3a6f7 Check if skeleton is /dev/null while creating home folder (#75948)
* Check if skeleton is /dev/null while creating home folder

* Add test for linux

Co-authored-by: Holger Dörner <h.doerner@bitexpert.de>
Co-authored-by: Brian Coca <bcoca@users.noreply.github.com>
2023-06-07 12:10:21 -04:00
1ecc62ba06 Document lookups using dwim (#80878) 2023-06-07 12:08:52 -04:00
c511a79172 Add simpleinit_msb fact for service_mgr (#80963)
* Add simpleinit_msb fact for service_mgr
2023-06-07 12:07:08 -04:00
fda66eeee0 Sanity Fixes: (#80953)
* Typo fixes
* arguments-renamed
* pep8:E501
* pylint:use-a-generator
* pep8:E231
* use-argspec-type-path

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2023-06-07 12:06:30 -04:00
090a5cdfcf add 2.16 to the release and maintenance table (#80974) 2023-06-07 11:54:23 -04:00
e801921b98 update backport instructions to use 2.15 examples (#80959) 2023-06-07 11:52:42 -04:00
7a01fb221a update intersphinx links for Ansible 8" (#80960) 2023-06-07 11:52:09 -04:00
9e14a85fe3 Added link to argument_spec (#80967) 2023-06-07 11:51:26 -04:00
9a87ae4406 Add 2.16 roadmap items (#80971) 2023-06-07 09:30:24 -05:00
92d5ffda82 Update galaxy_ng container for tests (#80721) 2023-06-07 09:09:01 -05:00
af84f7a00e Update other_tools_and_programs.rst (#80895) 2023-06-07 13:06:43 +01:00
6e325d9e4d Clean up MANIFEST.in (#80688)
* Remove unnecessary MANIFEST.in commands

This eliminates more setuptools warnings during build.

* Sort MANIFEST.in

Now that only include commands are used, the order of the commands no longer effects the build output.
2023-06-06 14:48:16 -07:00
08a647214f Indicate which args can be provided multiple times. Fixes #22396 (#80970) 2023-06-06 12:29:54 -05:00
d210260afc Correct syntax error in the example (#80976)
* Update success.yml
* Update reachable.yml
* Update unreachable.yml
2023-06-06 10:20:29 -07:00
ef3b806dd3 Fix remote_tmp tests so that they actually use the remote_tmp (#80969)
* Fix remote_tmp tests so that they actually use the remote_tmp

* Isolate remote_tmp dir during remote_tmp tests. Fixes #80965

* Do everything without become
2023-06-06 11:24:53 -04:00
742d47fa15 replace deprecated ast.value.s with ast.value.value (#80968)
* replace deprecated ast.value.s with ast.value.value

the s attribute is deprecated since Python 3.8 and emits a warning in
3.12 causing some test failures
2023-06-06 11:22:26 -04:00
aa67d544fc Handle unreachable errors in fetch properly. Fixes #27816 (#80952) 2023-06-06 11:03:22 -04:00
5e550b6086 Update COLLECTIONS_8.rst (#80962)
ansible-core 2.15.1 is expected on 2023-06-19, adjusting the dates accordingly

Fix mention of Ansible-9 for when minor releases (of ansible-8) will stop
2023-06-05 10:05:08 -04:00
0982d5fa98 Fix TypeError when installing subdir collections. Fixes #80943 (#80949) 2023-06-01 15:58:06 -05:00
c069cf88de Added an example of mixed format argv in command module (#80933)
Fixes: #80126

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2023-06-02 05:05:45 +10:00
79677c16f1 add mission survey to docs banner (#80931)
Co-authored-by: Don Naro <dnaro@redhat.com>
2023-05-31 11:57:20 -04:00
e91bf2248f Update manager.py (#80926) 2023-05-31 11:04:15 -04:00
939f2741c6 Docs: Update changelog for Ansible 8 (#80886) 2023-05-30 13:46:24 -04:00
124f33b230 Add Ansible community 8.0.0 porting guide (#80927) 2023-05-30 13:29:22 -04:00
9fb03093b3 set latest version to 8 (#80892) 2023-05-30 17:25:32 +01:00
6011b7c4c1 Update split.yml (#80915)
typo in description
2023-05-30 11:18:48 -04:00
d0686f0f77 fix typo in from_yaml_all.yml (#80911)
mulitple -> multiple
2023-05-30 11:14:24 -04:00
3a1d58bc58 ansible-test - Use raise from to handle exceptions (#80905) 2023-05-26 20:25:17 -07:00
43c31c5dc2 Use isinstance in unit tests for type checks (#80906) 2023-05-26 19:25:26 -07:00
585b82838b Improve code coverage of unit tests (#80904)
* Improve coverage of validate-modules unit tests

* Remove unused galaxy unit test code

* Fix galaxy unit test teardown logic

* Improve coverage of galaxy unit test code

* Improve coverage of galaxy unit tests

* Remove unused code in galaxy API tests

* Remove unused galaxy collection unit test code

* Improve coverage of galaxy collection unit tests

* Remove unused galaxy unit test code
2023-05-26 16:54:11 -07:00
a5bb4c7dee ansible-test - local change detection without --fork-point (#79734) 2023-05-26 14:07:20 -07:00
e88ff32b10 deb822_repository: use http-agent with open_url (#80876)
* Use http-agent in open_url API while getting
  cloudflare content

Fixes: #80809

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2023-05-25 12:09:53 -07:00
09387eaa24 Update dnf5 module to handle API change for setting the download directory. Fixes #80887 (#80888) 2023-05-25 12:13:38 -04:00
0775e991d5 Documentation tweaks for apt repo key management. Fixes #78063 (#80872) 2023-05-25 10:37:59 -05:00
9f4dfff69b Pylint fixes (#80855)
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2023-05-24 11:58:42 -07:00
56f2e65ee7 Remove unused test files (#80879)
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2023-05-24 10:01:40 -07:00
c9f76f6d49 Remove unused import (#80875)
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2023-05-24 09:02:04 -07:00
09b4cae4fb unarchive - ensure src is an absolute path before picking handler (#80738) 2023-05-24 10:56:37 -05:00
86e7cd57b7 Add Ansible community 8.0.0rc1 porting guide (#80873) 2023-05-23 17:42:08 +01:00
d955fb1590 Removed unused get_md5 parameter from stat (#80871)
* removed unused, undocumented `get_md5` parameter from stat module.

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2023-05-23 11:52:23 -04:00
8652b231f2 Align yum_repository documentation with arguments (#80867) 2023-05-23 11:44:42 -04:00
0c7361d9ac URI Module find json sub type (#80745)
* uri: fixed search for json types to include strings in the format xxx/yyy+json
2023-05-23 09:38:05 -05:00
47539a19ea Add Ansible community 7.6.0 porting guide (#80868) 2023-05-23 12:09:06 +01:00
652ddc4078 Fix pylint disallowed-name errors (#80854)
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2023-05-22 11:11:36 -07:00
a551e8db80 eol 2.12 docs (#80850) 2023-05-22 19:08:47 +01:00
61157f6a9e Switch from multiprocessing.Queue to SimpleQueue (#80838) 2023-05-22 10:02:52 -05:00
202195f5e4 Remove unreachable error for removed include_role.static (#80837) 2023-05-22 09:09:47 -05:00
9526338273 validate-modules and docsite build: bump antsibull-docs(-parser) dependencies to new major versions (#80846)
* Bump antsibull-docs-parser version to 1.0.0.

There are no functional changes that affect the functionality used in validate-modules.

* Bump antsibull-docs to 2.0.0.
2023-05-19 16:18:59 -07:00
f4b2d4d4bb Add pipx instructions to install guide (#80833) 2023-05-19 14:51:34 -04:00
10d91db003 [Docs] update node req table for 2.15 (#80823) 2023-05-19 10:22:19 -04:00
4899d4a4d6 simple skip of connection (#80638)
Avoid 'persistent' connection handling if not needed
removed useless connection passing
added property to action classes as indicator/selector
2023-05-19 09:23:27 -04:00
19b85ff415 have docs explain why we import guard (#80569)
Co-authored-by: Matt Clay <matt@mystile.com>
Co-authored-by: Don Naro <dnaro@redhat.com>
2023-05-18 16:38:30 -04:00
be02813d25 fix yes/no to true/false in loop documents etc (#80591) 2023-05-18 16:36:42 -04:00
e4194112a0 Update inconsistency playbooks_checkmode (#80692) 2023-05-18 16:28:21 -04:00
c7e3c91294 Missing space in docs (#80779)
* Missing space between $ and ansible command

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2023-05-18 16:19:50 -04:00
8db9bd7574 Remove deprecated include (#80752)
* Remove deprecated include

* Add tombstone entry for include

* Use string for date

* Use todays date

* Remove uneeded if statement
2023-05-19 05:49:07 +10:00
2253837453 command - Add option to disable argument var expansion (#80512)
* command - Add option to disable argument var expansion

* Use test char that isn't an escape sequence
2023-05-19 05:36:52 +10:00
dbfb0d3cc4 Fix typo in service_mgr.py (#80824)
faild -> failed
2023-05-18 15:10:23 -04:00
070ce87440 Add test for symbolic to octal when others is omitted (#80822)
* Add test for symbolic to octal when others is omitted

Add case when there should be no permissions for other.
And specific permissions for owner and group.

* Fix permissions test by explicitly setting no permissions for others

* Add additional cases where multiple permissions are specified
2023-05-18 15:09:28 -04:00
0a36cd910e Removed testing support for Server 2012 and 2012 R2 (#80778) 2023-05-18 11:02:58 -07:00
0df794e5a4 urls - remove deprecated client key calls (#80751) 2023-05-17 17:17:25 -05:00
b16041f1a9 ansible-test - Fix traceback when mixing sources (#80801)
* ansible-test - Fix traceback when mixing sources

* ansible-test - Refactor layout error handling
2023-05-17 09:07:04 -07:00
2fd64161c1 Fix hard-coded interpreter in test_async_wrapper (#80816) 2023-05-16 16:55:57 -07:00
e837680f4b Use strings for removal_date in runtime metadata (#80815) 2023-05-16 14:23:46 -07:00
2ba24957dd Use subset checks for some collection loader tests (#80812) 2023-05-16 10:29:46 -07:00
c1f2a9ea6c No core irc meeting (#80811) 2023-05-16 11:03:42 -05:00
bf53a26deb Add Ansible community 8.0.0b1 porting guide (#80807) 2023-05-16 09:14:49 +01:00
1ff5d2bf5c update version switcher for 2.15 (#80556) 2023-05-15 20:09:32 +01:00
0830b69059 config lookup, new option to show origin of value (#80651) 2023-05-11 11:54:41 -04:00
156493eed5 ansible-test - Add RHEL 9.2 support (#80755) 2023-05-11 14:36:36 +02:00
aacab0633a ansible-test - Fix handling of long timeouts (#80769) 2023-05-10 17:08:53 -07:00
4c6aa70662 ansible-test - Fix timeout handling (#80764) 2023-05-10 14:55:57 -07:00
93216e276c [sanity-mypy] Ignore re-import warning (#80763)
* get_origin is already imported warning can be
  ignore safely.

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2023-05-10 14:43:39 -07:00
fd341265d0 ansible-test - Avoid use of deprecated utcnow (#80750)
The timestamps are only used by ansible-test, not the junit callback, so this change only impacts ansible-test.
2023-05-10 11:26:49 -07:00
905131fc76 junit-xml - Remove outdated type ignore hint (#80748) 2023-05-09 17:20:41 -07:00
b576f0cda7 fix error if path had wildcard in it (#74723)
* fix error if path had wildcard in it

* add test

* add changelog fragment
2023-05-10 08:58:22 +10:00
7ef8e0e102 Remove unnecessary test case in vault editor (#80741)
* Remove test_real_path_symlink test case
* Check if we do not get `-` return when some value other `-` is passed

Fixes: #80444

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2023-05-09 11:22:41 -04:00
4b0d014d58 setup module, retry facter to handle --puppet errors (#80645)
* setup module, retry facter to handle --puppet errors

facter versions have changed how they deal with the --puppet flag
when puppet is not present, most versions will just ignore it and not error,
but initial versions of facter 4 changed the behaviour (later reverted).

fixes #80496
2023-05-08 16:53:53 -04:00
790e0b0983 ansible-test - Update the NIOS test container (#80739) 2023-05-08 13:53:01 -07:00
5a84ff26df first_found fix no terms option (#76550)
also fix bug with multiple items clobbering previous settings

Co-authored-by: Sloane Hertel <19572925+s-hertel@users.noreply.github.com>
2023-05-08 14:25:25 -04:00
70e0b1f544 docsite build: upgrade sphinx-ansible-theme and antsibull-core (#80734) 2023-05-08 15:31:53 +01:00
932abc0711 Prevent setting arbitrary attrs on Jinja2 envs via overrides (#80715) 2023-05-05 16:18:35 +02:00
cdeb607b1d ansible-test - Always use unique container names (#80724) 2023-05-04 15:41:14 -07:00
2b6d5536d7 Fix docstrings RST markup in ansible-console CLI module (#80719)
* 📝🐛 Fix RST list @ `ansible-console` manpage

Said CLI entrypoint docstring is used to construct the corresponding
manpage. `docutils` were producing the following warning with the
current RST markup used there, as follows:

  :36: (WARNING/2) Bullet list ends without a blank line; unexpected unindent.

This change puts a portion of the first list entry on a separate line
which allows the RST parser stomach it without any problems and
produce correct output without gibberish in it.

* 🎨📝 Use RST inline code @ ansible-console doc

The single backtick syntax was causing things to be interpreted as
italics text. The inline code needs double backticks.
2023-05-04 11:15:31 -05:00
8cd95a8e66 Account for overlays when interacting with Jinja envs (#80705)
Instead of using Templar.environment in Templar.do_template for
accessing/mutating the environment, myenv local variable should be used
because it is the environment used for actual templating. It can either
point to Templar.environment or newly created environment overlay.

Fixes #80605
2023-05-04 14:55:27 +02:00
7eada15d1e Remove unused code from lib/ansible/collections/ (#80712) 2023-05-03 18:41:25 -07:00
d12aa7f69c Add FreeBSD 13.2 to ansible-test (#80698) 2023-05-03 10:24:53 -07:00
2cd1744be3 Use ansible.module_utils.common.text.converters (#80704)
Replace use of old `ansible.module_utils._text` and add a unit test to maintain backwards compatibility.
2023-05-03 08:58:00 -07:00
eea7137449 Fix os.walk issues in package-data sanity test (#80703) 2023-05-02 16:17:00 -07:00
54576cd794 pep517 backend - Copy symlinks when copying source (#80690) 2023-05-02 14:35:59 -07:00
23e2ca91c2 Improve coverage of role unit tests (#80695) 2023-05-02 10:53:42 -07:00
be6f2f43b6 Wording change (#80664) 2023-05-02 16:53:31 +01:00
40fd86c618 Fix typo in comment filter option (#80672) 2023-05-02 11:08:30 -04:00
dbd3bf27ec Add Ansible community 8.0.0a3 porting guide (#80691) 2023-05-02 12:18:00 +01:00
7f48fa0129 Better parse virtualenv_command option for pip (#80624)
Atthe moment if a users wants to protect  virtualenv_command by using
quotes around 'venv', module will fail out as literal parsing is used
at the moment. In order to imrpove things, argparse is leveraged to
parse out passed value to the virtualenv_command

Closes-Bug: #76372

Signed-off-by: Dmitriy Rabotyagov <noonedeadpunk@gmail.com>
2023-05-02 09:52:11 +02:00
251360314d Fix docs-build test to not mutate source tree (#80689) 2023-05-01 17:04:13 -07:00
884215bd1c Improve unit test code coverage (#80683) 2023-05-01 09:41:43 -07:00
d37678c5ff Release tool improvements (#80641)
* Provide reproducible sdist builds.
* Use reproducible wheel builds.
* Add PyPI artifact checks.
2023-05-01 09:30:19 -07:00
06dcb4ad7a Don't include a default for cli as it overrides config with lesser pr… (#80650)
* Don't include a default for CLI as it overrides config with lesser precedence

  connection plugins should already use the same config entries (and more)
  than DEFAULT_TIMEOUT.
2023-05-01 10:20:08 -04:00
1568f07b22 Removes extraneous parentheses; Fixes 80670 (#80671)
* Added missing parentheses; Fixes 80670

* Removes both parentheses.
2023-04-28 15:33:02 -04:00
9bd698b3a7 service module : remove flag confugration from openbsd enable/disable service (#80628)
fixes #66434


* removed flag setting from enable/disable on openbsd
  service was changing permanent config on openbsd, which is not expected from the this module
* if in check mode, module should not stop at enable/disable
* simplify and clean up opensd service enable/disable
* does break for those that were using service for configuring flags
2023-04-27 16:15:24 -04:00
d5e2e7a0a8 [ansible-galaxy] Fix installing signed collections (#80661)
* Fix installing signed collections by using the fqcn, version, source, and type as a unique identifier.

Define __hash__ and __eq__ methods to handle Candidate/Requirement comparison excluding signatures which aren't fully populated until install time.

* Remove PinnedCandidateRequests since it is redundant now.

* Fix verifying against a signed remote when the keyring isn't configured
2023-04-27 16:11:17 -04:00
71f6e10dae Use assertRaisesRegex in unit test (#80663) 2023-04-27 12:43:35 -07:00
058b722a54 Remove terminal viewing docs (#80655)
* ansible-doc command can not handle terminal plugins since they
  are not documentable and configurable. Removing documentation section
  to list them.

Fixes: #80140

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2023-04-27 15:14:23 -04:00
d18d4f84ec _symbolic_mode_to_octal- fix raising ValueError for invalid symbolic modes (#80449)
validate the full user and perm strings instead of just first character

fixes unhelpful unarchive error for some invalid modes
2023-04-27 13:19:37 -04:00
ed749cf0a0 Remove deprecated FileLock class (#80438) 2023-04-27 16:04:09 +02:00
8754d8e1e1 ActionBase: remove deprecated _remote_checksum (#80440) 2023-04-27 13:46:13 +02:00
cc5f8c529b Remove deprecated default.fact_caching_prefix ini config option (#80441) 2023-04-27 12:59:41 +02:00
5ac292e12d Use package_data instead of include_package_data (#80652)
This resolves warnings generated by setuptools such as the following:

_Warning: Package 'ansible.galaxy.data' is absent from the `packages` configuration.
2023-04-26 16:23:26 -07:00
0c63b9622e source module compression setting directly from config (#80647)
* source module compression setting directly from config

no need to proxy via play_context, which can fall out of date w/o constant variable updates.
2023-04-26 17:29:35 -04:00
4d25e3d54f Set the minimum setuptools to 45.2.0 (#80649)
Also update the package-data sanity test to use the minimum setuptools version.
2023-04-26 16:01:56 -05:00
ece8da71ea Add TTY check and argument to disable it (#50603) (#68260)
* Add TTY check and argument to disable it (#50603)

* Fix formatting

* add changelog

* rename flag and updated help description

* add tests for tty check

* replace deprecated uses of assertRaisesRegexp to assertRaisesRegex

* fix yaml syntax

* shorten line 79

* Revert "replace deprecated uses of assertRaisesRegexp to assertRaisesRegex"

This reverts commit cea5fe1655.

* change back to assertRaisesRegexp
2023-04-27 05:55:44 +10:00
b2c0095722 Fix gather parallel (#80597)
* fix meaning of parallel in gather_facts
 * Update docs with note about parallel not always being faster
 * add 'smarter' usage of gahter_timeout for parallel tasks
 * restore async when needed, not always
 * added typing
 * parallelism tests
2023-04-26 11:14:39 -04:00
1e8b889b93 Templar: remove deprecated shared_loader_obj param (#80439) 2023-04-26 17:09:05 +02:00
038ff8b3de Add Ansible community 8.0.0a2 porting guide (#80643) 2023-04-26 12:18:44 +01:00
5f6e1b22a7 Add Ansible community 7.5.0 porting guide (#80642) 2023-04-26 08:52:19 +01:00
850a403226 service_facts, get more info for rcctl services (#80630)
uses rcctl get function to get all settables for a service
2023-04-25 23:53:44 -04:00
5e220416a2 ansible-test - Update the default containers (#80635) 2023-04-25 14:54:04 -07:00
372fc99686 ansible-test - Update pylint to 2.17.3 (#80632) 2023-04-25 12:45:26 -07:00
a2be8915de PlayIterator: remove deprecated methods (#80437) 2023-04-25 09:33:17 +02:00
36df60e226 dnf5: use new API to check package signatures (#80609) 2023-04-25 08:26:05 +02:00
abc58c026b ansible-test - Use FreeBSD packaged setuptools (#80615)
This will avoid issues during bootstrapping caused by breaking changes in setuptools.
2023-04-24 12:13:59 -07:00
989a7d6951 Fix calling v2_playbook_on_notify callback (#80585)
Co-authored-by: Matt Martz <matt@sivel.net>
2023-04-24 17:06:07 +02:00
f4615d69ad tests: replace a mock import with unittest.mock (#80589) 2023-04-21 12:34:36 -07:00
734f38b259 Add GALAXY_COLLECTIONS_PATH_WARNINGS option. (#78487)
* Add GALAXY_COLLECTIONS_PATH_WARNING option.

This allows users to disable warnings from `ansible-galaxy collection
install` about `--collections-path` missing from Ansible's configured
collections_paths.
2023-04-21 08:29:10 -04:00
748f534312 Use target of /usr/bin/dnf for dnf version detection (#80550)
Fixes #80376
2023-04-21 08:53:07 +02:00
68e270d4cc Add note guidelines for additional distributions (#80389) 2023-04-20 15:13:34 -04:00
a4fb670e9c Update DOCUMENTATION.yml (#80579) 2023-04-20 15:03:09 -04:00
791510ccba Vars Plugin Documentation Improvement (#80470) 2023-04-20 15:01:22 -04:00
ed9cd39d0f apt key and repository example security patch (#80381) 2023-04-20 14:49:06 -04:00
9ca863501c note in systemd that systemctl can change behaviour due to diff order… (#80570) 2023-04-20 14:44:08 -04:00
f05abd4540 fix become yes/no to true/false (#80515) 2023-04-20 14:40:41 -04:00
449c628f3d uri module, fix example (#80554) 2023-04-20 14:39:17 -04:00
560d5b00d0 Remove docs references to obsolete test plugins (#80576) 2023-04-19 14:40:58 -07:00
7b50571588 ansible-test - Remove deprecated features (#80558) 2023-04-18 17:17:22 -07:00
1fdeff949c ansible-test - Update default containers (#80559) 2023-04-18 17:16:29 -07:00
ba47dd9ef4 ansible-test - Update pylint to 2.17.2 (#80555) 2023-04-18 13:44:27 -07:00
44794e3ebc Update tools and programs page as per community feedback (#80493) 2023-04-18 14:30:54 -04:00
c1d8130df5 redirect old vmware guide (#80553) 2023-04-18 14:29:28 -04:00
8d685b89f2 Update validate_argument_spec.py (#80547)
##### SUMMARY
Fix example with file lookup, filter 'from_yaml' is required.


##### ISSUE TYPE
- Docs Pull Request

+label: docsite_pr
2023-04-18 11:30:53 -04:00
64fb64643d Fix PolicyRcD.__exit__ docstring (#80528) 2023-04-18 11:17:51 -04:00
0ee7cfb128 Implement checks, and backwards compat change, to move forward with UTF-8 only (#80370)
Co-authored-by: Sandra McCann <samccann@redhat.com>
2023-04-17 17:30:08 -05:00
694c11d5bd argspec - fix validating type for required options that are None (#79677)
* Only bypass type validation for null parameters if the default is None. A default is mutually exclusive with required.

* Prevent coercing None to str type. Fail the type check instead.
2023-04-17 15:42:58 -04:00
964e678a7f ansible-galaxy - fix installing dir sources with a trailing path separator (#79110)
* strip trailing path separator from type=dir sources
2023-04-17 15:24:55 -04:00
676b731e6f ansible-test - Replace pytest-forked (#80525)
- Unit tests now report warnings generated during test runs.
- Python 3.12 warnings about `os.fork` usage with threads (due to `pytest-xdist`) are suppressed.
- Added integration tests to verify forked test behavior.
2023-04-14 15:13:58 -07:00
6aac0e2460 Extend OpenBSDStrategy to also update current hostname. (#80521)
Fixes #80520
2023-04-14 10:41:44 -04:00
2e62724a8a feature: add support for symbolic links when passing "dir" (#80460)
* update the include_vars action plugin to always follow symbolic links when traversing directories
2023-04-14 08:07:08 -04:00
bd6feeb6e7 Validate task attributes with first finalized attrs after loop (#80476)
* Validate task attributes `run_once` and `action` with finalized attrs after individual loop results

* Validate task attribute `ignore_unreachable` using individual loop results

Once there's a way to post validate only certain fields, we can use self._task.post_validate() instead

This replaces the fix introduced in https://github.com/ansible/ansible/pull/80051.
2023-04-13 11:18:38 -04:00
d081ed3616 Adds Ansible 8 Porting Guide to Index Page (#80511) 2023-04-12 16:51:28 -04:00
f3774ae7d4 --syntax-check is only applicable to ansible-playbook. Fixes #80506 (#80507) 2023-04-12 15:24:34 -04:00
362c949622 Add Ansible community 8.0.0a1 porting guide (#80498) 2023-04-12 13:59:08 -04:00
43c5cbcaef Fix galaxy CLI unit test assertions (#80504) 2023-04-12 10:32:59 -07:00
3ec828703f Fix unit test asserts (#80500) 2023-04-12 10:04:42 -07:00
e87802cf2c pep517 backend - Use correct import_module import (#80480) 2023-04-12 10:00:09 -07:00
74b102b33c Fix unit tests returning values (#80499) 2023-04-12 09:59:11 -07:00
bd22b849c6 Fix unclosed files in unit tests (#80497) 2023-04-12 09:51:20 -07:00
09dd80b4ec Last handler defined runs, fix for roles (#79558)
Fixes #73643
* clear_notification method and simplify ifs
* Deduplicate code
* Limit number of Templar creations
* Fix sanity
* Preserve handler callbacks order as they were notified
2023-04-12 09:45:43 -04:00
9026bc5d76 Remove obsolete pkg_resources usage (#80489) 2023-04-11 19:33:57 -07:00
0371ea08d6 ansible-test - Add support for argcomplete 3 (#80482) 2023-04-11 12:03:18 -07:00
62211097cb Expand pylint deprecated plugin to catch ansible.module_utils.common.warnings uses (#80462) 2023-04-11 11:45:56 -05:00
d5f3578369 Fixing bit shift, extra comma, reformatting "copy" test. (#80458) 2023-04-11 12:13:36 -04:00
a7d6fdda66 Update ansible_tips_tricks.rst (#80477)
Fix quotation marks in example
2023-04-11 11:38:02 -04:00
bc3cc426bf fetch_url: remove auto disabling decompress when gzip is not available (#80474) 2023-04-11 11:33:04 -04:00
9f0a9cf20d get_action_args_with_defaults: remove deprecated redirected_names arg (#80473) 2023-04-11 11:31:43 -04:00
2a795e5747 Manage basic.selinux completely, instead of mocking potentially missing module (#80448)
* Manage basic.selinux completely, instead of mocking potentially missing module. Fixes #80436

* pep8
2023-04-11 11:02:20 -04:00
5ddd530d1d Templar: do not add dict to globals (#80475)
All required Jinja2 versions (>=3.0) already do this, see
f9d804ead7
2023-04-11 09:49:00 -04:00
4e9d21ec32 installation_distros: update Fedora section (#80453) 2023-04-11 09:37:58 -04:00
243aea45ce Symbolic modes with X or =[ugo] always use original mode (#80132)
* Symbolic modes with X or =[ugo] always use original mode (Fixes #80128)

Here's what's happening, by way of this mode example: u=,u=rX

At the first step in the loop, the "u" bits of are set to 0. On the next
step in the loop, the current stat of the filesystem object is used to
determine X, not the "new_mode" in the previous iteration of the loop. So
while most operations kind of operate left to right, "X" is always going
back to the original file to determine whether to set x bit.

The Linux "chmod" (the only one I've tested) doesn't operate this way. In
it, "X" operates on the current state the loop understands it is in,
based on previous operations (and starting with the file permissions).

This is an issue with "X" and any of the "=[ugo]" settings, because
they are lookups. For example, if a file is 755 and you do "ug=rx,o=u",
file module produces 0557 and chmod produces 0555.

This really becomes a problem when you want to recursively change a
directory of files, and the files are currently 755, but you want to
change the directory to 750 and the files to 640. In chmod you can do
"a=,ug=rX,u+w" (or "a=,u=rwX,g=rX"), and have it apply equally to the
directory and the files. I can't come up with a single way in the ansible
file module to deterministically, recursively, set a directory to 750
and the contents to 640 no matter what the current permissions are,
as the code currently is.

The fix is to pass in "new_mode" to _get_octal_mode_from_symbolic_perms
in lib/ansible/module_utils/basic.py inside _symbolic_mode_to_octal. And
then take "new_mode" as an argument and use it instead of the filesystem
object stat.st_mode value.

* Fixing my new unit test, fixing bug in test comments
2023-04-10 18:29:10 -04:00
f9534fd7b7 ansible-test - Update default containers (#80468) 2023-04-10 14:29:09 -07:00
2ed4396558 Fix typo in playbooks_keywords.rst.j2 (#80461) 2023-04-10 14:33:40 -04:00
5a44acc704 Update P() semantic markup example (#80464) 2023-04-10 14:30:11 -04:00
a84b3a4e72 Fix misrendered sections in manpage generation
This change fixes bugs in the manpage generator that existed since it
was first added.

It exposes CLI `ARGUMENTS` value to manpage templates.

Before this change, the code contained a typo, causing the `for`-loop
iterate over individual characters of the `'ARGUMENTS'` string rather
than iterating over a tuple. A missing comma was at fault.

The updated code gets rid of the `for`-loop and conditionals since it
seems to have been a premature complexity increase and no other things
than `'ARGUMENTS'` were ever added into the broken iterable.

The functional change is that `arguments` is now always present in the
Jinja2 context, unlike being missing sometimes because of the previous
design (not that it was ever present, because of the bug! sigh...)

The Jinja2 templates perform an `{% if arguments %}` check, letting
the template engine silently ignore the missing variable. The clause
was always falsy, meaning that the arguments section was not included
in the manpages for at least the last 6 years. With this fix, it will
be.

This patch also deduplicates calling `opt_doc_list` @ generate_man.

It was called late in the execution, more times than necessary. This
patch makes sure it happens once by putting it at the top of the scope.

It fixes rendering library and inventory in manpages.

The corresponding Jinja2 templates have blocks wrapped with
conditionals like `{% if inventory %}` and `{% if library %}` but said
variables were never injected into the context, nor were they even
deduced on the Python side of the generator. This means that the
conditional clauses were always falsy, never showing the portions of
the manpages.

The Python script has hints for how the `inventory` variable was to be
calculated, which is confirmed through the Git paleontology efforts.

The block of code that references to the `inventory` bit was
incorrectly checking a variable with a list of nested objects for the
presence of a string which was never going to work.

This patch fixes this check by verifying the CLI flag against the
correct variable containing a list of options and exposes it to the
Jinja2 templates.
It also exposes the `library` variable in a similar way.

The block displaying other binaries in Sphinx CLI docs has been
synchronized with the manpage template.
Previously, the current binary was displayed also. This patch gets rid
of the unwanted trailing comma there too.

Finally, the CLI executables list in the manpage template now reuses
the same variable as the RST template that doesn't need any
post-processing in Jinja2.
Before, it was already used in the RST template so this patch aligns
both templates to use the same logic as they got out-of-sync over time.

PR #80450.
2023-04-08 14:04:59 +02:00
babdec80cc Fix the parsing integration tests (#80454)
Most of the bad_parsing tests were no longer running, with several of them no longer being valid.
The invalid tests have been removed and the valid ones rewritten.
2023-04-07 10:03:45 -07:00
bf4e0166a5 Update password.py documentation (#80297)
* Update password.py documentation with new semantic markup
2023-04-06 16:06:41 -04:00
032881e4f1 documents approaches to octal modes better (#80112) 2023-04-06 15:39:25 -04:00
af6d75e313 Add OpenSUSE to the distro's installation guide (#80308)
* Add OpenSUSE to the distro's installation guide

Similar to the rest of the distros, OpenSUSE distributes ansible and it was
missing.

Signed-off-by: ybonatakis <ybonatakis@suse.com>
2023-04-06 15:27:58 -04:00
ec403db1c7 Document how to run all tasks, even the ones with the never tag (#80315)
Co-authored-by: Martin Krizek <martin.krizek@gmail.com>
2023-04-06 15:20:28 -04:00
a6e0012b8a Update playbooks_templating.rst (#80375) 2023-04-06 15:04:42 -04:00
0460f78081 Documentation changes for #80367 and #80270 (#80391) 2023-04-06 14:55:39 -04:00
db8f1756bc [Docs] communication.rst: Add a hint about adding Matrix shields to READMEs (#80392) 2023-04-06 14:53:17 -04:00
7251938370 ansible.builtin inferred by collection_name == None (#80446) 2023-04-06 13:51:39 -05:00
88a380c8f0 📝 Document macOS user deletion over SSH (#80358)
Co-authored-by: Matt Clay <matt@mystile.com>
Co-authored-by: Don Naro <dnaro@redhat.com>
2023-04-06 18:08:24 +01:00
4029da9a9f Semantic markup docs (#80240)
Co-authored-by: Alicia Cozine <acozine@users.noreply.github.com>
Co-authored-by: Don Naro <dnaro@redhat.com>
Co-authored-by: Sandra McCann <samccann@redhat.com>
Co-authored-by: Matt Clay <matt@mystile.com>
2023-04-06 16:46:03 +01:00
92c694372b Replace validate-modules's semantic markup parser with antsibull-docs-parser (#80406) 2023-04-05 17:45:44 -07:00
96f7fd5539 Extend ansible-doc test with more classic markup. (#80407) 2023-04-05 16:14:35 -07:00
163f297d7f Extend bulk issue creator (#80423)
It can now be used to create feature requests, not just deprecation bug reports.
2023-04-05 15:24:21 -07:00
fc5c0aadc9 Correct bypass_host_loop attribute for group_by (#80380)
This action originally bypassed the host loop, but it does not
currently.
2023-04-05 16:51:25 -05:00
12ce7d2e4e dnf5: fix module/pkg names in the failed respawn msg (#80402) 2023-04-05 11:18:04 -05:00
8d5c250234 dnf5: use the logs API to determine transaction problems (#80401) 2023-04-05 11:17:50 -05:00
6d1e355639 Only use the selectors code path when we are prompt matching (#79931) 2023-04-04 15:20:26 -05:00
460abe0cef Fetch signatures from galaxy after the dependency resolver runs (#80334)
Reduce the number of Galaxy API calls made during dependency resolution by fetching remote signatures afterwards, since these are not used in backtracking.

Reduce the verbosity to `-vvvv` (to match other Galaxy API calls) to see this activity.

Co-authored-by: Sviatoslav Sydorenko <webknjaz@redhat.com>
2023-04-04 14:43:58 -04:00
4f7f7d1c26 Remove old release announcement scripts (#80371)
These have been replaced by `packaging/release.py`
2023-04-04 11:08:44 -07:00
d7e7c2d872 Update URLs in COPYING (#80385) 2023-04-04 10:37:23 -05:00
c1e19e4bdd Fix getting timeout for get mounts facts on Linux (#79847)
* Fix how to get the gather_timeout setting while getting the
mounts facts on Linux.

Issue: #79844
2023-04-04 11:02:41 -04:00
5e131a96c0 bump devel to 2.16.0.dev0 (#80390) 2023-04-03 15:26:32 -07:00
2f647e9617 Implement semantic markup support for Ansible documentation in validate-modules. (#80243) 2023-03-31 14:14:35 -07:00
7fcb9960e6 Use --no-isolation for package-data sanity test (#80377)
The dependencies are already in the sanity test venv. This avoids use of unpinned dependencies and a dependency on a network connection.
2023-03-31 12:29:06 -07:00
4b20191c52 list all tags (including never) when listing tags (#80309)
* Ensure we default to show all tags when listing tags

 'never' was being excluded by default,as it is not part of the 'run tags'
 runtime default ('all'). For listing we now add it to the default 'run tags'.
2023-03-31 11:37:17 -04:00
043a0f3ee8 Fix run_once by instantly tiny post_validate (#78492) (#80051)
Signed-off-by: tu1h <lihai.tu@daocloud.io>
2023-03-31 11:36:44 -04:00
0e509ecf25 Support role extension for semantic markup. (#80305) 2023-03-31 10:52:10 -04:00
a81b787a05 Add new dnf5 module (#80272) 2023-03-31 15:51:48 +02:00
666188892e fix using templated values for include/import role FA (#80320)
* fix using templated values for include/import role options 'public', 'allow_duplicates', and 'rolespec_validate'

* pass templated values without changing the instance

* Fix templating by setting always_post_validate to True and calling IncludeRole.post_validate() instead

ci_complete

* add changelog
2023-03-30 17:20:10 -05:00
a45dd2a01c 🐛📝 Undouble trailing colon @ faq.rst (#80359)
It is causing parsing/representation problems of the following
explicit RST code block.
2023-03-30 12:20:38 -07:00
5d64024f1a ansible-test - Fix packaging change classification (#80360) 2023-03-29 17:54:30 -07:00
d8adc081d8 ansible-test - Update base and default container (#80355) 2023-03-29 14:59:44 -07:00
49b5c80c41 ansible-test - Update sanity test requirements (#80354) 2023-03-29 12:15:25 -07:00
6a66761e0e Remove obsolete release bits (#80347)
Releases are now built using the `packaging/release.py` tool.
This makes the `Makefile` and associated files in `packaging/release/` and `packaging/sdist/` obsolete.
2023-03-29 10:14:39 -07:00
cf44c84396 Add antsibull-changelog and antsibull-docs to other tools and programs page. (#80340) 2023-03-29 11:06:18 -04:00
55c40d4d45 Remove obsolete MANIFEST.in entries (#80346)
The referenced file and directory no longer exist.
2023-03-28 17:11:47 -07:00
0cfdf0ad59 Use a dedicated version helper for the docs build (#80345)
This removes the dependency on the release version helper in the docs-build sanity test.
2023-03-28 17:00:12 -07:00
46362bbd27 Update package-data sanity test (#80344)
The test no longer relies on the Makefile.
2023-03-28 16:44:36 -07:00
052da3c89e Use skip/macos instead of skip/macos/13.2 (#80343)
The reason for the skip won't be going away with future versions of macOS.
2023-03-28 16:11:56 -07:00
1d6f019ce6 Remove obsolete integration test aliases (#80342)
* Remove obsolete integration test aliases

* Remove obsolete `skip/osx` aliases

* Use `skip/macos` instead of `skip/osx` in docs
2023-03-28 13:45:56 -07:00
d2f6ea4179 New deb822_repository module (#80018)
Fixes #77073
2023-03-28 14:34:15 -05:00
29e0a68af2 Add Ansible community 7.4.0 porting guide (#80338) 2023-03-28 14:56:25 -04:00
2e413b74e4 Add work-around for old AZP jobs (#80339) 2023-03-28 11:50:47 -07:00
9faf94468b Enforce that Display.display requires a str (#80327)
* Enforce that Display.display requires a str

* clog frag

* ci_complete
2023-03-28 17:41:02 +02:00
bf74f390af clog (#80336)
(cherry picked from commit 97c8da7783)
2023-03-28 10:25:54 -04:00
fc9415eeb4 "Ansible Lint" IntelliJ plugin added (#80263) 2023-03-28 12:26:45 +01:00
fb6b90fe42 Improve Ansible.Basic.cs tempdir uniqueness (#80328)
* Improve Ansible.Basic.cs tempdir uniqueness

The current tempdir naming scheme can result in the same name if the
remote worker starts at the same time as another. By using the process
id it should add enough uniqueness to avoid this situation.

* Fix sanity issues

* Fix up compile issue on older hosts
2023-03-28 12:25:10 +10:00
8600a1b927 Bump antsibull-docs version in docs-build sanity test (#80326)
* Bump antsibull-docs to 1.11.0.

* Update all requirements for the docs-build sanity test.

* Run again with Python 3.9.
2023-03-27 15:23:47 -07:00
086ae42209 Fix URL processing. (#80295) 2023-03-27 13:54:29 -07:00
ba4505f5cb Ansible.Basic - Improve temporary file cleanup process (#80293)
* Ansible.Basic - Improve temporary file cleanup process

* Add comment on struct value used
2023-03-28 05:57:17 +10:00
8ce102f302 ansible-test - Remove macos/12.0 remote (#80319) 2023-03-27 12:56:13 -07:00
a6bfa82bd0 New upstream release tool (#80179) 2023-03-27 12:40:35 -07:00
93beef053e Improve dirname and basename filter doc (#80054) 2023-03-27 14:17:29 -04:00
93d0253292 Use variable instead of container resource in AZP (#80299) 2023-03-27 10:04:36 -07:00
0fd88717c9 password lookup, handle ident properly when saved (#80251)
* password lookup, handle ident properly when saved

  Currently we format and save ident when present but we didn't account for this when reading the saved file
  Also added some more robust error handling.
2023-03-27 10:22:18 -04:00
016b7f71b1 ansible-galaxy - support resolvelib >= 0.5.3, < 1.1.0 (#80196)
* ansible-galaxy - support `resolvelib >= 0.5.3, < 1.1.0`

<https://pypi.org/project/resolvelib/1.0.1> released on 2023-03-09:

-   <https://github.com/sarugaku/resolvelib/blob/main/CHANGELOG.rst#101-2023-03-09>
-   <https://github.com/sarugaku/resolvelib/releases/tag/1.0.1>

Signed-off-by: Wong Hoi Sing Edison <hswong3i@pantarei-design.com>

* Trigger CI by pinning resolvelib with latest version

Since resolvelib is pre-installed in our test containers, we should temporarily pin the latest version allowed to force the tests to run with that version. Once the tests have passed that commit can be reverted.

Please make those changes without force pushing, so that we keep the reference to the passing CI run. We can squash the commits when merging the PR so the temporary commits won't be in the final commit merged to the devel branch.

Signed-off-by: Wong Hoi Sing Edison <hswong3i@pantarei-design.com>

* https://github.com/ansible/ansible/pull/80196#discussion_r1136003637

Also test resolvelib with multiple supported versions.

Signed-off-by: Wong Hoi Sing Edison <hswong3i@pantarei-design.com>

* Revert "Trigger CI by pinning resolvelib with latest version"

This reverts commit 5518e5dbca.

---------

Signed-off-by: Wong Hoi Sing Edison <hswong3i@pantarei-design.com>
2023-03-27 16:19:23 +02:00
b398613120 Add support for plugin field in seealso. (#80212) 2023-03-23 17:37:09 -07:00
054aa92158 Fix url lookup test to use test container (#80284) 2023-03-23 12:58:57 -07:00
ed4b1afc6c Don't double loop, ensuring that machine formats don't dupe collections onto all paths (#80277)
* Don't double loop, ensuring that machine formats don't dupe collections onto all paths

* Add tests
2023-03-23 12:57:14 -07:00
42355d181a Do not double calculate loops and delegate_to (#80171) 2023-03-23 13:04:09 -05:00
fafb23094e ansible-doc: fix broken seealso links in text output (#80280)
* Fix broken URLs.

* Also remove auto-generated description for modules outside ansible.builtin.
2023-03-23 13:28:05 -04:00
4ea50cef23 validate-modules: check_mode attribute and compare with supports_check_mode parameter (#80090)
Co-authored-by: Brian Scholer <1260690+briantist@users.noreply.github.com>
2023-03-23 09:59:33 -07:00
5388f6020a validate-modules: support plugin see-also (#80244) 2023-03-23 09:48:22 -07:00
6a6824f570 ansible-test - Update CloudStack test container (#80278) 2023-03-23 09:28:23 -07:00
cf8fa5e75c ansible-test - Update sanity test requirements (#80279) 2023-03-22 17:47:06 -07:00
c2cc4225c2 Remove test related targets from Makefile (#80115)
Invoke `ansible-test` directly instead of wrapping invocations with `make`.
2023-03-22 15:51:00 -07:00
2ae013667e ansible-galaxy collection install retry improvements (#80180)
* clog frag

* Fix retries so that each explicit call to _call_galaxy is retried for the correct number of attempts. Fixes #80174

* Extend retry logic to common URL related connection errors. Fixes #80170

* Extend retries to downloading artifacts

* Extend param docs for change

* Rework the exception handling

* Don't be overly broad, reduce to TimeoutError, and BadStatusLine for now

* _download_file needs to raise AnsibleError.orig_exc

* Remove unused import

* Add IncompleteRead

* Add socket.timeout for py39

* Add 502 to retry codes

* Move http error code checking first

* Use itertools.tee to replay the backoff_iterator instead of using a callable

* Actually set a CLI default of 60s for timeout, to prevent implicit galaxy from using 10s as default from Request.open

* Import typing

* fix type hints

* Use http.HTTPStatus instead of int HTTP error codes where feasible

* Split exception handling

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

* Add missing import

---------

Co-authored-by: Sviatoslav Sydorenko <wk.cvs.github@sydorenko.org.ua>
2023-03-22 11:04:56 -05:00
cba3952434 Move Collection requirements to ansible/ansible (#80234) 2023-03-21 16:59:26 -04:00
a2dc5fcc7d Implement semantic markup support for Ansible documentation in ansible-doc. (#80242) 2023-03-21 11:29:45 -04:00
4ca3a29cd2 Bump antsibull-docs version to 1.10.0 to support semantic markup. (#80201) 2023-03-21 10:21:54 -04:00
eebfd71a6d Make PEP 517 mutation tests use pinned old setuptools (#80262)
* Pin setuptools to lowest supported @ PEP 517 test

This allows catching the behavior of builds under old setuptools.

* Stop invoking `setup.py install` in tests

This is not the part we care about since it involves dealing with the
external runtime dependencies rather than building our source
distribution.
2023-03-20 14:53:13 -07:00
7097df3eed 📦 Switch sdist build-system to pure setuptools (#80255)
This patch modifies the in-tree build backend to build sdists that swap
out pointers to it in the `pyproject.toml`'s `[build-system]` section.

The effect of this is that the first build from source (for example,
from a Git checkout) uses our PEP 517 in-tree build backend. But the
produced tarball has `build-backend` set to `setuptools.build_meta`
which is the native build backend of `setuptools`. So any following
builds from that sdist will skip using the in-tree build backend,
calling the setuptools' one.
The good news is that if the first build generated the manpages, they
will be included and won't go anywhere even though, a different build
system is in place.

Combined with #80253, this will make sure not to modify the current
source checkout on that first build.

Co-authored-by: Matt Clay <matt@mystile.com>
2023-03-20 12:01:16 -07:00
888abf5d6e Make isolated source changes @ PEP 517 backend (#80253) 2023-03-20 11:26:53 -07:00
1491ec8019 Update special_variables.rst (#80210)
The usage of a glossary on this page will allow linking to a specific special variable, like on the glossary page, e.g.: https://docs.ansible.com/ansible/latest/reference_appendices/glossary.html#term-Idempotency
2023-03-17 09:55:04 -04:00
fc8203168e uri: improve force_basic_auth documentation (#80211)
Add more details about what "true" and "false" mean for the
force_basic_auth setting. Give example scenarios when clients may want
to use this setting.
2023-03-17 09:41:31 -04:00
0937cc4862 Update connection.rst (#80194) 2023-03-16 16:13:01 -04:00
507fd1bd60 Document debugging conditionals (#80239)
##### SUMMARY
Add a section to the docs describing how to debug conditional statements - how to get Ansible to show you whether your `when:` clause evaluates to `true` or `false`.

I ran into trouble with this and couldn't find anything in the docs. Thought I'd add it.


##### ISSUE TYPE
- Docs Pull Request

+label: docsite_pr
2023-03-16 15:47:01 -04:00
0a6333f7d0 corrected class documentation (#80241) 2023-03-16 15:38:02 -04:00
516cb9a52e fix typo in plugin_docs.py (#80195)
lable -> label
2023-03-16 10:34:08 -04:00
bad8843124 ansible-test - Update git diff handling (#80202)
This change allows ansible-test to work with newer versions of git on AZP.
2023-03-13 15:29:09 -07:00
1c156c0d16 Replace deprecated BadZipfile with BadZipFile (#80198)
* Replace deprecated BadZipfile with BadZipFile

* Retain support for Python 2.7
2023-03-13 05:39:30 +10:00
7ce951ff48 Adjust release schedule docs to four weeks (#80166) 2023-03-10 11:41:45 -05:00
6165dfea40 ansible-galaxy role info - fix unhandled AttributeError
* catch GalaxyError instead of its base class to ensure it will have a http_error attribute
2023-03-09 16:47:13 -05:00
cb2180e286 Fixed typo (#80184)
`uvault` should be `unvault`
2023-03-09 11:21:08 -08:00
f3bc0f18ff ansible-test - Update base and default container (#80178) 2023-03-08 14:38:14 -08:00
85b5f31f75 Update mypy to 1.1.1 (#80175) 2023-03-08 13:11:03 -08:00
b7a0e0d792 copy - fix check mode with remote_src=True (#78624)
* Don't create dest directory in check mode

uncomment existing test

Fix checking for file attribute changes in check mode and add a test
2023-03-08 15:40:01 -05:00
c564c6e21e ansible-test - Update pylint requirements (#80172) 2023-03-08 12:15:02 -08:00
31658031ed ansible-test - Remove pointless comparison (#80168) 2023-03-08 11:06:54 -08:00
cfa7acbc19 Raise an error on invalid FA.isa value (#80040)
Avoids bad definitions of playbook classes
2023-03-08 12:48:43 -05:00
701f8852ec Revert "🧪 Switch macOS 13.2 to 12.0 in CI (#80145)" (#80156)
This reverts commit 326e70c02a.
2023-03-07 23:13:42 -08:00
46c08c4467 move test so it runs when the plugin is modified (#80158) 2023-03-07 17:13:02 -05:00
9a03c8f5b3 update paramiko_ssh unit tests load the connection with plugin loader (#80157)
* Load the paramiko_ssh connection plugin properly using plugin loader so it can use config manager when _connect() is called
2023-03-07 16:05:13 -05:00
a1bff416ed paramiko connection now uses the correct source of data (#79704)
* paramiko connection now uses the correct source of data

* keep orig name

* added missing port to docs

* Update changelogs/fragments/paramiko_config.yml

Co-authored-by: Sloane Hertel <19572925+s-hertel@users.noreply.github.com>

* test ansible_host templating

* added missing private_key_file

* removed all play_context fallbacks

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

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

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

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

---------

Co-authored-by: Sloane Hertel <19572925+s-hertel@users.noreply.github.com>
Co-authored-by: Jordan Borean <jborean93@gmail.com>
2023-03-07 10:09:14 -06:00
694f12d01b Avoid redundant unsafe wrapping in ansible_eval_concat (#80143)
The wrap_var is done in do_template for all concat functions after their
return.
2023-03-07 16:14:52 +01:00
12c1891ce6 Fix spelling and grammar in subelements filter doc (#80137) 2023-03-07 16:05:02 +01:00
367d45facd ansible-test - Fix error with missing pylint home (#80155) 2023-03-06 19:49:21 -08:00
27287b40c0 ansible-test - Fix pylint error with old home dir (#80151) 2023-03-06 17:58:14 -08:00
7c62cdeecd Fix MANIFEST.in includes (#80147) 2023-03-06 15:28:53 -08:00
326e70c02a 🧪 Switch macOS 13.2 to 12.0 in CI (#80145)
* 🧪 Switch macOS 13.2 to 12.0 in CI

The former revealed unexpected flakiness while the latter is the
previous value that was used to be stable. This is a temporary revert.

* Skip lookup_url integration test under macOS 12.0
2023-03-06 14:55:12 -08:00
ca604513db apt_repository, dont assume only missing apt-key will populate stderr (#79827)
fixes #79825
2023-03-06 16:14:35 -05:00
ff3ee9c4bd ansible-inventory prevent duplicating host entries (#80059)
this happened after implementing limits we introduced a bug that a host would be duplicated if it existed in a group's children
2023-03-06 15:46:54 -05:00
1055803c3a docsite requirements path (#80134) 2023-03-03 10:09:40 -05:00
3216e071c7 docs: automatic always tag in gather_facts (#80052) 2023-03-03 10:08:03 -05:00
8fec2d2a82 Add macOS 13 to CI and ansible-test (#79508)
* ✨ Add macOS 13.2 to `ansible-test`

* 🧪 Replace macOS 12.0 with 13.2 in the CI matrix

* Skip `lookup_url` under macOS 13.2

This is due to https://wefearchange.org/2018/11/forkmacos.rst.html
that manifests itself as follows:

    TASK [lookup_url : Test that retrieving a url works] ***************************
    objc[15394]: +[__NSCFConstantString initialize] may have been in progress in another thread when fork() was called.
    objc[15394]: +[__NSCFConstantString initialize] may have been in progress in another thread when fork() was called. We cannot safely call it or ignore it in t
    he fork() child process. Crashing instead. Set a breakpoint on objc_initializeAfterForkError to debug.
    ERROR! A worker was found in a dead state

* 📝 Extend ansible-test change note w/ macOS 13.2
2023-03-03 04:30:30 +01:00
c0e0550bce 🐛 Make integration tests compatible w/ modern Git (#80122)
* 🐛 Make integration tests compatible w/ modern Git

This patch makes use of the `init.defaultBranch` setting to unify
the test across new and old Git versions since one defaults to
`master` and the other uses `main` for the default branch.

Where possible, it uses the `HEAD` committish to avoid having to
normalize the branch name.

The change fixes the following integration tests:

  * `ansible-galaxy`

  * `ansible-galaxy-collection-scm` (recursive collection)

  * `git`

* 🐛Replace `git-symbolic-ref` with a repo template

This custom Git repository template emulates the `init.defaultBranch` setting
on Git versions below 2.28. Ref: https://superuser.com/a/1559582.
Other workarounds mentioned there, like invoking
`git symbolic-ref HEAD refs/heads/main` after each `git init` turned
out to have mysterious side effects that break the tests in surprising ways.

* 🎨 Make Git integration test non-destructive

This patch makes use of the `$HOME` environment variable to trick Git
into using a user-global config generated in the temporary directory.
2023-03-03 02:34:29 +01:00
cc8e6d06d0 Update playbooks_conditionals.rst (#80062)
"changed" was missing from the docs
2023-03-02 14:17:50 -05:00
0521184337 clarify playbook tests (#80073) 2023-03-02 14:14:31 -05:00
841b71c94f Fixing typos (#80045) 2023-03-02 14:04:43 -05:00
809727a7c7 improve password lookup syntax in examples (#80092) 2023-03-02 14:03:26 -05:00
012393e2cd fix link for development guidelines (#80055) 2023-03-02 13:54:42 -05:00
02c49ffe60 Encourage true/false for module documentation (#80060)
Co-authored-by: Felix Fontein <felix@fontein.de>
2023-03-02 13:46:02 -05:00
c8f740cfee Fix typo docs in playbooks_tags.rst (#80117) 2023-03-02 13:32:22 -05:00
352010f9c3 improve doc dependency install steps (#80120) 2023-03-02 13:31:08 -05:00
980ec16422 📦 Drop unnecessary wheel PEP 517 build dependency (#80096)
Code snippets advertising the `wheel` dependency in the
`pyproject.toml`'s `[build-system].requires` setting were a historical
mistake. This has been corrected in
https://github.com/pypa/setuptools/commit/f7d30a95 but many pyprojects
still have `wheel` in their configs.

It is not needed for building sdists and the corresponding setuptools'
PEP 517 hook that provides requirements for building wheels already
esposes this dependency automatically.
2023-03-01 12:07:59 -06:00
292c70368b unarchive - log errors from underlying commands (#75329)
* unarchive - log errors from underlying commands

When a command run by the module fails, log the errors if debugging is enabled.

* Use debug() method
2023-03-01 16:55:14 +01:00
a56428de11 unarchive - properly handle relative path for dest (#75267)
* unarchive - properly handle relative path for dest

* Add integration test

* Return output of underlying commands with increased verbosity

* Revert "Return output of underlying commands with increased verbosity"

This reverts commit a2790c8275cdc5697b65670a0beffdc74b741bf6.

* Warn when a relative destination path was provided
2023-03-01 16:54:00 +01:00
f47bc03599 Relocate the AZP entry point scripts (#80114)
Scripts previously under `test/utils/shippable/` are now under `.azure-pipelines/commands/` instead.
2023-02-28 13:21:11 -08:00
b981a9dfcd add a worker queue to get updates from the main results thread (#79886)
* Create a queue per WorkerProcess to receive intra-task updates
* Update `pause` action to use the worker queue
* Deprecate ConnectionBase()._new_stdin
* Add new `Display`  convenience method `prompt_until` to manage both controller- and worker-sourced prompting without cross-fork stdin sharing, in-worker mechanism to handle request-response over new worker queue.
2023-02-28 12:21:48 -08:00
c2ea56e12e Relocate and refactor ansible-test diff unit tests (#80113)
This provides the same test coverage as the previous tests, without the dependency on git.
It also includes many more specific test cases with assertions, instead of simply relying on the code to not raise an exception.
2023-02-28 11:46:36 -08:00
67bafafbc0 🎨 Convert RST to manpage in-memory @ PEP 517 (#80098)
* Add _convert_rst_in_template_to_manpage arg types

* 📦 Make manpage build dependencies conditional

Previously, said dependencies were declared as unconditionally
required even when manpages not needed to be built. This patch
Makes it so they are only required when needed.

* Correct _generate_rst_in_templates returned type

It was marked as Path before this patch but in fact, it's iterable of
paths.

* 🎨 Convert RST to manpage in-memory @ PEP 517

Previously, the automation was writing a temporary templated RST on
disk and calling a helper CLI script on that. But with this change, it
happens with less unnecessary I/O.

Co-Authored-By: Matt Davis <6775756+nitzmahone@users.noreply.github.com>

* 📦Expose sdist manpage build deps unconditionally

Due to a bug in pypa/build, the `get_requires_for_build_sdist()` hook
is always invoked with `config_settings=None`. This means that we
cannot conditionally extend build requirements in said hook.

As a workaround, this patch makes hook pretend that `--built-manpages`
is always passed.

Ref: https://github.com/pypa/build/issues/559.

---------

Co-authored-by: Matt Davis <6775756+nitzmahone@users.noreply.github.com>
2023-02-28 16:13:41 +01:00
dbcaab1012 Add Ansible community 7.3.0 porting guide (#80106) 2023-02-28 08:43:53 -05:00
060a27f28f Do not use hardcoded httpbin.org in uri tests (#80101) 2023-02-27 16:59:32 -06:00
f64e79be41 sanity tests - ignore pre-release versions for deprecation comparisons (#79185) 2023-02-27 13:23:40 -08:00
39fd899d83 Clarify combine filter examples (#80078) 2023-02-27 09:15:18 -08:00
a895cae5a1 Relocate validate-modules unit tests (#80087)
This allows the validate-modules unit tests to run as part of the regular unit test suite.
2023-02-23 17:47:02 -08:00
2f62db842d ansible-test - Update base and default container (#80086) 2023-02-23 17:19:14 -08:00
c028006aaf Define all processor facts on s390x (#19755) (#79806)
Signed-off-by: Yaakov Selkowitz <yselkowi@redhat.com>
2023-02-23 16:40:14 -08:00
f587856beb Remove straight.plugin dependency (#80084) 2023-02-23 15:37:12 -08:00
dc3c88be8b Remove unused integration test support files (#80081)
* Remove unused integration test support files
* Remove obsolete ignores

ci_complete
ci_coverage
2023-02-23 14:39:45 -08:00
086046d478 Remove unused network test support files (#80080)
* Remove unused network test support files

* Remove obsolete ignores
2023-02-23 13:19:19 -08:00
6bfe6b899a ansible-test - Fix vendoring support (#80074)
- Support loading of vendored Python packages.
- Exclude vendored Python packages from payloads.
2023-02-23 12:45:43 -08:00
56036013cd 📦 Integrate manpage builds into PEP 517 build backend
This patch creates a thin wrapper around the `setuptools`' PEP 517
build backend in-tree. It features an ability to request generating
the manpage files in the process of building a source distribution.
This toggle is implemented using the `config_settings` mechanism of
PEP 517.
One must explicitly pass it a CLI option to the build front-end to
trigger said behavior. The packagers are expected to use the
following call:

    python -m build --config-setting=--build-manpages

This option has no effect on building wheels.

🧪 The change includes integration tests

This test runs building and re-building sdists and wheels with and
without the `--build-manpages` config setting under the
oldest-supported and new `setuptools` pinned.

It is intended to preserve the interoperability of the packaging setup
across Python runtimes.

An extra smoke test also verifies that non PEP 517 interfaces remain functional.

PR #79606


Co-authored-by: Matt Clay <matt@mystile.com>
2023-02-23 21:37:02 +01:00
563833d124 Docs: Clarify note on tags (#80079)
The current wording could be read as "tasks that are tagged *both* configuration and packages" while in fact it is "tasks that are tagged *either* configuration *or* packages"
2023-02-23 11:40:59 -08:00
3fd0e12571 Introduce Delegatable and Notifiable mixin classes (#80077)
* Introduce Delegatable and Notifiable mixin classes

* fix sanity

* fix sanity
2023-02-23 11:32:22 -08:00
43aa47c2af package_facts requires python-rpm on SUSE systems in ansible 2.12.1 (#80041) 2023-02-23 10:28:52 -05:00
5ad77fc7bb fix: jinja complex type transforms doesn't work as documented (#80067)
jinja complex type transforms: dict(somelist| slice(2)) doesn't work as documented. Changed the example to use zip_longest
2023-02-23 10:27:17 -05:00
940fdf5dba consistent booleans for page text and code blocks (#80036)
* consistent booleans for page text and code blocks

* Update check_mode from n to false
2023-02-23 10:24:26 -05:00
ce5471fc9f Update collection_integration_updating.rst (#80037) 2023-02-23 10:21:39 -05:00
998b5c1a06 Clarify when plugin settings are being populated (#79710) 2023-02-22 11:41:44 -05:00
6c3d2a4e51 Use FAs with inheritance only when applicable (#80026)
... and set default value of an attribute on an object
only in NonInheritableFA.

Fixes #79777

ci_complete
2023-02-22 17:18:10 +01:00
ed879954f9 Update playbooks_tests.rst (#79788) 2023-02-22 10:32:26 -05:00
5f6ebebce9 Update ansible-test openshift plugin tests (#80064)
Update ansible-test openshift plugin tests to use config to get server endpoint.

Also update the comment explaining why the tests are disabled.
2023-02-21 14:56:25 -08:00
1108c0f331 Fix markdown in changelog fragment (#80065) 2023-02-21 14:54:32 -08:00
9f02e505d9 add wheel to docsite pre-reqs #79513 (#80061) 2023-02-21 17:03:22 -05:00
bca55d945b ansible-test - Adjust vcenter test plugin behavior (#80063)
The previous change to the default mode of operation for the plugin is now limited to collections.

This enables easier testing of the plugin in core, so the previously removed tests have been restored.
2023-02-21 13:50:32 -08:00
39a5b08ca6 ansible-test - Update base and default container (#80058) 2023-02-21 12:24:29 -08:00
c05d813661 Fix #80020 typos confusing pylint for pytest (#80056) 2023-02-21 08:43:24 -08:00
ecf66c6f82 ansible-test - Update mypy and pylint requirements (#80049) 2023-02-20 20:39:54 -08:00
5e3db6e441 ansible-test - Show Python version before install (#80022)
Always indicate the Python version being used before installing requirements.
2023-02-20 17:55:04 -08:00
e6cffce0eb ansible-test - Allow target prefixes to use _ (#80021)
Integration test target prefixes defined in a `tests/integration/target-prefixes.{group}` file can now contain an underscore (`_`) character.
2023-02-20 17:54:34 -08:00
fe2732b91e ansible-test - Support pylint assertion rewriting (#80020)
Add support for `pylint` assertion rewriting when running unit tests on Python 3.5 and later.
2023-02-20 17:54:20 -08:00
2f8f7fba4c Update lookup to use positional only arg for name to avoid conflicts (#79839) 2023-02-20 13:45:03 -06:00
122de95d85 Add Steampunk Spotter to Other tools list (#80006) 2023-02-20 12:43:18 -05:00
b7ef2c1589 ansible-playbook -K breaks when passwords have quotes (#79837)
Now only 'unquote' when ini config file is the source
2023-02-20 11:58:21 -05:00
72c59cfd98 Avoid trailing spaces in unit test (#80033) 2023-02-17 18:02:20 -08:00
21fc699b77 Remove trailing spaces from lines in YAML (#80032) 2023-02-17 17:00:41 -08:00
a4248a63aa Add missing newlines to YAML files (#80031) 2023-02-17 16:34:49 -08:00
967a88963f Update docs requirements to latest package versions (#79930)
Co-authored-by: Matt Clay <matt@mystile.com>
2023-02-17 13:32:21 -05:00
f841c2803a update banner' (#79971) 2023-02-15 16:02:13 -05:00
54ff9afa10 Data tagging delayed to 2.16 (#80011) 2023-02-15 14:47:12 -06:00
1e6b8249e7 Add condition that causes a when to skip a task to output msg (#78918)
* Add condition that causes a when to skip a task

* Fix up tests

* Use false_condition instead of failed_condition

* Remove formatting accidentially added

* Fix sanity
2023-02-15 08:49:30 +10:00
bd329dc543 Make using blocks as handlers a parser error (#79993)
Fixes #79968
2023-02-14 15:00:01 -06:00
117cf0a44b ansible-test - Disable the pep8 E203 rule (#79966)
The `E203` rule in `pycodestyle` is not fully PEP 8 compliant.
Disabling it provides compatibility with the output of the `black` code formatter.
2023-02-14 12:39:04 -08:00
67d49734f7 ansible-test - Support Podman 4.4.0+ 2023-02-14 12:17:42 -08:00
930c2137d3 Revert "Disable F37 podman tests for ansible-test (#79998)"
This reverts commit 875a4ec242.
2023-02-14 12:17:42 -08:00
d67b436eba ansible-test - Improve pylint backwards compat (#79997) 2023-02-14 11:34:39 -08:00
875a4ec242 Disable F37 podman tests for ansible-test (#79998)
The recent update from podman 4.3.1 to 4.4.1 has broken container management.
Removing the tests from the CI matrix until the issue is resolved.
2023-02-14 09:54:08 -08:00
75274021d3 fixes typo in Ansible 7 roadmap (#79996)
Co-authored-by: Alicia Cozine <acozine@users.noreply.github.com>
2023-02-14 11:54:23 -05:00
0946ee2f14 adds roadmap for Ansible 8 (#79598) 2023-02-14 11:19:19 -05:00
556dadba6d user - fix comparing existing group names to group IDs (#79981) 2023-02-14 16:08:02 +01:00
715ab99462 ansible-test - Improve code formatting (#79983)
* ansible-test - Add blank lines after docstrings

* ansible-test - Preserve formatting of arg pairs

* ansible-test - Remove unused string

* ansible-test - Remove pointless dict() usage

* ansible-test - Clean up initial func arg indenting

* ansible-test - Clean up constructor arg indenting

* ansible-test - Clean up func arg wrapping

* ansible-test - Clean up comma and paren placement
2023-02-13 10:49:58 -08:00
43487c6581 ansible-test - Enable unused-import pylint rule (#79912)
This was previously enabled for core. This change enables it for collections.
2023-02-13 10:09:05 -08:00
10bc8af5a2 ansible-test - Remove auto format pylint rule (#79985) 2023-02-13 09:21:11 -08:00
e2f147bcec ansible-inventory, add --limit option (#79596)
* ansible-inventory, add --limit option

* also graph

* optimize the when not providing limit

* added tests and clog

* avoid empty groups, fix tests

* i swear there as an ignore_errors there already!!?!?!?

* Fix stdout test fallback

Co-authored-by: Sloane Hertel <19572925+s-hertel@users.noreply.github.com>

* simpler approach using subset against inventory directly

* tyupose

* renamed funciton to what it actuall does
got yaml in line with others about removing empty groups

* have graph ignore limts, also note same for --host

* fixed typo long line

* better test

* cause hosvars are not a thing

---------

Co-authored-by: Matt Davis <6775756+nitzmahone@users.noreply.github.com>
Co-authored-by: Sloane Hertel <19572925+s-hertel@users.noreply.github.com>
2023-02-13 11:07:10 -06:00
58d84933fc ansible-test - Clean up indentation and spaces (#79980) 2023-02-10 14:53:36 -08:00
71f2e777ed Update mypy to version 1.0.0 (#79963) 2023-02-09 16:52:31 -08:00
d47a848219 fix core devel doc output (#79902) 2023-02-09 14:22:15 -05:00
ceafb5411a Add an integration test to ensure that defaults don't count towards mutually exclusive (#79949) 2023-02-09 14:18:27 -05:00
b5ff981369 Change yes to true in uri-module (#79934) 2023-02-09 14:15:07 -05:00
d43d8274b1 Remove unneeded fallback code for nested defined/undefined tests (#79960)
* Remove unneeded fallback code for nested defined/undefined tests

The code used to handle defined/undefined tests on objects containing
nested undefined variables. Due to changes in lazy evalution of Jinja2
expressions it is no longer needed, see #56116.
2023-02-09 10:35:46 -06:00
243d1b5e3d Replace deprecated stacked @classmethod and @property (#79952) 2023-02-09 08:51:18 -06:00
09e0fb3516 Change ansible_job_id format (#79951)
* Change ansible_job_id format

...to be something that does not resemble float or other type which
value could be changed by literal_eval that jinja2_native uses.

Specifically the format of '%d.%d' is converted from str to float and
then back to float which may result in truncating the number resulting
in the job not being found because the job id does not exist.
2023-02-09 08:49:07 -06:00
e1d298ed61 don't ignore templated _raw_params that k=v parser failed to parse (#79913)
fixes #79862
2023-02-08 17:54:46 -06:00
2525d0a136 basic.py - Perform Python version check earlier (#79954) 2023-02-08 17:19:40 -06:00
e6900f5cad pycompat24 - Remove support for Python <= 2.5 (#79953) 2023-02-08 15:44:59 -06:00
fcdd7493ae improve password_hash warning for unsupported algorithms (#79872)
* password_hash - give a warning for unsupported algorithms (that raise a TypeError)

* add suggested changes, a test and changelog
2023-02-08 11:46:07 -08:00
9d65e122ff Fix detection of available hashlib algorithms (#79946)
* Fix detection of available hashlib algorithms

Detection of hashlib algorithms now works on Python 3.x.
The new implementation works on Python 2.7 and later.

Test coverage is provided by both integration and unit tests.

* Add additional details about hashlib in docs
2023-02-08 09:27:59 -08:00
dc99005820 Rst fixes (#79939)
* fix rstcheck errors for 6.1.1
* spell shell correctly
2023-02-08 08:02:38 -08:00
0793833847 ansible-test - Fix collection delegation (#79947) 2023-02-08 00:24:20 -08:00
497d296ed6 Enable pylint rules to detect pointless statements (#79944)
Also instruct `git blame` to ignore the commit used to convert pointless strings to comments.
2023-02-07 21:11:51 -08:00
716631189c Fix "pointless" strings detected by pylint (#79943)
Convert these strings to comments, since they are not valid docstrings.
2023-02-07 16:36:29 -08:00
02f6e40534 Clean up pointless statements (#79941)
* Add ignores for intentional pointless statements

* Remove redundant docstring

* Fix function docstring placement
2023-02-07 14:46:33 -08:00
1ba100a3b4 Fix pointless statements in unit tests (#79940) 2023-02-07 14:00:38 -08:00
fa1564c548 include_vars - document hash_behaviour + dir (#79790)
* document that hash_behaviour does not apply to individual files of variables when using the dir option

* add tests
2023-02-07 16:31:08 -05:00
c8c1402ff6 ansible-test - Fix file permissions for delegation (#79932)
* ansible-test - Fix file permissions for delegation

* Set more restrictive permissions for SSH key

* Check all execute bits, not just owner

* Add a breaking_changes changelog entry
2023-02-07 12:18:20 -08:00
c7c991e79d quiet default ansible-doc integration test output (#79921)
* quiet default ansible-doc integration test output 

* typical non-verbose output was exceeding 27k lines per fun
* disables `set -x` unless `-v` is passed to the script (eg when ansible-test is called with `-v` or `--retry-on-error` adds it on the second try
* added simple progress echoes
* suppress some grep output

* only enable `set -x` for >= `-vvv`

* fix shellcheck default complaint
2023-02-07 16:20:57 +01:00
5f947f867c make this a warning, not a comment (#79928)
Co-authored-by: Alicia Cozine <acozine@users.noreply.github.com>
2023-02-06 16:12:11 -05:00
24519f3bd1 Update example to always init ANOTHER_LIBRARY_IMPORT_ERROR (#79927) 2023-02-06 13:44:10 -06:00
32672c6326 Improving the RETURN and its docs on the apt_repository module (#79658)
* Improving the documentation on how we generate the default value of the filename parameter

* fix pep8

* removing unnecessary documentation and improving the module's return

* making the RETURN docs

* pep8

* version_added and changelog

* module._diff

* module._diff fix

* add rudimentary tests for new outputs

---------

Co-authored-by: Matt Davis <mrd@redhat.com>
2023-02-06 10:56:21 -08:00
402ae0aa5d ansible-test - Remove old containers and remotes (#79929) 2023-02-06 10:49:56 -08:00
ce6e53e1f6 Remove another unwanted comma from pause action (#79926) 2023-02-06 11:00:20 -05:00
379058e10f Update collections.abc imports (#79911)
* Update `collections.abc` imports

- Use `six.moves` for modules and module_utils
- Use `collections.abc` for controller code

This avoids using `ansible.module_utils.common._collections_compat`,
which was added before the vendored `six` was updated to provide these
imports.

* Update _collections_compat to use six.moves

Also update the custom pylint rule to reflect this change.
2023-02-03 16:22:40 -08:00
e658995760 ansible-test - Enable pylint unused-import for core (#79910) 2023-02-03 15:42:09 -08:00
4706af58ab ansible-test - Enable trailing-comma-tuple pylint rule (#79909) 2023-02-03 15:19:35 -08:00
3b4f3c066a Ignore necessary unused imports in module_utils (#79904) 2023-02-03 14:50:39 -08:00
9e2aad6e51 Remove unwanted comma from pause action (#79908) 2023-02-03 14:41:32 -08:00
51fadd0aac Clean up unused imports in plugins (#79899) 2023-02-03 14:40:55 -08:00
833909ac19 Clean up unused imports in core (#79900)
* Clean up unused imports in core

* Add changelog fragment
2023-02-03 14:35:09 -08:00
b3307f1aa7 Remove unused stdlib imports from module_utils (#79905) 2023-02-03 14:22:57 -08:00
639e3e30d7 Remove unused internal imports from module_utils (#79906) 2023-02-03 14:20:44 -08:00
2fa8ee503c Clean up unused imports in modules (#79898) 2023-02-03 14:16:06 -08:00
0cf9db6fc2 Clean up unused imports in ansible-test unit tests (#79897) 2023-02-02 16:38:34 -08:00
ca54b7b26d Clean up unused imports in sanity tests (#79896) 2023-02-02 16:24:31 -08:00
7495070b83 Clean up unused imports in integration tests (#79895) 2023-02-02 16:15:03 -08:00
e69ef1b249 Clean up unused imports in hacking directory (#79894) 2023-02-02 16:00:50 -08:00
25d859f8fb Clean up unused imports in unit tests (#79893) 2023-02-02 15:52:38 -08:00
d637e87a9e user - Remove invalid return docs (#79891) 2023-02-02 12:55:27 -08:00
0a00263a53 Use arg validation in debug action (#79866)
* Use arg validation in debug action. Fixes #79862

* Add clog frag

* Move the msg default into the argspec
2023-02-02 11:21:59 -08:00
1c01eab3fb Remove irrelevant line (#79865)
Remove irrelevant comment line form example code
2023-02-02 11:19:15 -08:00
0ab53aefc9 Update dnf.py (#79679) 2023-02-02 14:18:08 -05:00
913e4863af Description for changing User ID to match user value (#79470) 2023-02-02 14:17:18 -05:00
d8dc76e134 Mentions 'meta: flush_handlers' task (#79542) 2023-02-02 13:19:08 -05:00
07f1a1b7dc docsite: bump antsibull-docs, reference collection env var index (#79666) 2023-02-02 13:17:32 -05:00
1fd0265e22 ansible-test - Update default containers (#79887) 2023-02-02 09:31:30 -08:00
d48d1c23df ansible-test - Specify config path in plugin error (#79881) 2023-02-02 00:21:38 -08:00
91807695c3 Remove unused unit test code (#79879)
* Remove unused test fixtures

* Removed unused _old_dump_load_cycle method

* Remove Python 2.x compat

* Remove unused code

* Remove unused context manager

* Fix cowsay test

- The test no longer depends on another test to initialize config.
- Also remove unreachable code.

* Remove Python 2.x compat
2023-02-01 16:00:57 -08:00
0a53309f47 ansible-test - Update pylint to 2.16.0 (#79878) 2023-02-01 12:40:36 -08:00
58461bc204 Remove outdated note on relative imports in docs (#79873) 2023-02-01 12:23:59 -05:00
fa382670dc maintainers_guidelines.rst: add a link to collection release guidelines (#79859) 2023-02-01 09:08:37 +00:00
9d42447fa5 Add Ansible community 7.2.0 porting guide (#79867) 2023-01-31 17:00:31 -05:00
652a74e087 AddType - Support compiling with /unsafe C# code (#79853)
* AddType - Support compiling with /unsafe C# code

* Update Ansible version in docstring
2023-01-31 10:23:12 +10:00
d16ec2455d Add tests to cover win_reboot incidental paths (#79856)
* Add tests to cover win_reboot incidental paths

* Fix sanity issues
2023-01-31 10:10:30 +10:00
c33c8cf086 Remove unused and unreachable unit test code (#79854) 2023-01-30 15:29:17 -08:00
1dce45c42d ansible-test - Update base and default containers (#79846) 2023-01-30 12:32:47 -08:00
83fe75db07 Ansible.Basic.cs - Fix compile error on PS 7.3.x (#79848) 2023-01-31 06:09:43 +10:00
10f0e5f6d4 Remove dev_guide stubs (#79795)
* Remove dev_guide stubs

* Remove Cisco ACI Dev Guide
2023-01-30 13:46:14 -05:00
58f0950638 [Docs] add doc links to documentation_contributions.rst (#79840) 2023-01-30 11:34:36 -05:00
722fc05c31 [Docs] add easyfix/good first issue/docs links (#79830) 2023-01-30 11:18:52 -05:00
44dcfde9b8 Improve documentation on requirements.yml (#76140)
Makes it clear that user can use range identifiers with collection
versions inside requirements.yml files.
2023-01-26 17:08:59 -05:00
65eb5c0a9f Update dev_guide.rst (#79625) 2023-01-26 16:50:15 -05:00
6cd1a1404a docs: Extend password entry of ansible.builtin.user (#79694)
* docs: Extend password entry of ansible.builtin.user

Clarify that `password` sets the password hash.
Not the actual password.
Fixes part of  #79684
2023-01-26 16:30:48 -05:00
2164d5699c Expand docs for the import sanity test. (#79768)
* Expand docs for the import sanity test.

* Remove note about Python 2.7 compat.

It should not be needed since there is a sanity test to enforce use of `__metaclass__ = type`.

* Improve introductory paragraph.

* Fix link typo.
2023-01-26 12:38:26 -08:00
321848e98d fix installing collections from git repos that contain MANIFEST.json (#79808)
* add null 'manifest' key to metadata for git repo collections containing MANIFEST.json

changelog

* set to Sentinel instead of None

* Test installing a collection in a git repo that contains a MANIFEST.json

* fix test

* Update changelogs/fragments/ansible-galaxy-install-git-src-manifest.yml
2023-01-26 11:15:18 -08:00
52d3d39ffc ansible-test - Deprecate the foreman test plugin (#79821) 2023-01-25 16:51:43 -08:00
7e53ec3c01 ansible-test - Update the NIOS test container (#79820) 2023-01-25 16:31:31 -08:00
739bc8bb6c ansible-test - Update sanity test requirements (#79819)
Also update core sanity test requirements, except mypy (already updated) and docs-build (update separately).
2023-01-25 16:05:25 -08:00
27cd5e77d8 Update mypy and its dependencies. (#79812)
* Update mypy and its dependencies.

* Fix requirements.

* Remove unnecessary matching constraints.
2023-01-25 12:46:09 -08:00
f4a38a787b Drop requirement for matching sanity constraints
Each sanity test uses its own virtual environment, so there is no risk of conflicting requirements between tests.

It may still be a good idea to make an effort to keep frozen requirements in sync between tests.

Making it a hard requirement unnecessarily complicates updating individual tests and increases the risk of incorrect manual changes.
2023-01-25 11:31:02 -08:00
281474e809 strategy fix invalid variables being registered (#79706)
also added tests for normal and bad cases
2023-01-25 14:28:18 -05:00
7329ec6936 ansible-test - Update CloudStack plugin container (#79813) 2023-01-25 11:22:28 -08:00
Jo
48e6bf8d27 Fix: documentation for per-task timeout (#79715) 2023-01-25 19:21:02 +00:00
d7a4152851 doc fix for platform content #79794 (#79801) 2023-01-25 19:20:03 +00:00
5fb8bc3ddb Bump acme test container. (#79783) 2023-01-25 08:53:23 -08:00
330af433f3 Use raise ... from instead of six.raise_from 2023-01-25 16:21:27 +01:00
6cb6d655b3 [Docs] maintainers_guidelines: add WG and real-time chat request info (#79750) 2023-01-25 14:50:18 +00:00
7ab3de7ee8 correct examples to use removed_from_collection not collection_name (#79803) 2023-01-25 09:36:03 +00:00
a3b7863098 validate-modules - Remove __future__ limits (#79800)
* validate-modules - Remove `__future__` limits

Limits on specific `__future__` imports are handled by other sanity tests.

* Add integration test for module/plugin imports.
2023-01-24 13:25:32 -08:00
10eda5801a Fix conditionally notified include handlers (#79804)
Fixes #79776

ci_complete
2023-01-24 16:26:25 +01:00
c9f20aedc0 ansible-test - Fix various type hinting issues. (#79798)
* ansible-test - Add missing type hints.

* ansible-test - Remove redundant type hints.

* ansible-test - Fix return type annotations.

* ansible-test - Add assert, casts to assist mypy.

* ansible-test - Fix incorrect type hints.

* ansible-test - Remove no-op code.

* ansible-test - Fix incorrect types.

* ansible-test - Fix method signature mismatch.
2023-01-23 16:56:07 -08:00
5f58015527 ansible-test - Remove obsolete DirectoryTarget.
This code has been unused since at least the 2.9 release.
2023-01-23 16:08:58 -08:00
29b20f68e6 ansible-test - Deprecate the govcsim container.
Also remove the integration tests for the `vcenter` test plugin, since the tests relied on using the simulator.
2023-01-23 15:48:12 -08:00
f2707d1fbc fix filename for sidecar docs (#79779) 2023-01-23 10:42:55 -05:00
4f5ed24972 Fix traceback in template action with ANSIBLE_DEBUG=1 (#79764)
Fixes #79763
2023-01-20 09:39:18 +01:00
868d721d8c Flush output in sanity requirements update script. (#79774)
This keeps the subprocess output under the correct heading.
2023-01-19 21:49:04 -08:00
8e80b03b33 document where to save cloud config files (#79412) 2023-01-19 15:25:16 -08:00
5d71ace583 Fix broken docs links. (#79769) 2023-01-19 12:47:10 -08:00
11a27eefa2 communication.rst: improve (#79751) 2023-01-19 15:04:21 -05:00
97993eeb10 Fix broken link for inventory script examples (#79762)
These scripts were removed from community.general in https://github.com/ansible-collections/community.general/pull/2696 and moved to ansible-community/contrib-scripts per https://github.com/ansible-community/community-topics/issues/16#issuecomment-853317111
2023-01-19 15:03:14 -05:00
8a7185c224 Argument spec alias handling: actually report deprecated aliases in suboptions, and fix warning message in suboptions when two aliases of the same option are used (#79740)
* Normalize deprecation records.

* Fix alias deprecations in suboptions.

* Report in which option an alias warning happened for suboptions.

* Add deprecation tests for suboptions.

* Also test deprecation in list of dicts.

* Adjust unit tests for toplevel alias deprecation field name change.
2023-01-19 11:58:02 -05:00
b5b7f9bce2 complex_data_manipulation.rst: fix typo (#79758) 2023-01-19 16:54:52 +00:00
6c0559bffe Show filename additionally if missing secrets prevents decryption (#79732)
Fixes #79723
2023-01-18 09:37:33 +01:00
cf50d8131f Fix regex filter docs (#79736)
* Fix notes in regex_replace doc

The documentation says that this maps to 'regex.replace' when it should say 're.replace'. The distinction is important because of the third-party 'regex' module that has more features than the built-in 're' module. https://pypi.org/project/regex/

* Fix notes in re.search docs

The documentation says that this maps to 'regex.search' when it should say 're.search'. The distinction is important because of the third-party 'regex' module that has more features than the built-in 're' module. https://pypi.org/project/regex/
2023-01-17 16:14:02 +01:00
b756a08d89 Truthy value should be one of false or true (#79730)
Otherwise ansible-lint complains: https://yamllint.readthedocs.io/en/stable/rules.html#module-yamllint.rules.truthy
2023-01-17 16:04:44 +01:00
40dd762e68 add task for testing to remove gpg key using key id (#79729) 2023-01-17 16:03:30 +01:00
1852f9fab4 Support test and filter plugins in ansible-doc sanity test (#77737)
* Support test and filter plugins in ansible-doc sanity test.

* Move integration target non-filter file check_pylint.py from filter/ to plugin_utils/.
2023-01-16 14:15:55 -05:00
1a47a21b65 Fix reporting of deprecated arguments for modules. (#79681) 2023-01-13 16:55:48 -05:00
e38b3e64fd Correctly count rescued tasks in play stats (#79724)
Fixes #79711

ci_complete
2023-01-13 05:18:41 +10:00
74cdffe30d Better json content type detection for uri (#79719)
* Better json content type detection for uri

* typo
2023-01-13 05:11:31 +10:00
2143bcd6b1 Ensure we are passing ciphers to all url_get calls (#79718)
* Ensure we are passing ciphers to all url_get calls. Fixes #79717

* Add clog frag

* Fix tests
2023-01-13 05:10:09 +10:00
8b032150a4 document adjacent docs (sidecar) (#79056)
* Update docs/docsite/rst/dev_guide/developing_locally.rst
Co-authored-by: Don Naro <dnaro@redhat.com>
2023-01-12 11:47:07 -05:00
61d5586c7c Use uri in uri test instead of get_url. 2023-01-11 11:30:36 -08:00
fb32e92b1a communication.rst: remove Tesing WG info 2023-01-11 10:14:41 -08:00
50a673f9e7 normal action plugin: remove superfluous code (#79690)
* Remove obsolete 'if'

The result dict returned by super.run() will never have a 'skipped' entry.
Without the if, it is more clear that wrap_async is actually defined at the end of the function.

* Remove more dead code.

The result dict will also not contain invocation.

* Remove notes.
2023-01-11 15:07:00 +01:00
ee33be9484 ansible-test - fix ps argspec check inside cmdlet (#79699)
* ansible-test - fix ps argspec check inside cmdlet

* Added error condition test

* Fix sanity problem
2023-01-11 08:05:50 +10:00
602824db1d Fix broken reference to FAQ (#79621) 2023-01-10 19:33:27 +00:00
56d142350d Add support for importlib.resources (#78915)
* Add support for importlib.resources

* Remove the importlib.resources imports

* return the correct data

* Some code comments, and re-order for consistency

* Disallow traversing packages below an individual collection

* Add a traversable class for namespaces

* Re-use variable

* Utilize itertools.chain.from_iterable

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

* Simplify logic to check for packages from ansible loaders

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

* Just a generator expression, instead of a generator

* docstrings

* Add comment about find_spec for our namespaces

* Add some initial unit tests for importlib.resources

* normalize

* Utilize importlib.resources for listing collections

* collections_path is already in config, just use config

* install uses a different default for collections_path

* Remove unused import

* Remove duplicate __truediv__

* Bring back TraversableResources

* Apply some small suggestions from code review

Co-authored-by: Sviatoslav Sydorenko <wk.cvs.github@sydorenko.org.ua>
Co-authored-by: Matt Davis <6775756+nitzmahone@users.noreply.github.com>

* Remove cross contamination between plugin loader code and CLI code

* Remove unused import

Co-authored-by: Sviatoslav Sydorenko <wk.cvs.github@sydorenko.org.ua>
Co-authored-by: Matt Davis <6775756+nitzmahone@users.noreply.github.com>
2023-01-10 11:09:57 -06:00
e41d2874a6 Fix undef() example to a valid Jinja template (#79701) 2023-01-10 12:58:46 +00:00
55f9d7f71f Docsite: remove dead Lockdown Working Group from Communication guide (#79693) 2023-01-10 12:44:39 +00:00
65efa4b97f Docsite: add Security Automation Working Group to Communication guide (#79692) 2023-01-10 12:43:36 +00:00
fe7d488a1b contributor_path: fix typos (#79678) 2023-01-10 12:41:48 +00:00
0fc932fda0 switched reference from katacoda to instruqt (#79698) 2023-01-09 16:30:26 -05:00
b5b239fd71 fix role argument spec error for invalid suboptions (#76578)
fixes https://github.com/ansible/ansible/issues/75536
2023-01-09 11:54:45 -05:00
acbf4cc60e ansible-galaxy - fix turning off the ConcreteArtifactManager's validate certs at the global level (#79561)
Fix ignoring certs when downloading tarballs

Fix ignoring certs when downloading a collection from a specific source that isn't in the configured servers list
2023-01-09 11:42:07 -05:00
fd325c00bd ansible-galaxy collection|role init - fix preserving symlinks (#79134)
* Preserve symlinks in custom role/collection skeletons

* changelog
2023-01-09 10:59:05 -05:00
32c5793de5 systemd: ignore errors in daemon_reload and daemon_reexec when running in a chroot or with $SYSTEMD_OFFLINE==1 (#79643)
Signed-off-by: Olaf Klischat <olaf.klischat@gmail.com>
2023-01-09 09:43:13 -05:00
1375861ec2 ansible-test - Update available platforms. 2023-01-06 17:13:20 -08:00
6a73a5a480 Fixes for uri integration test. (#79688)
* Fix HTTP methods used in URI test.

* Fix urllib2 redirect tests on Python 3.11.

* Fix uri cookie testing on Python 3.11.
2023-01-06 15:44:46 -08:00
a7111c4dbb validate-modules: don't fail on invalid YAML (#79682)
* validate-modules: don't fail on invalid YAML

When validate-modules encounters invalid YAML (e.g. in the EXAMPLES
section), it tries to reformat the exception to include the line number
in the Python file instead of the line number of the embedded YAML
document. However, PyYAML doesn't allow modification of the Mark object
(anymore) which leads to a new exception being raised, instead of
reporting the original exception.

As the original exception is not needed in other places anymore, we
don't have to modify it at all and can just compute the right line
number when reporting the error via ansible-test.

Fixes: #75837

* Add test for invalid module doc YAML syntax.

Co-authored-by: Matt Clay <matt@mystile.com>
2023-01-06 11:34:35 -08:00
6f8c1da0c8 correct the mistake of example repeat_original (#79659)
there is a little mistake 


##### ISSUE TYPE
- Docs Pull Request

+label: docsite_pr
2023-01-05 12:22:34 -08:00
4a29591b98 Fix a typo in the warning message (#79635) 2023-01-05 17:03:48 +00:00
eae02bf5b8 Fix link in compile sanity test docs. 2023-01-04 18:34:12 -08:00
1243d2ace0 Fix EPEL setup for integration tests on RHEL 7 2023-01-04 15:40:32 -08:00
8e7cc371be Fix typo (#79641) 2023-01-04 14:31:03 +00:00
e7af7532bd Update authentication.rst (#79623) 2023-01-04 14:23:15 +00:00
51bddd862b Document callback types in documentation (#79651) 2023-01-03 14:32:37 -05:00
38cedc7f1a Fixed incorrect spelling of the word overridden. (#79620) 2023-01-03 10:48:06 -05:00
45df14a2e0 Fix spelling of "triple" in Issue Templates (#79628) 2022-12-27 02:22:32 +01:00
754c54d3d6 Clean up setup_paramiko test target.
- Remove obsolete install/uninstall files.
- Use OS packages on Alpine 3.
2022-12-16 17:33:11 -08:00
04fc98c794 ansible-test - Improve container startup handling.
Also improve the ansible-test-container integration test:

 - Add coverage for the no-probe code path.
 - Add work-arounds for centos6 containers (to support backporting).
 - Avoid systemd debug when the container doesn't use cgroup.
2022-12-15 19:42:58 -08:00
69c874f478 Typo in playbooks_blocks.rst (#79603) 2022-12-15 13:30:21 -05:00
b7e948e623 filter/test plugin listing, fix bug on file sorting (#79591)
* filter/test plugin listing, fix bug on file sorting

avoid legacy/builtin special casing for 'all'
2022-12-15 10:06:13 -05:00
f6c0e22f98 Add more retries to ansible-test-container test. 2022-12-14 14:50:59 -08:00
75b60b17ee ansible-test - Support RSA SHA-1 for SSH clients. 2022-12-14 09:19:33 -08:00
aa268b8db2 Add example of yaml file with --extra-vars (#79521) 2022-12-13 17:12:14 -05:00
b3a1eabb7d Add big support table (#79221)
Co-authored-by: samccann <samccann@redhat.com>
Co-authored-by: Matt Clay <matt@mystile.com>
2022-12-13 15:08:45 -05:00
0f01c69f1e Update split.yml (#79570)
typo fix
2022-12-13 16:09:07 +01:00
da3b1d3f50 ansible-test - Fix --prime-containers and --explain (#79581)
* Remove unused code.
* Fix explain errors.
* Fix `--prime-containers` with docker on cgroup v2.
2022-12-12 12:12:16 -08:00
dcc08eec35 ansible-test - Fix target PyPI proxy config. 2022-12-12 09:51:02 -08:00
04209d328b 2.15.0 will release 2023-05-15 (#79567)
* 2.15.0 will release 2023-05-15

* Eliminate 1 week freeze, shift dates 1 week

* oops

Co-authored-by: Martin Krizek <martin.krizek@gmail.com>
2022-12-12 09:26:53 -06:00
60f76436c1 Simplify AnsibleJ2Vars by using ChainMap for vars (#78713)
Co-authored-by: Matt Martz <matt@sivel.net>
2022-12-09 13:33:13 +01:00
245d516911 Fix :ref: usage in testing docs. (#79566) 2022-12-09 11:27:01 +00:00
6a7fb7d2ab fix: broken link (#79461) 2022-12-08 16:24:21 -05:00
0f4afd7e6d Remove obsolete legacy integration test docs. (#79563) 2022-12-08 16:22:22 -05:00
932a32153a Update docs for the compile sanity test. (#79562) 2022-12-08 16:05:44 -05:00
0a12d8a5bc ansible-test - fix warning to include image name (#79560) 2022-12-09 05:21:00 +10:00
bc13099e56 fixed misleading setup example (#79495) 2022-12-08 14:06:37 -05:00
11e43e9d6e Set locale for python apt (#79546)
* set locale to get_best_parsable_locale for the python-apt API

* add a test case

* add changelog

* remove test that tests nothing
2022-12-09 05:06:08 +10:00
527abba860 Update windows_faq.rst (#79552)
`python-pip` changes to `python3-pip` for the Ubuntu 20.04 WSL distro
2022-12-08 12:05:30 -05:00
b1caba8b53 Add Ansible community 7.1.0 porting guide (#79553) 2022-12-07 15:31:33 -05:00
3fd519de57 Fix hardcoded python call (#79520)
Co-authored-by: Lee Garrett <lgarrett@rocketjump.eu>
2022-12-06 16:43:43 -05:00
3cdf589ca7 Add Ansible community 6.7.0 porting guide (#79544) 2022-12-06 11:12:38 -05:00
1424484be0 Prevent stdio deadlock in forked children (#79522)
* background threads writing to stdout/stderr can cause children to deadlock if a thread in the parent holds the internal lock on the BufferedWriter wrapper
* prevent writes to std handles during fork by monkeypatching stdout/stderr during display startup to require a mutex lock with fork(); this ensures no background threads can hold the lock during a fork operation
* add integration test that fails reliably on Linux without this fix
2022-12-05 20:46:15 -08:00
80d2f8da02 ansible-test - Fix container detection. (#79530) 2022-12-05 13:33:14 -08:00
31f95e201a Handle line wraps in jinja_plugins test. 2022-12-05 12:47:06 -08:00
79dfe14adf More integration tests for import sanity test. (#79532) 2022-12-05 12:28:01 -08:00
31f9d60b8d Don't use color in jinja_plugins test.
This should prevent color codes from interfering with string matches.
2022-12-05 11:45:53 -08:00
9acca5b3b9 Allow test to run on system with selinux enabled. Fixes #77564 (#79510) 2022-12-01 11:23:08 -08:00
042a55fbe0 Docs: Update intersphinx links for Ansible 7 (#79485) 2022-12-01 14:01:23 -05:00
5b51b560d0 Removed sorting to preserve original order (#74839)
updated tests to reflect new order
2022-11-30 09:25:34 -05:00
1998521e2d Always create new role (#78661)
Don't use role cache for determining whether to create a new instance of role
2022-11-29 15:56:41 -06:00
f9715f436c ansible-test - Avoid direct use of errno.
Error handling on Python 3.x no longer requires the use of `errno` to identify specific errors.
2022-11-29 13:40:04 -08:00
cda16cc5e9 ansible-test - Improve container management. (#78550)
See changelogs/fragments/ansible-test-container-management.yml for details.
2022-11-29 13:35:53 -08:00
3bda4eae6f Fix repr(Task) to check action when testing for a meta task (#79464)
Fixes #79459
2022-11-29 16:43:14 +01:00
01ff57bdff add ansible-galaxy cli documentation for parallel execution (#79433)
* add ansible-galaxy cli documentation for parallel execution

Co-authored-by: saranti <tsarantis@proton.me>

* Update lib/ansible/cli/galaxy.py

* Update lib/ansible/cli/galaxy.py

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

Co-authored-by: saranti <tsarantis@proton.me>
Co-authored-by: Sviatoslav Sydorenko <wk.cvs.github@sydorenko.org.ua>
2022-11-29 16:27:08 +01:00
c33a782a9c Fix password lookup rewrites file when using encrypt (#79431)
* Remove unused mock from test_password_already_created_encrypt

The _get_paths mock is never used in the
test_password_already_created_encrypt test case.

* Add test to assert the password file is not rewritten

If the password file already contains the salt and the hasing algorithm
does not use the ident parameter, the password lookup should not write
to the password file.

* Fix "changed" if using "encrypt" in password lookup

When using the "encrypt" parameter to the password lookup without the
ident parameter, the password file was always marked as "changed". This
caused the file to be rewritten with the same content. This is fixed by
only marking the file as changed, if an "ident" value needs to be added
to the file.

Fixes #79430.

Add changelog entry
2022-11-29 16:26:30 +01:00
3936b5c471 Fix file touch check mode result (#79360) (#79422)
Fixes #79360
2022-11-29 16:17:38 +01:00
ab76916b14 galaxy: Add license_file to manifest directives (#79420)
* galaxy: Add license_file to manifest directives

* ag collection build: Test license handling

This adds tests to ensure that
    - REUSE licensing files: .reuse/dep5, LICENSES/*, anyfile.license
    - galaxy.yml license_file
are always included in the manifest.
2022-11-29 16:12:47 +01:00
5f3a6b78db local connection: avoid tb when running in container with invalid user (#79414)
* local connection: avoid tb when running in container with invalid user

* clog

* cannot use uid, leave empty and ~/ will resolve itself

* get back to what it did
2022-11-29 16:08:32 +01:00
38fe34244c ansible-test - Fix completion error in Python 3.11. 2022-11-28 19:41:47 -08:00
3723c426d2 Fix lists styling (#79481) 2022-11-28 11:04:37 -05:00
3a6b6370ad Add comma (#79480) 2022-11-28 11:03:02 -05:00
80551633c7 Set explicit meta long_description_content_type (#79468)
This is necessary for `twine check --strict` to pass.
2022-11-28 16:16:46 +01:00
f79a54ae22 Update vendored distro (#79227)
Commit bb35d41 in branch python2.7-support from 2022-10-10:
https://github.com/python-distro/distro/commit/bb35d41
2022-11-23 14:44:15 -05:00
505b29b2a9 more strftime docs (#79417)
* more strftime docs

fixes #79397
Co-authored-by: Matt Martz <matt@sivel.net>
Co-authored-by: Don Naro <dnaro@redhat.com>
Co-authored-by: Sloane Hertel <19572925+s-hertel@users.noreply.github.com>
2022-11-23 12:27:09 -05:00
b148fd8dd7 ansible-galaxy - support `resolvelib >= 0.5.3, < 0.10.0` (#79399)
* Upgrade `resolvelib >= 0.5.3, < 0.10.0`

https://pypi.org/project/resolvelib/0.9.0/ released on 2022-11-17:

  * https://github.com/sarugaku/resolvelib/blob/master/CHANGELOG.rst#090-2022-11-17
  * https://github.com/sarugaku/resolvelib/releases/tag/0.9.0

Signed-off-by: Wong Hoi Sing Edison <hswong3i@pantarei-design.com>
2022-11-23 08:57:24 -05:00
6ea058315f Add Ansible community 7.0.0 porting guide (#79448) 2022-11-22 17:04:36 -05:00
e5399c95d5 issue #79378 html context in sphinx conf (#79401) 2022-11-22 16:17:15 -05:00
32c90080e4 Docs: Updating the Ansible community changelogs (#79400) 2022-11-22 16:12:45 -05:00
3cc95d1f12 docs - make the existence of 'trivial' changelog entries easier to find (#79440) 2022-11-22 14:54:19 -05:00
493ef4a559 WinRM - Add doc entry for cert auth over TLS 1.3 (#79434) 2022-11-22 06:46:48 +10:00
1bda6750f5 fix reject list (#79391) 2022-11-18 14:26:35 -05:00
942bcf6e7a Add manifest includes for reuse licenses (#79403)
* Add includes for reuse licenses

* Add additional exludes to follow REJECT_EXTS

* clog frag
2022-11-17 17:13:01 -06:00
a954918b60 consolidate duplicated test files (#79380) 2022-11-17 16:20:20 -05:00
d925ece764 Allow pip like version syntax for installing collections (#79405) 2022-11-17 15:17:48 -06:00
6cec31574f Update fileglob.py (#78887)
Improve documentation for relative file paths
2022-11-17 15:48:50 -05:00
f089aae5ee Clarify that b64decode does not work with binary output (#79294) 2022-11-17 14:17:47 -05:00
3ae2f97d4a iss#55935: Documents missing internal parameters and polishes 'Intern… (#79118)
Co-authored-by: Jaroslav Klech <jklech@redhat.com>
Co-authored-by: Sloane Hertel <19572925+s-hertel@users.noreply.github.com>
2022-11-17 14:05:38 -05:00
7d35f70caf Add tests to validate vars_files first found behavior (#79386) 2022-11-17 14:05:02 -05:00
ec3f6ed9b9 update antsibull-docs to 1.7.3 (#79395)
* update antsibull-docs to 1.7.3

* remove extraneous changes
2022-11-17 13:48:58 -05:00
0a2b96f402 typos (#79377) 2022-11-17 12:02:24 -05:00
b7ea661807 Update pull.py (#79387) 2022-11-17 12:00:25 -05:00
6059116a64 Replace _valid_attrs with fattributes (#79376)
It was missed in one place it seems.
2022-11-15 10:25:57 -05:00
5c0b4a3798 Add Ansible community 7.0.0rc1 porting guide (#79382) 2022-11-15 10:15:59 -05:00
6baf25a048 [DOCS] collection_release_with_branches.rst: update major releases section (#79335)
Co-authored-by: Felix Fontein <felix@fontein.de>
Co-authored-by: Don Naro <dnaro@redhat.com>
2022-11-15 15:09:02 +00:00
1705ec98cd ansible-doc and validate-modules: remove underscore deprecation handling for collections (#79362)
* Remove underscore deprecation handling for collections.

* Also consider ansible.legacy.
2022-11-15 10:03:47 -05:00
66cc952b49 communication.rst: Add IRC channel to Storage WG info (#79374) 2022-11-15 13:14:34 +00:00
3448fcabc5 file lookup now works with general lookup error framework (#79339)
* file lookup now works with general lookup error framework
2022-11-14 11:45:34 -05:00
35db7df9ce communication.rst: add AAP Config As Code WG (#79365) 2022-11-11 09:02:46 +00:00
d02f96b78c Add note to command_line_tools.rst (#79351)
Documentation fix for #69390
2022-11-10 13:40:49 -05:00
f9451dfaf8 docfix for ssh_args FAQ (#79308) 2022-11-10 10:35:02 +00:00
183c34db65 update backport instructions to 2.14 (#79354) 2022-11-10 10:03:19 +00:00
284e642cb9 communication.rst: add Storage WG info (#79359) 2022-11-10 10:02:04 +00:00
e7730f5d6c Fix up incorrectly quoted doc example (#79356) 2022-11-10 07:03:50 +10:00
d72326b6af Allow force deletion of group (#78172)
* Allow force deletion of group

* Update version_added

Co-authored-by: Jordan Borean <jborean93@gmail.com>
2022-11-10 06:52:27 +10:00
a3531ac422 Refactor structure of group module integration tests (#78652)
This to match the structure with the tests for the user module. When having the tests available as stand-alone tests, it will be easier to add more integration tests in the future.
2022-11-10 06:29:24 +10:00
196084773b Japanese version switcher (#79276)
* update japanese version switcher for 2.14

* update latest version
2022-11-08 13:20:09 -05:00
d5e90e1737 Add Ansible community 6.6.0 porting guide (#79340) 2022-11-08 12:23:49 -05:00
ef053bbebb Add Ansible community 7.0.0b1 porting guide (#79341) 2022-11-08 12:23:09 -05:00
eae42ec57e openbsd factgs, use physmem instead of usermem for total mem (#79316)
Signed-off-by: darshanip <darshancoding@gmail.com>
2022-11-08 10:30:12 -05:00
4759590467 Move collection playbook output from "warning" to "-v" (#79320)
* lib/ansible/executor/playbook_executor.py: fix minor typo in comment

* lib/ansible/executor/playbook_executor.py: move 'running playbook inside collection' from warning to -v debugging output
2022-11-08 10:17:53 -05:00
e0118d9d03 The attribute was renamed to 'action' and the extra data was not used anymore. (#79317) 2022-11-08 10:16:52 -05:00
0ae963a311 Add missing type to the reference option of the documentation of the git module (#79305)
* Add missing type to the `reference` option of the `git` module

* No more doc-missing-type error in validate-modules
2022-11-08 10:06:22 -05:00
d0b6ce7473 update version switcher to include 2.14 (#79273) 2022-11-07 10:43:56 -05:00
657acfb7af update release table with 2.14 details (#79272) 2022-11-07 10:37:29 -05:00
2a03c8028e Fix typo 'Ansbile'. (#79318) 2022-11-07 09:06:10 +00:00
852e2d7550 Update Ansible 7 roadmap (#79307) 2022-11-04 12:29:33 -04:00
f3be331c9c Delete a bad PR #79263 change note (#79295) 2022-11-03 12:20:31 -07:00
f700047e69 blockinfile - document multiline marker behavior (#79292) 2022-11-03 12:10:45 -07:00
a12a9b409f Add more documentation for InventoryData methods (#79288)
* Add more documentation for InventoryData methods

Reword some constructed documention and mention fetch_hostvars

* describe use cases for default strict behavior

Co-Authored-By: Brian Coca <bcoca@users.noreply.github.com>

Co-authored-by: Brian Coca <bcoca@users.noreply.github.com>
2022-11-03 12:05:33 -07:00
938c0fa944 ansible-test - Fix and update documentation links. 2022-11-03 11:04:31 -07:00
e2450d4886 added --allow-change-held-packages for apt remove (#78203)
* added --allow-change-held-packages for apt remove

* add tests for apt remove (allow_change_held_packages=yes)

* add changelog for apt remove (allow-change-held-packages=yes)

* update tests for apt remove (allow_change_held_packages=yes)
2022-11-02 12:02:04 -04:00
26a4775611 [CI] Move running reboot integration test to group 2
PR #79289, follow-up for #78402.

It was breaking the integration-aliases sanity test, but only
became apparent post-merge. This patch fixes that.
2022-11-02 16:52:46 +01:00
bb7ad0f0d8 Enable the reboot integration test in CI
Co-Authored-By: Matt Clay <matt@mystile.com>
2022-11-02 02:56:54 +01:00
698da30c1e ansible-test - Update test container to 7.4.0 (#79281) 2022-11-02 10:39:33 +10:00
f0d61245e3 Added ignore revs file for tracking commits with bulk sanity changes (#79280) 2022-11-02 08:52:28 +10:00
6def4a3180 Fix up sanity problems 2022-11-02 08:18:38 +10:00
4ad02dc6e3 ansible-test - Update PSScriptAnalyzer to 1.21.0 2022-11-02 08:18:38 +10:00
bfcb557777 replace yes/no with true/false in docstrings (#79274)
Co-authored-by: Alicia Cozine <acozine@users.noreply.github.com>
2022-11-01 15:50:11 -04:00
1c80209422 communication.rst: add Ansible MySQL WG information (#79269) 2022-11-01 11:13:41 -04:00
6e379e5d65 validate-modules: do not treat falsy non-False defaults as None (#79267)
* Do not treat falsy non-False defaults as None.

* Fix various instances of this in modules.

* Add changelog fragment.
2022-11-01 11:12:59 -04:00
6674c43edd 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
2022-11-01 11:10:05 -04:00
6d9e2bc5e9 De-duplicate initialisation of ConnectionBase._connected (#79256)
The same value is unconditionally set 4 lines down.
2022-11-01 11:08:13 -04:00
65e725f08f #59449: Removes translatable words from code blocks (#79193)
Co-authored-by: Jaroslav Klech <jklech@redhat.com>
2022-11-01 10:44:45 -04:00
44f7ca4645 add ansible 7 porting guide to index page (#79254) 2022-10-28 15:13:36 -04:00
0f18ddca9f mention acl in permissions errors (#79209)
as chmod/mode is not the only thing we attempt and Ubuntu not shipping acl
  in newer versions can lead to some confusion

  fixes #79146
2022-10-27 19:37:19 -04:00
aaab0791d9 File lookup handle missing file more gracefully (#79230)
previously it would have a 2nd tb due to bad error raising
 also remove superfluous warning
2022-10-27 15:28:32 -04:00
0bacea70c4 plugins/lookup/pipe: docs typo fixes (#79222) 2022-10-27 14:31:08 -04:00
6ee089bc80 collection roles dont support plugins (#79243) 2022-10-27 14:30:38 -04:00
bc83da9a1b Communication docs: note that editing Matrix messages causes IRC spam (#79238) 2022-10-27 11:02:56 +01:00
fa8dc6b73d Docs: Typos and edits in collections reviews (#79217) 2022-10-27 09:17:38 +01:00
d55423f5a4 ansible-test - Update default container. 2022-10-26 18:12:04 -07:00
9545f2e0de stable docs build: do not use YAML parsing/serialization for .deps files (#79233)
* Do not use YAML parsing/serialization for .deps files.

* Prevent crash.
2022-10-26 14:54:00 -07:00
74b80c3193 Bump antsibull-docs version from 1.6.1 to 1.7.0. (#79071) 2022-10-26 15:26:34 -04:00
656d01dd24 fix url for fest VoD banner (#79229) 2022-10-26 19:35:34 +01:00
74f55db5c6 Docs: Typos and edits in collections integration (#79228) 2022-10-26 16:04:55 +01:00
04957715cc contributor_path: misc doc fixes (#79224) 2022-10-26 13:13:08 +01:00
f02b8fb6f0 Add Ansible community 7.0.0a2 porting guide (#79219) 2022-10-25 16:36:12 -04:00
4fb5240af2 ansible-test - Update base and default containers. 2022-10-25 10:15:51 -07:00
4202acb41b 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
2022-10-25 09:48:26 -07:00
da3a7618ba give a warning when no roles match the search instead of returning rc 1 (#79195)
* give a warning when no roles match the search instead of returning rc 1

* porting guide note

* Update docs/docsite/rst/porting_guides/porting_guide_core_2.15.rst

Co-authored-by: Sviatoslav Sydorenko <wk.cvs.github@sydorenko.org.ua>
2022-10-25 12:00:56 -04:00
f3f7d44238 Added link to the Ansible meetup page (#79207) 2022-10-25 11:41:20 -04:00
060f114d8c add link to fest videos (#79196) 2022-10-25 09:46:01 +01:00
645b6b8581 ansible-test - Fix pylint support on Python 3.11. 2022-10-24 15:29:20 -07:00
a76bbb18a5 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>
2022-10-24 14:57:54 -07:00
757efa4a45 managed node requirement amend (#79189) 2022-10-24 16:53:43 -04:00
465480f755 documentation fix for file module 78988 (#79182) 2022-10-24 13:13:52 +01:00
bcdc2286e8 Revert "Fix yum exclude example to align to parameter doc (#79128)" (#79179)
This reverts commit 062315ecaa.
2022-10-20 15:57:36 -04:00
551f5a3753 Change occurance yes/no to true/false (#79035) 2022-10-20 15:06:15 -04:00
ae38628404 docs: cgroupsv1 is required for ansible-test with docker (#79066) 2022-10-20 14:38:02 -04:00
1182059d46 Setting indentation correctly in the Example section (#79072) 2022-10-20 14:34:05 -04:00
cc3abae532 minor changes in documentation (#79114) 2022-10-20 14:30:55 -04:00
062315ecaa Fix yum exclude example to align to parameter doc (#79128) 2022-10-20 14:20:56 -04:00
b7eb067090 Added the emphasize changelog (#79160)
Co-authored-by: Sviatoslav Sydorenko <wk.cvs.github@sydorenko.org.ua>
2022-10-20 14:19:43 -04:00
89af4e6e31 Update overview_architecture.rst (#79161)
Add missing right parenthesis
2022-10-20 14:09:43 -04:00
64d5c6cc3a Update contributor_path.rst (#79170)
grammar fixes
2022-10-20 14:05:25 -04:00
1a6cfa8203 Update communication.rst (#79172)
grammar fixes
2022-10-20 13:58:39 -04:00
d6c268378f Made changes to notes on #L9 and #L21 (#79173) 2022-10-20 13:55:41 -04:00
d82d232d07 update alpha to next week (#79166) 2022-10-19 15:23:51 -04:00
89d682464b Fix isinstance check (#79159)
Use GalaxyAPI for isinstance check instead of RoleDistributionServer, since the latter is defined in __main__ sometimes (when running integration tests or ansible-galaxy from source) and importing from ansible.cli.galaxy won't reference the same object.
2022-10-18 08:25:39 -04:00
5b04dff7bd remove AnsibleFest banner (#79156) 2022-10-17 20:45:38 +01:00
f66016df0e copy, avoid moving non temp remote 'non' files (#79102)
* copy, avoid moving non temp remote files that are not dirs/files
fix tests
2022-10-17 13:07:04 -04:00
cb2e434dd2 ansible-galaxy install - fix unnecessary api check when installing a role from git repo (#79090)
* delay server api evaluation until a GalaxyRole needs to make an api call for info, list, and install
2022-10-14 09:14:35 -04:00
808f5a0c03 contributor_path: add doc link (#79138) 2022-10-14 11:18:12 +01:00
58f051a941 contributor_path: fix refs (#79136) 2022-10-14 09:15:09 +01:00
8d94a95ccf Docs: file parameter import_tasks and include_tasks (#79077)
* issue #79022 file parameter import_tasks and include_tasks

* adding details back

* Update lib/ansible/modules/import_tasks.py

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

* Update lib/ansible/modules/include_tasks.py

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

* use pipe as in original version

Co-authored-by: Felix Fontein <felix@fontein.de>
2022-10-13 17:39:27 -07:00
3a6eca6670 Fix test for jinja2_native preserve quotes (#79131)
Fixes https://github.com/ansible/ansible/pull/79119#discussion_r993752129
2022-10-13 12:21:02 -07:00
f53dbf90ea Don't assume column index for netmask and broadcast (#79121)
* Don't assume column index for netmask and broadcast. Fixes #79117

* fix typo
2022-10-13 12:16:13 -07:00
c4d6629bce fix password unit tests (#79113) 2022-10-13 09:47:47 -05:00
7e060c148a Add Ansible community 6.5.0 porting guide (#79122) 2022-10-12 16:11:25 -04:00
d34b578685 jinja2_native: preserve quotes in strings (#79119)
Fixes #79083
2022-10-12 12:16:06 -05:00
f9cb679675 compile role with all parents in the dep chain (#79079)
fix inheriting from parents when role depth exceeds 3

Fixes #47023
2022-10-12 09:44:22 -04:00
cc2e7501db Disable IP address lookups in iptables -module when listing (#78828)
* add --numeric to list

Co-authored-by: Mikko Toivola <mikko.toivola@insta.fi>
2022-10-11 16:59:35 -04:00
5d253a1380 fix password lookup's use of f=v settings (#76551)
update tests
2022-10-11 15:09:00 -04:00
14e7f05318 ansible-test - Update pylint to 2.15.4. 2022-10-11 10:37:50 -07:00
58637702b4 Cache field attributes list on the playbook classes (#79091)
* Cache field attributes list on the playbook classes
2022-10-11 11:16:57 -04:00
1286b7d42e Apply minor formatting changes to "playbooks directory" section (#79092) 2022-10-11 08:36:37 +05:30
dfef3260a5 Add code-block wrappers to code examples in playbooks_filters.rst (#79093)
Fixes #79029
2022-10-10 14:59:23 -07:00
a48c442275 Misc Typo fixes (#79088) 2022-10-10 14:41:20 +01:00
ad1eba9876 community_steering_committee: add a new member (#79089) 2022-10-10 13:50:09 +01:00
7d6984618d Docs: syntax error in Parsing semi-structured text with Ansible (#79085) 2022-10-10 09:34:31 +05:30
8ecfb7c6d8 Added code-block wrappers in implicit_localhost.rst (#79086)
Fixes #79031
2022-10-10 09:33:03 +05:30
ad5d9843d6 docs: fix typos (#79082) 2022-10-09 19:51:43 +05:30
eecc4046e8 Fix empty str defaults in config/base.yml (#77733)
* fix empty str default for config/base.yml config options by rendering '' instead of ``''``

Co-authored-by: Brian Coca <bcoca@users.noreply.github.com>
2022-10-07 15:27:17 -04:00
e208fe5932 copy module - fix copying directories recursively with remote_src=True (#76997)
* copy module - fix copying directories containing modified subdirs with remote_src=True. Previously, the first changed subdir would prevent recursively checking for changes for in subdirs at the same level.

* Fix reporting changed for copying empty directories with remote_src=True. If a directory is created on the remote but nothing else, changed is True.
2022-10-07 14:24:46 -04:00
27ab589ee8 ansible-config, only subvalues should use yaml shorthand (#79073)
* ensure we only use shorthand for assigned values

* fix ansible-config std display

* split baby

* killed offending whitespace

* moved to func instead

* the revenge of whitespace
2022-10-07 12:45:40 -04:00
fcea07bbef Custom salt for ansible-vault encrypt (#79063)
* Custom salt for ansible-vault encrypt

  add VAULT_ENCRYPT_SALT config
  add salt testing


Co-authored-by: Abhijeet Kasurde <akasurde@redhat.com>
Co-authored-by: Piotr Stawarski <p@stawarski.pl>
2022-10-07 10:05:46 -04:00
8cf7a0d3f0 Fix collection install from source respects symlinks (#78983)
* Fix installation from source transforms symlinks of dirs to empty dirs

* Add test to check symlinks to dirs are respected when installing from source

* Add changelog for collection install from source symlink to dirs issue
2022-10-06 13:53:23 -04:00
420564c5bc 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
2022-10-06 08:55:56 -05:00
11c1777d56 facts: List all local (scope host) IP address ranges (#79018)
After changes:
```
        "ansible_locally_reachable_ips": {
            "ipv4": [
                "127.0.0.0/8",
                "127.0.0.1",
                "192.168.0.1",
                "192.168.1.0/24"
            ],
            "ipv6": [
                "::1",
                "fe80::2eea:7fff:feca:fe68",
                ...
            ]
        },
```

192.168.1.0/24 is a local prefix, where any IP address inside this range
is reachable locally (or outside this host if this prefix is announced via
EGP/IGP).

Signed-off-by: Donatas Abraitis <donatas.abraitis@hostinger.com>
2022-10-06 09:30:57 -04:00
e1daaae42a Fix using FQCN for flush_handlers (#79057)
Fixes #79023
2022-10-06 09:26:49 -04:00
f8f1c6a6b5 Add password_hash filter and fix some nits (#78743)
Co-authored-by: Abhijeet Kasurde <akasurde@redhat.com>
2022-10-06 17:11:06 +05:30
44581289e8 Use python re to parse service output instead of grep (#79015)
* 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
2022-10-05 12:19:40 -05:00
680bf029b1 Docs: Add code-block wrappers in lookup.rst & strategy.rst (#79032, #79033) (#79048) 2022-10-05 09:55:41 -07:00
35700f57cc Docs: Add code-block wrappers in faq.rst (#79047) 2022-10-05 09:46:14 -07:00
25a770de37 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>
2022-10-05 09:28:53 -07:00
3fc3371463 Cleaned up test_strategies doc (#79045)
Authored-by: Shade Alabsa <shadealabsa@microsoft.com>
2022-10-05 08:51:43 -07:00
3a788314a2 Docs: Adding code blocks wrapper (#79042)
* Adding code blocks wrapper
2022-10-05 08:41:34 -07:00
63b5fc4b8d Docs: Add code-block wrappers to code examples (#79037)
* Docs: Add code-block wrappers to code examples
2022-10-05 05:39:06 -07:00
57f22529cb Add code-block wrappers in network_debug_troubleshooting.rst 2022-10-05 17:16:08 +05:30
ff6e4da36a fixes to FA inheritance (#78990)
finalized applies to all field attributes
fix getting parent value
also remove unused/needed extend/prepend signature
moar testing
2022-10-04 11:47:32 -04:00
b5db71e318 ansible-vault: add newline to the output of the 'encrypt_string' command (#79017)
* ansible-vault: add newline to the output of the 'encrypt_string' command

* Add comment with issue description and improve string joining

* Add changelog fragment

* Update changelogs/fragments/79017-ansible-vault-string-encryption-ending-with-newline.yml

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

* Fixed some typos in changelog fragment

* Improve comment regarding newline character at the end of file

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

Co-authored-by: Sviatoslav Sydorenko <wk.cvs.github@sydorenko.org.ua>
2022-10-04 08:05:37 -07:00
56285b1d2b Docs: true/false with boolean values (#78980)
* Adding FQCN community.postgresql. to postgresql modules
2022-10-04 10:29:26 -04:00
6d0aeac1e1 Do not crash templating when filter/test name is not a valid Ansible plugin name (#78913)
* 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>
2022-10-04 09:44:00 -04:00
367cdae3b2 docs: replace latin terms with english in the scenario_guides (#79008) 2022-10-04 10:35:45 +01:00
4d3c12ae9e docs: replace latin terms with english in the reference_appendices (#79010) 2022-10-04 10:33:40 +01:00
8f4133b514 Docs: Replace Latin in the porting guides (#79011) 2022-10-04 10:30:57 +01:00
ea04d05a1e Docs: Typo in Alibaba Cloud Compute Services Guide (#78984) 2022-10-04 10:19:13 +01:00
8d665a1a8e docs: replace latin terms with english in network (#79013)
fixes #78999 by removing Latin usage in network docs
2022-10-04 09:47:24 +01:00
f0cc70f9e1 No latin terms (#79009)
Fixes #79006
2022-10-04 08:05:15 +05:30
173ddde126 Docs: true/false with boolean values in docsite/rst/playbook_guide (#78958) 2022-10-03 16:55:00 -04:00
4f4ad453c4 Fixed Latin words, replaced all via with either through or by (#79004) 2022-10-03 16:54:03 -04:00
55925958ea docs: replace latin terms with english in the os_guide directory (#79007)
Fixes #79003
2022-10-03 16:51:44 -04:00
78c9fb4159 replace with boolean true/false (#78950) 2022-10-03 16:49:43 -04:00
fbd98cd824 Docs: Replace Latin terms in the dev_guide #78997 (#79005) 2022-10-03 16:42:37 -04:00
5b333c9665 scenario guide doc changes (#78934) 2022-10-03 16:40:12 -04:00
5137cb16e9 Update porting_guide_5.rst (#78954) 2022-10-03 16:35:06 -04:00
ba32642538 Update porting_guide_4.rst (#78953) 2022-10-03 16:34:47 -04:00
919c449256 Update porting_guide_3.rst (#78952)
Fixes #78914
2022-10-03 16:34:16 -04:00
dc2d15fca4 Update porting_guide_2.0.rst (#78951)
Replaced http link with rst version - issue https://github.com/ansible/ansible/issues/78914
2022-10-03 16:33:57 -04:00
f7c01bc866 Docs: Provide descriptive labels for http references (#78959) 2022-10-03 15:01:27 -04:00
fb8c2daf46 Docs: true/false with boolean values in docsite/rst/os_guide (#78957) 2022-10-03 14:39:09 -04:00
56c48d1c45 docs - Use code-block to format examples in Windows module development walkthrough (#78985) 2022-10-03 01:51:14 -07:00
1b922b42dd Adds code-block in collection documentation (#78977)
* fix issue #78976
2022-10-03 01:45:44 -07:00
9afb37eda6 #78965 Adding the code-block to prevent the translation (#78979)
* Adding the code-block to prevent the translation
2022-10-01 11:40:28 -07:00
93c2cb2b8e #78971 Update module_lifecycle.rst (#78974)
* Update module_lifecycle.rst
2022-10-01 08:37:57 -07:00
3dc0c2135e 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
2022-10-01 08:11:07 -07:00
446406a0c8 added code-blocks according to #78963 (#78969)
* added code-blocks according to  #78963
* Update testing.rst, added newlines
2022-10-01 07:59:43 -07:00
1db75a41bf Adding code-block wrappers to code examples (#78968) 2022-10-01 07:51:02 -07:00
01484cdc68 added code-blocks according to #78962 (#78972) 2022-10-01 07:37:40 -07:00
538b99781f 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
2022-10-01 06:37:42 -07:00
5b239acb77 ansible-test - Update distro containers to 4.8.0.
The updated containers include coverage 6.5.0.
2022-09-30 10:31:42 -07:00
9650ddb11c 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
2022-09-30 13:07:24 -04:00
20c1252212 ansible-test - Update coverage to version 6.5.0.
ci_complete
ci_coverage
2022-09-30 08:57:21 -07:00
cee9872605 apt_key, fix example indentation
Co-authored-by: Matt Clay <matt@mystile.com>
2022-09-30 11:06:41 -04:00
ba6da65a0f Fix connection/become task loop settings (#78565)
* Fix connection/become task loop settings

* Remove old code
2022-09-30 09:06:10 +10:00
be4807b712 ansible-test validate-module - support sidecar docs (#78904) 2022-09-30 08:22:42 +10:00
c3fc8db41c Deprecate using a list of dicts for vars. See #78920 (#78927) 2022-09-29 12:45:55 -07:00
d93883645c Upgrade antsibull-docs to 1.6.1 (#78872)
* 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.
2022-09-29 11:54:00 -04:00
0343ae46d2 Add message about viewing chat history when on IRC (#78834) 2022-09-29 11:19:34 -04:00
ae66d9a1f4 Fixed spelling (#78911) 2022-09-29 11:01:46 -04:00
0884a7cf0e Add Ansible community 7.x porting guide (#78916) 2022-09-29 09:15:01 -04:00
0b678d5036 avoid roles exporting vars: (#69040)
- correct 'vars:' precedence to allow phasing out of include_params
 - actually merge vars and always include role_vars
 - avoided dupe deps from giving wrong vars
 - use 'first' instance of dep as others are from previous instances/invocations
   and can have diff values for vars
 - ensured deps only provide exportable vars themselves
 - added COMMENTS
 - added tests
 - apply export restrictions setting to defaults
 - use 'public' as cutoff

Co-authored-by: Sloane Hertel <19572925+s-hertel@users.noreply.github.com>

ci_complete
2022-09-28 15:54:48 -04:00
3423a6609f Fix docs for new commonpath and normpath filters (#78897) 2022-09-28 14:41:01 -04:00
4b0697ee03 make pager and editor configurable, specifically for ansible (#78816)
* make pager and editor configurable, specifically for ansilbe

  fallback on common ways to configure
2022-09-28 10:09:46 -04:00
c7cde2645d apt_repository, handle both new/old gpgp stds (#78735)
* apt_repository, handle both new/old gpgp stds
2022-09-28 10:08:00 -04:00
7acd4f75c0 apt module, prevent tb from invalid type for pkg (#78666)
* apt module, prevent tb from invalid type for pkg

 see #78663
2022-09-28 09:58:03 -04:00
95236c5569 slight var loading optimization (#78835)
Avoid having to recalculate these values since they don't change from first access
2022-09-28 09:13:05 -04:00
3515b3c5fc winrm - fix reducing 'Read timed out' error (#78869)
* winrm - fix reducing 'Read timed out' error

This fix reduces the exceptiopn 'Read timed out. (read timeout=nnn)' occurring seemingly randomly and
unpredictable on some networks (which have long latency and/or many hops or other problems). The fix
ensures that the involved timeout is set to a value so this issue is reduced.

* Add changelog fragment

Co-authored-by: Jordan Borean <jborean93@gmail.com>
2022-09-28 09:00:57 +10:00
bc274f57f7 ansible-test - Improve pylint command consistency. (#78896)
* ansible-test - Improve pylint command consistency.

Co-authored-by: Sviatoslav Sydorenko <wk.cvs.github@sydorenko.org.ua>
2022-09-27 11:39:25 -07:00
6e949d8f5d Added normpath filter (#78894)
Signed-off-by: Shivam Durgbuns <sdurgbun@redhat.com>
2022-09-27 13:21:38 -04:00
7c4d5f5099 documented windows filters (#78876)
* documented windows filters

Co-authored-by: Felix Fontein <felix@fontein.de>
Co-authored-by: Sandra McCann <samccann@redhat.com>
2022-09-27 12:14:14 -04:00
8444d47b11 Adding two new os.path filters and its docs (#78794)
* Adding two new os.path filters and its docs

Signed-off-by: Shivam Durgbuns <sdurgbun@redhat.com>
2022-09-27 11:46:44 -04:00
4115ddd135 plugin loader fix existing config testing (#78859)
create specific function to find config entry to avoid repopulating constantly
2022-09-27 11:34:59 -04:00
71adb02142 Fixes typo in rst format (#78884)
.. hint:: requires a blank line above and below.
2022-09-27 11:11:32 -04:00
9aa9b4eac0 Improve filter docs (#78839) 2022-09-26 14:28:37 -04:00
de4ff281ab 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>
2022-09-26 09:27:20 -04:00
50dae8087e runtime-metadata sanity test: ensure redirects are FQCRs (#78802)
* Ensure that meta/runtime.yml redirects are FQCRs.

* Avoid crash when YAML errors without context mark happen, for example if file starts with 'foo---' instead of '---'.
2022-09-26 07:35:43 -04:00
964e2bc6fe iss#72389: Adds note and polishes docs/docsite/rst/tips_tricks/sample_setup.rst (#78858)
Co-authored-by: Jaroslav Klech <jklech@redhat.com>
2022-09-23 10:19:21 -04:00
d3d7785472 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).
2022-09-22 12:28:54 -07:00
f8f76c5886 Update yum.py (#78829)
##### SUMMARY
The entire yum command should be highlighted, not only its options.


##### ISSUE TYPE
- Docs Pull Request

+label: docsite_pr
2022-09-22 12:09:27 -07:00
16cde1104f ansible-test - Update base and default containers. (#78846) 2022-09-21 15:49:33 -07:00
4c26022171 Don't request repo updates when only testing modes (#78843) (#78850)
(cherry picked from commit 254204856f)
2022-09-21 15:24:19 -07:00
228d25a321 Remove deprecated ANSIBLE_COW_WHITELIST/cow_whitelist (#78831)
Fixes #78819
Fixes #78820
2022-09-21 15:09:05 -05:00
d514aeb2a1 Remove deprecated ANSIBLE_CALLBACK_WHITELIST/callback_whitelist (#78830)
Fixes #78821
Fixes #78822
2022-09-21 15:08:53 -05:00
76b746655a Add use_rsa_sha2_algorithms option for paramiko (#78789)
Fixes #76737
Fixes #77673

Co-authored-by: Matt Clay <matt@mystile.com>
2022-09-21 12:14:55 -05:00
4d25233ece ansible-test - Update Python 3.11 support. (#78840)
- Update sanity test requirements to fully support Python 3.11.
- Make Python 3.11 the default in the base and default test containers.
2022-09-21 10:09:11 -07:00
163819efa2 tests: Fix test_ansible_version() when run within a git checkout (#78636)
When running the unit tests locally, in a git clone, `ansible --test`
prints additional information about the git revision, e.g.

```
~/src/ansible$ ansible --version
ansible 2.10.8
...
~/src/ansible$ source hacking/env-setup
...

Setting up Ansible to run out of checkout...
...
~/src/ansible$ ansible --version
[WARNING]: You are running the development version of Ansible. You
should only run Ansible from "devel" if you are modifying the Ansible
engine, or trying out features under development. This is a rapidly
changing source of code and can become unstable at any point.
ansible [core 2.14.0.dev0] (test_ansible_version-devel df497ea13b) last
updated 2022/08/25 10:37:07 (GMT +100)
...
```

which causes `test_ansible_version()` to fail.

Also removed an unused argument from previous parameterisation.

Co-authored-by: Alex Willmer <alex.willmer@cgi.com>
2022-09-21 09:34:53 -07:00
1b47def5ed Add ssh_args and friends back, add var for proxy_command (#78826)
Fixes #78750
2022-09-21 10:58:00 -05:00
161e2631f2 Remove missed clog frags (#78825) 2022-09-20 18:31:19 -05:00
f8e8326437 Bump devel to 2.15.0.dev0 (#78817) 2022-09-20 14:04:29 -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
3297 changed files with 53656 additions and 159926 deletions

View File

@ -27,14 +27,11 @@ variables:
- name: coverageBranches
value: devel
- name: entryPoint
value: test/utils/shippable/shippable.sh
value: .azure-pipelines/commands/entry-point.sh
- name: fetchDepth
value: 500
resources:
containers:
- container: default
image: quay.io/ansible/azure-pipelines-test-container:1.9.0
- name: defaultContainer
value: quay.io/ansible/azure-pipelines-test-container:4.0.1
pool: Standard
@ -49,9 +46,6 @@ stages:
targets:
- test: 1
- test: 2
- test: 3
- test: 4
- test: 5
- stage: Units
dependsOn: []
jobs:
@ -61,12 +55,13 @@ stages:
testFormat: units/{0}
targets:
- test: 2.7
- test: 3.5
- test: 3.6
- test: 3.7
- test: 3.8
- test: 3.9
- test: '3.10'
- test: 3.11
- test: 3.12
- stage: Windows
dependsOn: []
jobs:
@ -75,35 +70,62 @@ stages:
nameFormat: Server {0}
testFormat: windows/{0}/1
targets:
- test: 2012
- test: 2012-R2
- test: 2016
- test: 2019
- test: 2022
- stage: Remote
dependsOn: []
jobs:
- template: templates/matrix.yml
- template: templates/matrix.yml # context/target
parameters:
targets:
- name: macOS 12.0
test: macos/12.0
- name: macOS 13.2
test: macos/13.2
- name: RHEL 7.9
test: rhel/7.9
- name: RHEL 8.5 py36
test: rhel/8.5@3.6
- name: RHEL 8.5 py38
test: rhel/8.5@3.8
- name: FreeBSD 12.3
test: freebsd/12.3
- name: FreeBSD 13.0
test: freebsd/13.0
- name: RHEL 8.8 py36
test: rhel/8.8@3.6
- name: RHEL 8.8 py311
test: rhel/8.8@3.11
- name: RHEL 9.2 py39
test: rhel/9.2@3.9
- name: RHEL 9.2 py311
test: rhel/9.2@3.11
- name: FreeBSD 13.2
test: freebsd/13.2
groups:
- 1
- 2
- template: templates/matrix.yml # context/controller
parameters:
targets:
- name: macOS 13.2
test: macos/13.2
- name: RHEL 8.8
test: rhel/8.8
- name: RHEL 9.2
test: rhel/9.2
- name: FreeBSD 13.2
test: freebsd/13.2
groups:
- 3
- 4
- 5
- template: templates/matrix.yml # context/controller (ansible-test container management)
parameters:
targets:
- name: Alpine 3.18
test: alpine/3.18
- name: Fedora 38
test: fedora/38
- name: RHEL 8.8
test: rhel/8.8
- name: RHEL 9.2
test: rhel/9.2
- name: Ubuntu 22.04
test: ubuntu/22.04
groups:
- 6
- stage: Docker
dependsOn: []
jobs:
@ -115,21 +137,28 @@ stages:
test: alpine3
- name: CentOS 7
test: centos7
- name: Fedora 34
test: fedora34
- name: Fedora 35
test: fedora35
- name: openSUSE 15 py2
test: opensuse15py2
- name: openSUSE 15 py3
- name: Fedora 38
test: fedora38
- 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 38
test: fedora38
- name: Ubuntu 22.04
test: ubuntu2204
groups:
- 3
- 4
- 5
@ -141,9 +170,9 @@ stages:
nameFormat: Python {0}
testFormat: galaxy/{0}/1
targets:
- test: 3.8
- test: 3.9
- test: '3.10'
- test: 3.11
- test: 3.12
- stage: Generic
dependsOn: []
jobs:
@ -152,21 +181,9 @@ stages:
nameFormat: Python {0}
testFormat: generic/{0}/1
targets:
- test: 3.8
- test: 3.9
- test: '3.10'
- stage: Incidental_Remote
displayName: Incidental Remote
dependsOn: []
jobs:
- template: templates/matrix.yml
parameters:
testFormat: i/{0}
targets:
- name: RHEL 8.5 py36
test: rhel/8.5@3.6
- name: RHEL 8.5 py38
test: rhel/8.5@3.8
- test: 3.11
- test: 3.12
- stage: Incidental_Windows
displayName: Incidental Windows
dependsOn: []
@ -176,8 +193,6 @@ stages:
nameFormat: Server {0}
testFormat: i/windows/{0}
targets:
- test: 2012
- test: 2012-R2
- test: 2016
- test: 2019
- test: 2022
@ -192,12 +207,6 @@ stages:
test: ios/csr1000v/
- name: VyOS Python
test: vyos/1.1.8/
- name: AWS Python 2.7
test: aws/2.7
- name: AWS Python 3.6
test: aws/3.6
- name: Cloud Python
test: cloud/
- stage: Summary
condition: succeededOrFailed()
dependsOn:
@ -208,7 +217,6 @@ stages:
- Docker
- Galaxy
- Generic
- Incidental_Remote
- Incidental_Windows
- Incidental
jobs:

View File

@ -59,4 +59,4 @@ fi
ansible-test env --dump --show --timeout "${timeout}" --color -v
"test/utils/shippable/${script}.sh" "${test}"
".azure-pipelines/commands/${script}.sh" "${test}"

View File

@ -11,4 +11,4 @@ script="${args[1]}"
IFS='/' test="${args[*]:1}"
"test/utils/shippable/incidental/${script}.sh" "${test}"
".azure-pipelines/commands/incidental/${script}.sh" "${test}"

View File

@ -16,7 +16,7 @@ provider="${P:-default}"
python_default="$(PYTHONPATH="${PWD}/test/lib" python -c 'from ansible_test._internal import constants; print(constants.CONTROLLER_MIN_PYTHON_VERSION)')"
# version to test when only testing a single version
single_version=2012-R2
single_version=2022
# shellcheck disable=SC2086
ansible-test windows-integration --list-targets -v ${CHANGED:+"$CHANGED"} ${UNSTABLE:+"$UNSTABLE"} > /tmp/explain.txt 2>&1 || { cat /tmp/explain.txt && false; }

View File

@ -0,0 +1,41 @@
#!/usr/bin/env bash
set -o pipefail -eux
declare -a args
IFS='/:' read -ra args <<< "$1"
group="${args[1]}"
group2_include=(
ansible-doc
changelog
package-data
pep8
pylint
validate-modules
)
group1_exclude=(
"${group2_include[@]}"
)
options=()
case "${group}" in
1)
for name in "${group1_exclude[@]}"; do
options+=(--skip-test "${name}")
done
;;
2)
for name in "${group2_include[@]}"; do
options+=(--test "${name}")
done
;;
esac
# shellcheck disable=SC2086
ansible-test sanity --color -v --junit ${COVERAGE:+"$COVERAGE"} ${CHANGED:+"$CHANGED"} \
--docker \
"${options[@]}" --allow-disabled

View File

@ -21,7 +21,7 @@ IFS=' ' read -r -a python_versions <<< \
python_default="$(PYTHONPATH="${PWD}/test/lib" python -c 'from ansible_test._internal import constants; print(constants.CONTROLLER_MIN_PYTHON_VERSION)')"
# version to test when only testing a single version
single_version=2012-R2
single_version=2022
# shellcheck disable=SC2086
ansible-test windows-integration --list-targets -v ${CHANGED:+"$CHANGED"} ${UNSTABLE:+"$UNSTABLE"} > /tmp/explain.txt 2>&1 || { cat /tmp/explain.txt && false; }

View File

@ -6,7 +6,7 @@
jobs:
- job: Coverage
displayName: Code Coverage
container: default
container: $[ variables.defaultContainer ]
workspace:
clean: all
steps:

View File

@ -11,7 +11,7 @@ jobs:
- ${{ each job in parameters.jobs }}:
- job: test_${{ replace(replace(replace(replace(job.test, '/', '_'), '.', '_'), '-', '_'), '@', '_') }}
displayName: ${{ job.name }}
container: default
container: $[ variables.defaultContainer ]
workspace:
clean: all
steps:

4
.git-blame-ignore-revs Normal file
View File

@ -0,0 +1,4 @@
# .git-blame-ignore-revs
# Bulk PowerShell sanity fixes
6def4a3180fe03981ba64c6d8db28fed3bb39c0c
716631189cb5a3f66b3add98f39e64e98bc17bf7

151
.github/BOTMETA.yml vendored
View File

@ -1,151 +0,0 @@
automerge: false
collection_redirect: true
notifications: false
files:
$module_utils/csharp: &id001
labels: windows
maintainers: $team_windows_core
support: core
$module_utils/network:
labels: networking
$module_utils/network/common:
maintainers: $team_networking
support: network
$module_utils/powershell: *id001
$modules:
ignored: ryansb tomaszkiewicz
$modules/lineinfile.py: $team_ansible samdoran
$modules/stat.py:
ignored: bpennypacker
$modules/unarchive.py:
ignored: dagwieers
labels: m:unarchive
maintainers: pileofrogs
$modules/add_host.py:
ignored: skvidal
maintainers: $team_ansible
$modules/get_url.py: ptux
$modules/uri.py:
ignored: romeotheriault
maintainers: $team_ansible
$modules/pip.py: Lujeni webknjaz
$modules//yum.py:
ignored: skvidal
maintainers: $team_ansible kustodian
$modules/user.py: $team_ansible samdoran
$modules/pause.py: samdoran
$modules/wait_for.py: gregswift
$plugins/cliconf/:
labels: networking
$plugins/connection/psrp.py: *id001
$plugins/connection/winrm.py: *id001
$plugins/doc_fragments/url_windows.py:
labels: windows
maintainers: $team_windows_core
support: core
$plugins/httpapi:
labels: networking
maintainers: $team_networking
support: network
$plugins/netconf/:
labels: networking
maintainers: $team_networking
support: network
$plugins/shell/powershell.py: *id001
$plugins/terminal/:
labels: networking
$plugins/terminal/__init__.py:
support: network
.github/BOTMETA.yml:
labels: botmeta
support: core
docs/:
maintainers:
- acozine
docs/docsite/rst/community/:
maintainers:
- gundalow
docs/docsite/rst/dev_guide/:
maintainers:
- gundalow
docs/docsite/rst/network/:
labels: networking
maintainers:
- samccann
docs/docsite/rst/user_guide/windows: *id001
hacking/report.py:
notified: mattclay
hacking/shippable/:
notified: mattclay
lib/ansible/cli/scripts/ansible_connection_cli_stub.py:
keywords:
- persistent connection
labels: networking
lib/ansible/config/ansible_builtin_runtime.yml:
labels: runtime
maintainers: gundalow
lib/ansible/executor/powershell: *id001
lib/ansible/inventory:
keywords:
- core inventory
- inventory
- inventory parsing
lib/ansible/playbook/handler.py:
keywords:
- handlers
lib/ansible/playbook/role:
keywords:
- roles path
- roles_path
- role
- role path
lib/ansible/playbook/role/include.py:
keywords:
- include role
- include_role
- role include
lib/ansible/playbook/role/requirement.py:
keywords:
- role dependencies
- role dep
- role dependency
lib/ansible/release.py:
notified: mattclay nitzmahone
lib/ansible/template:
keywords:
- jinja
- jinja2
lib/ansible/utils/collection_loader.py:
notified: mattclay nitzmahone
test/integration/targets/incidental_:
notified: mattclay
test/lib/:
notified: mattclay
test/lib/ansible_test/_util/controller/sanity/validate-modules:
keywords:
- validate-modules
notified:
- mattclay
test/lib/ansible_test/_util/controller/sanity/validate-modules/validate_modules/main.py:
notified:
- gundalow
- sivel
test/lib/ansible_test/_util/controller/sanity/validate-modules/validate_modules/schema.py:
notified:
- gundalow
- sivel
test/sanity/:
notified: mattclay
test/sanity/ignore.txt:
notified: tremble
test/support/:
notified: mattclay
test/utils/shippable/:
notified: mattclay
macros:
module_utils: lib/ansible/module_utils
modules: lib/ansible/modules
plugins: lib/ansible/plugins
team_ansible: []
team_networking: Qalthos ganeshrn trishnaguha justjais NilashishC danielmellado rohitthakur2590 GomathiselviS
team_windows_core: nitzmahone jborean93

View File

@ -96,7 +96,7 @@ body:
label: Ansible Version
description: >-
Paste verbatim output from `ansible --version` below, under
the prompt line. Please don't wrap it with tripple backticks — your
the prompt line. Please don't wrap it with triple backticks — your
whole input will be turned into a code snippet automatically.
render: console
value: |
@ -119,15 +119,17 @@ body:
attributes:
label: Configuration
description: >-
Paste verbatim output from `ansible-config dump --only-changed`
below, under the prompt line.
Please don't wrap it with tripple backticks — your
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 triple backticks — your
whole input will be turned into a code snippet automatically.
render: console
value: |
$ 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: |
$ 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
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
@ -191,7 +193,7 @@ body:
description: |
Describe what actually happened. If possible run with extra verbosity (`-vvvv`).
Paste verbatim command output and don't wrap it with tripple backticks — your
Paste verbatim command output and don't wrap it with triple backticks — your
whole input will be turned into a code snippet automatically.
render: console
placeholder: >-
@ -247,7 +249,7 @@ body:
[ansibot help]:
/ansible/ansibullbot/blob/master/ISSUE_HELP.md#for-issue-submitters
/ansible/ansibotmini#ansibotmini
- type: checkboxes

View File

@ -34,6 +34,32 @@ body:
[submit a pull request]:
https://docs.ansible.com/ansible-core/devel/community/documentation_contributions.html
- type: markdown
attributes:
value: >
**Check the repository for your issue.**
Source files for Ansible community documentation are
hosted in different repositories. Please make sure to file an
issue in the correct project.
Documentation for modules/plugins/etc that are officially
supported by the Ansible Core Engineering team is available
in this (`ansible/ansible`) repository.
The Installation Guide, Playbook Guide, Developer Guide,
and other documentation is available in the
[ansible/ansible-documentation] repository.
Documentation for other modules/plugins/etc is likely to be
available in one of the [Ansible Collections][collections index].
If available in the collection documentation, select the
**Issue Tracker** button to go directly to the GitHub issues.
[ansible/ansible-documentation]: /ansible/ansible-documentation
[collections index]:
https://docs.ansible.com/ansible/latest/collections/index.html
- type: textarea
attributes:
@ -64,9 +90,6 @@ body:
<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!_
@ -85,19 +108,7 @@ body:
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
placeholder: lib/ansible/modules/copy.py
validations:
required: true
@ -106,7 +117,7 @@ body:
label: Ansible Version
description: >-
Paste verbatim output from `ansible --version` below, under
the prompt line. Please don't wrap it with tripple backticks — your
the prompt line. Please don't wrap it with triple backticks — your
whole input will be turned into a code snippet automatically.
render: console
value: |
@ -129,15 +140,17 @@ body:
attributes:
label: Configuration
description: >-
Paste verbatim output from `ansible-config dump --only-changed`
below, under the prompt line.
Please don't wrap it with tripple backticks — your
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 triple backticks — your
whole input will be turned into a code snippet automatically.
render: console
value: |
$ 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: |
$ 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
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
@ -183,7 +196,7 @@ body:
[ansibot help]:
/ansible/ansibullbot/blob/master/ISSUE_HELP.md#for-issue-submitters
/ansible/ansibotmini#ansibotmini
- type: checkboxes

View File

@ -176,7 +176,7 @@ body:
[ansibot help]:
/ansible/ansibullbot/blob/master/ISSUE_HELP.md#for-issue-submitters
/ansible/ansibotmini#ansibotmini
- type: checkboxes

View File

@ -1,23 +1,25 @@
##### SUMMARY
<!--- Describe the change below, including rationale and design decisions -->
<!--- HINT: Include "Fixes #nnn" if you are fixing an existing issue -->
##### ISSUE TYPE
<!--- Pick one below and delete the rest -->
- Bugfix Pull Request
- Docs Pull Request
- Feature Pull Request
- Test Pull Request
##### COMPONENT NAME
<!--- Write the short name of the module, plugin, task or feature below -->
##### ADDITIONAL INFORMATION
<!--- Include additional information to help people understand the change here -->
<!--- A step-by-step reproduction of the problem is helpful if there is no related issue -->
<!--- Paste verbatim command output below, e.g. before and after your change -->
```paste below
```

17
.github/RELEASE_NAMES.txt vendored Normal file
View File

@ -0,0 +1,17 @@
2.16.0 All My Love
2.15.0 Ten Years Gone
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
2.8.0 How Many More Times
2.7.0 In the Light
2.6.0 Heartbreaker
2.5.0 Kashmir
2.4.0 Dancing Days
2.3.0 Ramble On
2.2.0 The Battle of Evermore
2.1.0 The Song Remains the Same
2.0.0 Over the Hills and Far Away

View File

@ -1,15 +0,0 @@
---
- 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
- 2.8.0 How Many More Times
- 2.7.0 In the Light
- 2.6.0 Heartbreaker
- 2.5.0 Kashmir
- 2.4.0 Dancing Days
- 2.3.0 Ramble On
- 2.2.0 The Battle of Evermore
- 2.1.0 The Song Remains the Same
- 2.0.0 Over the Hills and Far Away

12
.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
@ -72,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.
@ -89,8 +99,6 @@ lib/ansible/_vendor/*
/test/integration/cloud-config-*.*
!/test/integration/cloud-config-*.*.template
.python-version
/hacking/tests/selinux/*.mod
/hacking/tests/selinux/*.pp
# Release directory
packaging/release/ansible_release
/.cache/

View File

@ -1,7 +1,7 @@
GNU GENERAL PUBLIC LICENSE
Version 3, 29 June 2007
Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
Copyright (C) 2007 Free Software Foundation, Inc. <https://fsf.org/>
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
@ -645,7 +645,7 @@ the "copyright" line and a pointer to where the full notice is found.
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
along with this program. If not, see <https://www.gnu.org/licenses/>.
Also add information on how to contact you by electronic and paper mail.
@ -664,12 +664,11 @@ might be different; for a GUI interface, you would use an "about box".
You should also get your employer (if you work as a programmer) or school,
if any, to sign a "copyright disclaimer" for the program, if necessary.
For more information on this, and how to apply and follow the GNU GPL, see
<http://www.gnu.org/licenses/>.
<https://www.gnu.org/licenses/>.
The GNU General Public License does not permit incorporating your program
into proprietary programs. If your program is a subroutine library, you
may consider it more useful to permit linking proprietary applications with
the library. If this is what you want to do, use the GNU Lesser General
Public License instead of this License. But first, please read
<http://www.gnu.org/philosophy/why-not-lgpl.html>.
<https://www.gnu.org/licenses/why-not-lgpl.html>.

View File

@ -1,50 +1,11 @@
include README.rst
include COPYING
include SYMLINK_CACHE.json
include requirements.txt
recursive-include docs *
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/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
include examples/ansible.cfg
include examples/scripts/ConfigureRemotingForAnsible.ps1
include examples/scripts/upgrade_to_ps3.ps1
include lib/ansible/keyword_desc.yml
recursive-include lib/ansible/executor/powershell *.ps1
recursive-include lib/ansible/module_utils/csharp *.cs
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 licenses *.txt
recursive-include packaging *
recursive-include test/ansible_test *.py Makefile
recursive-include test/integration *
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
include bin/*
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/*
include licenses/*.txt
include requirements.txt
recursive-include packaging *.py *.j2
recursive-include test/integration *
recursive-include test/sanity *.in *.json *.py *.txt
recursive-include test/support *.py *.ps1 *.psm1 *.cs *.md
recursive-include test/units *

154
Makefile
View File

@ -1,154 +0,0 @@
# WARN: gmake syntax
########################################################
# Makefile for Ansible
#
# useful targets:
# make clean ---------------- clean up
# make sdist ---------------- produce a tarball
# make tests ---------------- run the tests (see https://docs.ansible.com/ansible/devel/dev_guide/testing_units.html for requirements)
########################################################
# variable section
NAME = ansible-core
OS = $(shell uname -s)
PREFIX ?= '/usr/local'
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),)
ASCII2MAN = rst2man $< $@
else ifneq ($(shell which 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
endif
PYTHON ?= python
GENERATE_CLI = hacking/build-ansible.py generate-man
# fetch version from project release.py as single source-of-truth
VERSION := $(shell $(PYTHON) packaging/release/versionhelper/version_helper.py --raw || echo error)
ifeq ($(findstring error,$(VERSION)), error)
$(error "version_helper failed")
endif
# ansible-test parameters
ANSIBLE_TEST ?= bin/ansible-test
TEST_FLAGS ?=
# ansible-test units parameters (make test / make test-py3)
PYTHON_VERSION ?= $(shell python2 -c 'import sys; print("%s.%s" % sys.version_info[:2])')
PYTHON3_VERSION ?= $(shell python3 -c 'import sys; print("%s.%s" % sys.version_info[:2])')
# ansible-test integration parameters (make integration)
IMAGE ?= centos7
TARGET ?=
########################################################
.PHONY: all
all: clean python
.PHONY: tests
tests:
$(ANSIBLE_TEST) units -v --python $(PYTHON_VERSION) $(TEST_FLAGS)
.PHONY: tests-py3
tests-py3:
$(ANSIBLE_TEST) units -v --python $(PYTHON3_VERSION) $(TEST_FLAGS)
.PHONY: integration
integration:
$(ANSIBLE_TEST) integration -v --docker $(IMAGE) $(TARGET) $(TEST_FLAGS)
# Regenerate %.1.rst if %.1.rst.in has been modified more
# recently than %.1.rst.
%.1.rst: %.1.rst.in
sed "s/%VERSION%/$(VERSION)/" $< > $@
rm $<
# Regenerate %.1 if %.1.rst or release.py has been modified more
# recently than %.1. (Implicitly runs the %.1.rst recipe)
%.1: %.1.rst lib/ansible/release.py
$(ASCII2MAN)
.PHONY: clean
clean:
@echo "Cleaning up distutils stuff"
rm -rf build
rm -rf dist
rm -rf lib/ansible*.egg-info/
@echo "Cleaning up byte compiled python stuff"
find . -type f -regex ".*\.py[co]$$" -delete
find . -type d -name "__pycache__" -delete
@echo "Cleaning up editor backup files"
find . -type f -not -path ./test/units/inventory_test_data/group_vars/noparse/all.yml~ \( -name "*~" -or -name "#*" \) -delete
find . -type f \( -name "*.swp" \) -delete
@echo "Cleaning up manpage stuff"
find ./docs/man -type f -name "*.xml" -delete
find ./docs/man -type f -name "*.rst" -delete
find ./docs/man/man3 -type f -name "*.3" -delete
rm -f ./docs/man/man1/*
@echo "Cleaning up output from test runs"
rm -rf test/test_data
rm -rf logs/
rm -rf .cache/
rm -f test/units/.coverage*
rm -rf test/results/*/*
find test/ -type f -name '*.retry' -delete
@echo "Cleaning up symlink cache"
rm -f SYMLINK_CACHE.json
rm -rf docs/json
rm -rf docs/js
@echo "Cleaning up docsite"
$(MAKE) -C docs/docsite clean
.PHONY: python
python:
$(PYTHON) setup.py build
.PHONY: install
install:
$(PYTHON) setup.py install
install_manpages:
gzip -9 $(wildcard ./docs/man/man1/ansible*.1)
cp $(wildcard ./docs/man/man1/ansible*.1.gz) $(PREFIX)/man/man1/
.PHONY: sdist_check
sdist_check:
$(PYTHON) -c 'import setuptools, sys; sys.exit(int(not (tuple(map(int, setuptools.__version__.split("."))) > (39, 2, 0))))'
$(PYTHON) packaging/sdist/check-link-behavior.py
.PHONY: sdist
sdist: sdist_check clean docs
_ANSIBLE_SDIST_FROM_MAKEFILE=1 $(PYTHON) setup.py sdist --dist-dir=$(SDIST_DIR)
# Official releases generate the changelog as the last commit before the release.
# Snapshots shouldn't result in new checkins so the changelog is generated as
# part of creating the tarball.
.PHONY: snapshot
snapshot: sdist_check clean docs changelog
_ANSIBLE_SDIST_FROM_MAKEFILE=1 $(PYTHON) setup.py sdist --dist-dir=$(SDIST_DIR)
.PHONY: sdist_upload
sdist_upload: clean docs
$(PYTHON) setup.py sdist upload 2>&1 |tee upload.log
.PHONY: changelog
changelog:
PYTHONPATH=./lib antsibull-changelog release -vv --use-ansible-doc && PYTHONPATH=./lib antsibull-changelog generate -vv --use-ansible-doc
.PHONY: generate_rst
generate_rst: lib/ansible/cli/*.py
mkdir -p ./docs/man/man1/ ; \
$(PYTHON) $(GENERATE_CLI) --template-file=docs/templates/man.j2 --output-dir=docs/man/man1/ --output-format man lib/ansible/cli/*.py
docs: generate_rst
$(MAKE) $(MANPAGES)
version:
@echo $(VERSION)

89
README.md Normal file
View File

@ -0,0 +1,89 @@
[![PyPI version](https://img.shields.io/pypi/v/ansible-core.svg)](https://pypi.org/project/ansible-core)
[![Docs badge](https://img.shields.io/badge/docs-latest-brightgreen.svg)](https://docs.ansible.com/ansible/latest/)
[![Chat badge](https://img.shields.io/badge/chat-IRC-brightgreen.svg)](https://docs.ansible.com/ansible/latest/community/communication.html)
[![Build Status](https://dev.azure.com/ansible/ansible/_apis/build/status/CI?branchName=devel)](https://dev.azure.com/ansible/ansible/_build/latest?definitionId=20&branchName=devel)
[![Ansible Code of Conduct](https://img.shields.io/badge/code%20of%20conduct-Ansible-silver.svg)](https://docs.ansible.com/ansible/latest/community/code_of_conduct.html)
[![Ansible mailing lists](https://img.shields.io/badge/mailing%20lists-Ansible-orange.svg)](https://docs.ansible.com/ansible/latest/community/communication.html#mailing-list-information)
[![Repository License](https://img.shields.io/badge/license-GPL%20v3.0-brightgreen.svg)](COPYING)
[![Ansible CII Best Practices certification](https://bestpractices.coreinfrastructure.org/projects/2372/badge)](https://bestpractices.coreinfrastructure.org/projects/2372)
# 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/).
## Design Principles
* 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
friendly.
* Focus on security and easy auditability/review/rewriting of content.
* Manage new remote machines instantly, without bootstrapping any
software.
* Allow module development in any dynamic language, not just Python.
* Be usable as non-root.
* Be the easiest IT automation system to use, ever.
## Use Ansible
You can install a released version of Ansible with `pip` or a package manager. See our
[installation guide](https://docs.ansible.com/ansible/latest/installation_guide/intro_installation.html) for details on installing Ansible
on a variety of platforms.
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
in the Ansible community if you want to run the `devel` branch.
## Get Involved
* Read [Community Information](https://docs.ansible.com/ansible/latest/community) for all
kinds of ways to contribute to and interact with the project,
including mailing list information and how to submit bug reports and
code to Ansible.
* Join a [Working Group](https://github.com/ansible/community/wiki),
an organized community devoted to a specific technology domain or platform.
* Submit a proposed code update through a pull request to the `devel` branch.
* Talk to us before making larger changes
to avoid duplicate efforts. This not only helps everyone
know what is going on, but it also helps save time and effort if we decide
some changes are needed.
* For a list of email lists, IRC channels and Working Groups, see the
[Communication page](https://docs.ansible.com/ansible/latest/community/communication.html)
## Coding Guidelines
We document our Coding Guidelines in the [Developer Guide](https://docs.ansible.com/ansible/devel/dev_guide/). We particularly suggest you review:
* [Contributing your module to Ansible](https://docs.ansible.com/ansible/devel/dev_guide/developing_modules_checklist.html)
* [Conventions, tips, and pitfalls](https://docs.ansible.com/ansible/devel/dev_guide/developing_modules_best_practices.html)
## Branch Info
* The `devel` branch corresponds to the release actively under development.
* The `stable-2.X` branches correspond to stable releases.
* Create a branch based on `devel` and set up a [dev environment](https://docs.ansible.com/ansible/latest/dev_guide/developing_modules_general.html#common-environment-setup) if you want to open a PR.
* See the [Ansible release and maintenance](https://docs.ansible.com/ansible/devel/reference_appendices/release_and_maintenance.html) page for information about active branches.
## Roadmap
Based on team and community feedback, an initial roadmap will be published for a major or minor version (ex: 2.7, 2.8).
The [Ansible Roadmap page](https://docs.ansible.com/ansible/devel/roadmap/) details what is planned and how to influence the roadmap.
## Authors
Ansible was created by [Michael DeHaan](https://github.com/mpdehaan)
and has contributions from over 5000 users (and growing). Thanks everyone!
[Ansible](https://www.ansible.com) is sponsored by [Red Hat, Inc.](https://www.redhat.com)
## License
GNU General Public License v3.0 or later
See [COPYING](COPYING) to see the full text.

View File

@ -1,115 +0,0 @@
|PyPI version| |Docs badge| |Chat badge| |Build Status| |Code Of Conduct| |Mailing Lists| |License| |CII Best Practices|
*******
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/>`_.
Design Principles
=================
* 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
friendly.
* Focus on security and easy auditability/review/rewriting of content.
* Manage new remote machines instantly, without bootstrapping any
software.
* Allow module development in any dynamic language, not just Python.
* Be usable as non-root.
* Be the easiest IT automation system to use, ever.
Use Ansible
===========
You can install a released version of Ansible with ``pip`` or a package manager. See our
`installation guide <https://docs.ansible.com/ansible/latest/installation_guide/intro_installation.html>`_ for details on installing Ansible
on a variety of platforms.
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
in the Ansible community if you want to run the ``devel`` branch.
Get Involved
============
* Read `Community
Information <https://docs.ansible.com/ansible/latest/community>`_ for all
kinds of ways to contribute to and interact with the project,
including mailing list information and how to submit bug reports and
code to Ansible.
* Join a `Working Group
<https://github.com/ansible/community/wiki>`_, an organized community devoted to a specific technology domain or platform.
* Submit a proposed code update through a pull request to the ``devel`` branch.
* Talk to us before making larger changes
to avoid duplicate efforts. This not only helps everyone
know what is going on, but it also helps save time and effort if we decide
some changes are needed.
* For a list of email lists, IRC channels and Working Groups, see the
`Communication page <https://docs.ansible.com/ansible/latest/community/communication.html>`_
Coding Guidelines
=================
We document our Coding Guidelines in the `Developer Guide <https://docs.ansible.com/ansible/devel/dev_guide/>`_. We particularly suggest you review:
* `Contributing your module to Ansible <https://docs.ansible.com/ansible/devel/dev_guide/developing_modules_checklist.html>`_
* `Conventions, tips, and pitfalls <https://docs.ansible.com/ansible/devel/dev_guide/developing_modules_best_practices.html>`_
Branch Info
===========
* The ``devel`` branch corresponds to the release actively under development.
* The ``stable-2.X`` branches correspond to stable releases.
* Create a branch based on ``devel`` and set up a `dev environment <https://docs.ansible.com/ansible/latest/dev_guide/developing_modules_general.html#common-environment-setup>`_ if you want to open a PR.
* See the `Ansible release and maintenance <https://docs.ansible.com/ansible/devel/reference_appendices/release_and_maintenance.html>`_ page for information about active branches.
Roadmap
=======
Based on team and community feedback, an initial roadmap will be published for a major or minor version (ex: 2.7, 2.8).
The `Ansible Roadmap page <https://docs.ansible.com/ansible/devel/roadmap/>`_ details what is planned and how to influence the roadmap.
Authors
=======
Ansible was created by `Michael DeHaan <https://github.com/mpdehaan>`_
and has contributions from over 5000 users (and growing). Thanks everyone!
`Ansible <https://www.ansible.com>`_ is sponsored by `Red Hat, Inc.
<https://www.redhat.com>`_
License
=======
GNU General Public License v3.0 or later
See `COPYING <COPYING>`_ to see the full text.
.. |PyPI version| image:: https://img.shields.io/pypi/v/ansible-core.svg
:target: https://pypi.org/project/ansible-core
.. |Docs badge| image:: https://img.shields.io/badge/docs-latest-brightgreen.svg
:target: https://docs.ansible.com/ansible/latest/
.. |Build Status| image:: https://dev.azure.com/ansible/ansible/_apis/build/status/CI?branchName=devel
:target: https://dev.azure.com/ansible/ansible/_build/latest?definitionId=20&branchName=devel
.. |Chat badge| image:: https://img.shields.io/badge/chat-IRC-brightgreen.svg
:target: https://docs.ansible.com/ansible/latest/community/communication.html
.. |Code Of Conduct| image:: https://img.shields.io/badge/code%20of%20conduct-Ansible-silver.svg
:target: https://docs.ansible.com/ansible/latest/community/code_of_conduct.html
:alt: Ansible Code of Conduct
.. |Mailing Lists| image:: https://img.shields.io/badge/mailing%20lists-Ansible-orange.svg
:target: https://docs.ansible.com/ansible/latest/community/communication.html#mailing-list-information
:alt: Ansible mailing lists
.. |License| image:: https://img.shields.io/badge/license-GPL%20v3.0-brightgreen.svg
:target: COPYING
:alt: Repository License
.. |CII Best Practices| image:: https://bestpractices.coreinfrastructure.org/projects/2372/badge
:target: https://bestpractices.coreinfrastructure.org/projects/2372
:alt: Ansible CII Best Practices certification

View File

@ -0,0 +1,342 @@
=============================================
ansible-core 2.16 "All My Love" Release Notes
=============================================
.. contents:: Topics
v2.16.1
=======
Release Summary
---------------
| Release Date: 2023-12-04
| `Porting Guide <https://docs.ansible.com/ansible-core/2.16/porting_guides/porting_guide_core_2.16.html>`__
Breaking Changes / Porting Guide
--------------------------------
- assert - Nested templating may result in an inability for the conditional to be evaluated. See the porting guide for more information.
Security Fixes
--------------
- templating - Address issues where internal templating can cause unsafe variables to lose their unsafe designation (CVE-2023-5764)
Bugfixes
--------
- Fix issue where an ``include_tasks`` handler in a role was not able to locate a file in ``tasks/`` when ``tasks_from`` was used as a role entry point and ``main.yml`` was not present (https://github.com/ansible/ansible/issues/82241)
- Plugin loader does not dedupe nor cache filter/test plugins by file basename, but full path name.
- Restoring the ability of filters/tests can have same file base name but different tests/filters defined inside.
- ansible-pull now will expand relative paths for the ``-d|--directory`` option is now expanded before use.
- ansible-pull will now correctly handle become and connection password file options for ansible-playbook.
- flush_handlers - properly handle a handler failure in a nested block when ``force_handlers`` is set (http://github.com/ansible/ansible/issues/81532)
- module no_log will no longer affect top level booleans, for example ``no_log_module_parameter='a'`` will no longer hide ``changed=False`` as a 'no log value' (matches 'a').
- role params now have higher precedence than host facts again, matching documentation, this had unintentionally changed in 2.15.
- wait_for should not handle 'non mmapable files' again.
v2.16.0
=======
Release Summary
---------------
| Release Date: 2023-11-06
| `Porting Guide <https://docs.ansible.com/ansible-core/2.16/porting_guides/porting_guide_core_2.16.html>`__
Minor Changes
-------------
- Add Python type hints to the Display class (https://github.com/ansible/ansible/issues/80841)
- Add ``GALAXY_COLLECTIONS_PATH_WARNING`` option to disable the warning given by ``ansible-galaxy collection install`` when installing a collection to a path that isn't in the configured collection paths.
- Add ``python3.12`` to the default ``INTERPRETER_PYTHON_FALLBACK`` list.
- Add ``utcfromtimestamp`` and ``utcnow`` to ``ansible.module_utils.compat.datetime`` to return fixed offset datetime objects.
- Add a general ``GALAXY_SERVER_TIMEOUT`` config option for distribution servers (https://github.com/ansible/ansible/issues/79833).
- Added Python type annotation to connection plugins
- CLI argument parsing - Automatically prepend to the help of CLI arguments that support being specified multiple times. (https://github.com/ansible/ansible/issues/22396)
- DEFAULT_TRANSPORT now defaults to 'ssh', the old 'smart' option is being deprecated as versions of OpenSSH without control persist are basically not present anymore.
- Documentation for set filters ``intersect``, ``difference``, ``symmetric_difference`` and ``union`` now states that the returned list items are in arbitrary order.
- Record ``removal_date`` in runtime metadata as a string instead of a date.
- Remove the ``CleansingNodeVisitor`` class and its usage due to the templating changes that made it superfluous. Also simplify the ``Conditional`` class.
- Removed ``exclude`` and ``recursive-exclude`` commands for generated files from the ``MANIFEST.in`` file. These excludes were unnecessary since releases are expected to be built with a clean worktree.
- Removed ``exclude`` commands for sanity test files from the ``MANIFEST.in`` file. These tests were previously excluded because they did not pass when run from an sdist. However, sanity tests are not expected to pass from an sdist, so excluding some (but not all) of the failing tests makes little sense.
- Removed redundant ``include`` commands from the ``MANIFEST.in`` file. These includes either duplicated default behavior or another command.
- The ``ansible-core`` sdist no longer contains pre-generated man pages. Instead, a ``packaging/cli-doc/build.py`` script is included in the sdist. This script can generate man pages and standalone RST documentation for ``ansible-core`` CLI programs.
- The ``docs`` and ``examples`` directories are no longer included in the ``ansible-core`` sdist. These directories have been moved to the https://github.com/ansible/ansible-documentation repository.
- The minimum required ``setuptools`` version is now 66.1.0, as it is the oldest version to support Python 3.12.
- Update ``ansible_service_mgr`` fact to include init system for SMGL OS family
- Use ``ansible.module_utils.common.text.converters`` instead of ``ansible.module_utils._text``.
- Use ``importlib.resources.abc.TraversableResources`` instead of deprecated ``importlib.abc.TraversableResources`` where available (https:/github.com/ansible/ansible/pull/81082).
- Use ``include`` where ``recursive-include`` is unnecessary in the ``MANIFEST.in`` file.
- Use ``package_data`` instead of ``include_package_data`` for ``setup.cfg`` to avoid ``setuptools`` warnings.
- Utilize gpg check provided internally by the ``transaction.run`` method as oppose to calling it manually.
- ``Templar`` - do not add the ``dict`` constructor to ``globals`` as all required Jinja2 versions already do so
- ansible-doc - allow to filter listing of collections and metadata dump by more than one collection (https://github.com/ansible/ansible/pull/81450).
- ansible-galaxy - Add a plural option to improve ignoring multiple signature error status codes when installing or verifying collections. A space-separated list of error codes can follow --ignore-signature-status-codes in addition to specifying --ignore-signature-status-code multiple times (for example, ``--ignore-signature-status-codes NO_PUBKEY UNEXPECTED``).
- ansible-galaxy - Remove internal configuration argument ``v3`` (https://github.com/ansible/ansible/pull/80721)
- ansible-galaxy - add note to the collection dependency resolver error message about pre-releases if ``--pre`` was not provided (https://github.com/ansible/ansible/issues/80048).
- ansible-galaxy - used to crash out with a "Errno 20 Not a directory" error when extracting files from a role when hitting a file with an illegal name (https://github.com/ansible/ansible/pull/81553). Now it gives a warning identifying the culprit file and the rule violation (e.g., ``my$class.jar`` has a ``$`` in the name) before crashing out, giving the user a chance to remove the invalid file and try again. (https://github.com/ansible/ansible/pull/81555).
- ansible-test - Add Alpine 3.18 to remotes
- ansible-test - Add Fedora 38 container.
- ansible-test - Add Fedora 38 remote.
- ansible-test - Add FreeBSD 13.2 remote.
- ansible-test - Add new pylint checker for new ``# deprecated:`` comments within code to trigger errors when time to remove code that has no user facing deprecation message. Only supported in ansible-core, not collections.
- ansible-test - Add support for RHEL 8.8 remotes.
- ansible-test - Add support for RHEL 9.2 remotes.
- ansible-test - Add support for testing with Python 3.12.
- ansible-test - Allow float values for the ``--timeout`` option to the ``env`` command. This simplifies testing.
- ansible-test - Enable ``thread`` code coverage in addition to the existing ``multiprocessing`` coverage.
- ansible-test - Make Python 3.12 the default version used in the ``base`` and ``default`` containers.
- ansible-test - RHEL 8.8 provisioning can now be used with the ``--python 3.11`` option.
- ansible-test - RHEL 9.2 provisioning can now be used with the ``--python 3.11`` option.
- ansible-test - Refactored ``env`` command logic and timeout handling.
- ansible-test - Remove Fedora 37 remote support.
- ansible-test - Remove Fedora 37 test container.
- ansible-test - Remove Python 3.8 and 3.9 from RHEL 8.8.
- ansible-test - Remove obsolete embedded script for configuring WinRM on Windows remotes.
- ansible-test - Removed Ubuntu 20.04 LTS image from the `--remote` option.
- ansible-test - Removed `freebsd/12.4` remote.
- ansible-test - Removed `freebsd/13.1` remote.
- ansible-test - Removed test remotes: rhel/8.7, rhel/9.1
- ansible-test - Removed the deprecated ``--docker-no-pull`` option.
- ansible-test - Removed the deprecated ``--no-pip-check`` option.
- ansible-test - Removed the deprecated ``foreman`` test plugin.
- ansible-test - Removed the deprecated ``govcsim`` support from the ``vcenter`` test plugin.
- ansible-test - Replace the ``pytest-forked`` pytest plugin with a custom plugin.
- ansible-test - The ``no-get-exception`` sanity test is now limited to plugins in collections. Previously any Python file in a collection was checked for ``get_exception`` usage.
- ansible-test - The ``replace-urlopen`` sanity test is now limited to plugins in collections. Previously any Python file in a collection was checked for ``urlopen`` usage.
- ansible-test - The ``use-compat-six`` sanity test is now limited to plugins in collections. Previously any Python file in a collection was checked for ``six`` usage.
- ansible-test - The openSUSE test container has been updated to openSUSE Leap 15.5.
- ansible-test - Update pip to ``23.1.2`` and setuptools to ``67.7.2``.
- ansible-test - Update the ``default`` containers.
- ansible-test - Update the ``nios-test-container`` to version 2.0.0, which supports API version 2.9.
- ansible-test - Update the logic used to detect when ``ansible-test`` is running from source.
- ansible-test - Updated the CloudStack test container to version 1.6.1.
- ansible-test - Updated the distro test containers to version 6.3.0 to include coverage 7.3.2 for Python 3.8+. The alpine3 container is now based on 3.18 instead of 3.17 and includes Python 3.11 instead of Python 3.10.
- ansible-test - Use ``datetime.datetime.now`` with ``tz`` specified instead of ``datetime.datetime.utcnow``.
- ansible-test - Use a context manager to perform cleanup at exit instead of using the built-in ``atexit`` module.
- ansible-test - When invoking ``sleep`` in containers during container setup, the ``env`` command is used to avoid invoking the shell builtin, if present.
- ansible-test - remove Alpine 3.17 from remotes
- ansible-test — Python 3.8–3.12 will use ``coverage`` v7.3.2.
- ansible-test — ``coverage`` v6.5.0 is to be used only under Python 3.7.
- ansible-vault create: Now raises an error when opening the editor without tty. The flag --skip-tty-check restores previous behaviour.
- ansible_user_module - tweaked macos user defaults to reflect expected defaults (https://github.com/ansible/ansible/issues/44316)
- apt - return calculated diff while running apt clean operation.
- blockinfile - add append_newline and prepend_newline options (https://github.com/ansible/ansible/issues/80835).
- cli - Added short option '-J' for asking for vault password (https://github.com/ansible/ansible/issues/80523).
- command - Add option ``expand_argument_vars`` to disable argument expansion and use literal values - https://github.com/ansible/ansible/issues/54162
- config lookup new option show_origin to also return the origin of a configuration value.
- display methods for warning and deprecation are now proxied to main process when issued from a fork. This allows for the deduplication of warnings and deprecations to work globally.
- dnf5 - enable environment groups installation testing in CI as its support was added.
- dnf5 - enable now implemented ``cacheonly`` functionality
- executor now skips persistent connection when it detects an action that does not require a connection.
- find module - Add ability to filter based on modes
- gather_facts now will use gather_timeout setting to limit parallel execution of modules that do not themselves use gather_timeout.
- group - remove extraneous warning shown when user does not exist (https://github.com/ansible/ansible/issues/77049).
- include_vars - os.walk now follows symbolic links when traversing directories (https://github.com/ansible/ansible/pull/80460)
- module compression is now sourced directly via config, bypassing play_context possibly stale values.
- reboot - show last error message in verbose logs (https://github.com/ansible/ansible/issues/81574).
- service_facts now returns more info for rcctl managed systesm (OpenBSD).
- tasks - the ``retries`` keyword can be specified without ``until`` in which case the task is retried until it succeeds but at most ``retries`` times (https://github.com/ansible/ansible/issues/20802)
- user - add new option ``password_expire_warn`` (supported on Linux only) to set the number of days of warning before a password change is required (https://github.com/ansible/ansible/issues/79882).
- yum_repository - Align module documentation with parameters
Breaking Changes / Porting Guide
--------------------------------
- Any plugin using the config system and the `cli` entry to use the `timeout` from the command line, will see the value change if the use had configured it in any of the lower precedence methods. If relying on this behaviour to consume the global/generic timeout from the DEFAULT_TIMEOUT constant, please consult the documentation on plugin configuration to add the overlaping entries.
- ansible-test - Test plugins that rely on containers no longer support reusing running containers. The previous behavior was an undocumented, untested feature.
- service module will not permanently configure variables/flags for openbsd when doing enable/disable operation anymore, this module was never meant to do this type of work, just to manage the service state itself. A rcctl_config or similar module should be created and used instead.
Deprecated Features
-------------------
- Deprecated ini config option ``collections_paths``, use the singular form ``collections_path`` instead
- Deprecated the env var ``ANSIBLE_COLLECTIONS_PATHS``, use the singular form ``ANSIBLE_COLLECTIONS_PATH`` instead
- Old style vars plugins which use the entrypoints `get_host_vars` or `get_group_vars` are deprecated. The plugin should be updated to inherit from `BaseVarsPlugin` and define a `get_vars` method as the entrypoint.
- Support for Windows Server 2012 and 2012 R2 has been removed as the support end of life from Microsoft is October 10th 2023. These versions of Windows will no longer be tested in this Ansible release and it cannot be guaranteed that they will continue to work going forward.
- ``STRING_CONVERSION_ACTION`` config option is deprecated as it is no longer used in the Ansible Core code base.
- the 'smart' option for setting a connection plugin is being removed as it's main purpose (choosing between ssh and paramiko) is now irrelevant.
- vault and unfault filters - the undocumented ``vaultid`` parameter is deprecated and will be removed in ansible-core 2.20. Use ``vault_id`` instead.
- yum_repository - deprecated parameter 'keepcache' (https://github.com/ansible/ansible/issues/78693).
Removed Features (previously deprecated)
----------------------------------------
- ActionBase - remove deprecated ``_remote_checksum`` method
- PlayIterator - remove deprecated ``cache_block_tasks`` and ``get_original_task`` methods
- Remove deprecated ``FileLock`` class
- Removed Python 3.9 as a supported version on the controller. Python 3.10 or newer is required.
- Removed ``include`` which has been deprecated in Ansible 2.12. Use ``include_tasks`` or ``import_tasks`` instead.
- ``Templar`` - remove deprecated ``shared_loader_obj`` parameter of ``__init__``
- ``fetch_url`` - remove auto disabling ``decompress`` when gzip is not available
- ``get_action_args_with_defaults`` - remove deprecated ``redirected_names`` method parameter
- ansible-test - Removed support for the remote Windows targets 2012 and 2012-R2
- inventory_cache - remove deprecated ``default.fact_caching_prefix`` ini configuration option, use ``defaults.fact_caching_prefix`` instead.
- module_utils/basic.py - Removed Python 3.5 as a supported remote version. Python 2.7 or Python 3.6+ is now required.
- stat - removed unused `get_md5` parameter.
Security Fixes
--------------
- ansible-galaxy - Prevent roles from using symlinks to overwrite files outside of the installation directory (CVE-2023-5115)
Bugfixes
--------
- Allow for searching handler subdir for included task via include_role (https://github.com/ansible/ansible/issues/81722)
- AnsibleModule.run_command - Only use selectors when needed, and rely on Python stdlib subprocess for the simple task of collecting stdout/stderr when prompt matching is not required.
- Cache host_group_vars after instantiating it once and limit the amount of repetitive work it needs to do every time it runs.
- Call PluginLoader.all() once for vars plugins, and load vars plugins that run automatically or are enabled specifically by name subsequently.
- Display - Defensively configure writing to stdout and stderr with a custom encoding error handler that will replace invalid characters while providing a deprecation warning that non-utf8 text will result in an error in a future version.
- Exclude internal options from man pages and docs.
- Fix ``ansible-config init`` man page option indentation.
- Fix ``ast`` deprecation warnings for ``Str`` and ``value.s`` when using Python 3.12.
- Fix ``run_once`` being incorrectly interpreted on handlers (https://github.com/ansible/ansible/issues/81666)
- Fix exceptions caused by various inputs when performing arg splitting or parsing key/value pairs. Resolves issue https://github.com/ansible/ansible/issues/46379 and issue https://github.com/ansible/ansible/issues/61497
- Fix incorrect parsing of multi-line Jinja2 blocks when performing arg splitting or parsing key/value pairs.
- Fix post-validating looped task fields so the strategy uses the correct values after task execution.
- Fixed `pip` module failure in case of usage quotes for `virtualenv_command` option for the venv command. (https://github.com/ansible/ansible/issues/76372)
- From issue https://github.com/ansible/ansible/issues/80880, when notifying a handler from another handler, handler notifications must be registered immediately as the flush_handler call is not recursive.
- Import ``FILE_ATTRIBUTES`` from ``ansible.module_utils.common.file`` in ``ansible.module_utils.basic`` instead of defining it twice.
- Inventory scripts parser not treat exception when getting hostsvar (https://github.com/ansible/ansible/issues/81103)
- On Python 3 use datetime methods ``fromtimestamp`` and ``now`` with UTC timezone instead of ``utcfromtimestamp`` and ``utcnow``, which are deprecated in Python 3.12.
- PluginLoader - fix Jinja plugin performance issues (https://github.com/ansible/ansible/issues/79652)
- PowerShell - Remove some code which is no longer valid for dotnet 5+
- Prevent running same handler multiple times when included via ``include_role`` (https://github.com/ansible/ansible/issues/73643)
- Prompting - add a short sleep between polling for user input to reduce CPU consumption (https://github.com/ansible/ansible/issues/81516).
- Properly disable ``jinja2_native`` in the template module when jinja2 override is used in the template (https://github.com/ansible/ansible/issues/80605)
- Properly template tags in parent blocks (https://github.com/ansible/ansible/issues/81053)
- Remove unreachable parser error for removed ``static`` parameter of ``include_role``
- Replace uses of ``configparser.ConfigParser.readfp()`` which was removed in Python 3.12 with ``configparser.ConfigParser.read_file()`` (https://github.com/ansible/ansible/issues/81656)
- Set filters ``intersect``, ``difference``, ``symmetric_difference`` and ``union`` now always return a ``list``, never a ``set``. Previously, a ``set`` would be returned if the inputs were a hashable type such as ``str``, instead of a collection, such as a ``list`` or ``tuple``.
- Set filters ``intersect``, ``difference``, ``symmetric_difference`` and ``union`` now use set operations when the given items are hashable. Previously, list operations were performed unless the inputs were a hashable type such as ``str``, instead of a collection, such as a ``list`` or ``tuple``.
- Switch result queue from a ``multiprocessing.queues.Queue` to ``multiprocessing.queues.SimpleQueue``, primarily to allow properly handling pickling errors, to prevent an infinite hang waiting for task results
- The ``ansible-config init`` command now has a documentation description.
- The ``ansible-galaxy collection download`` command now has a documentation description.
- The ``ansible-galaxy collection install`` command documentation is now visible (previously hidden by a decorator).
- The ``ansible-galaxy collection verify`` command now has a documentation description.
- The ``ansible-galaxy role install`` command documentation is now visible (previously hidden by a decorator).
- The ``ansible-inventory`` command command now has a documentation description (previously used as the epilog).
- The ``hostname`` module now also updates both current and permanent hostname on OpenBSD. Before it only updated the permanent hostname (https://github.com/ansible/ansible/issues/80520).
- Update module_utils.urls unit test to work with cryptography >= 41.0.0.
- When generating man pages, use ``func`` to find the command function instead of looking it up by the command name.
- ``StrategyBase._process_pending_results`` - create a ``Templar`` on demand for templating ``changed_when``/``failed_when``.
- ``ansible-galaxy`` now considers all collection paths when identifying which collection requirements are already installed. Use the ``COLLECTIONS_PATHS`` and ``COLLECTIONS_SCAN_SYS_PATHS`` config options to modify these. Previously only the install path was considered when resolving the candidates. The install path will remain the only one potentially modified. (https://github.com/ansible/ansible/issues/79767, https://github.com/ansible/ansible/issues/81163)
- ``ansible.module_utils.service`` - ensure binary data transmission in ``daemonize()``
- ``ansible.module_utils.service`` - fix inter-process communication in ``daemonize()``
- ``import_role`` reverts to previous behavior of exporting vars at compile time.
- ``pkg_mgr`` - fix the default dnf version detection
- ansiballz - Prevent issue where the time on the control host could change part way through building the ansiballz file, potentially causing a pre-1980 date to be used during ansiballz unpacking leading to a zip file error (https://github.com/ansible/ansible/issues/80089)
- ansible terminal color settings were incorrectly limited to 16 options via 'choices', removing so all 256 can be accessed.
- ansible-console - fix filtering by collection names when a collection search path was set (https://github.com/ansible/ansible/pull/81450).
- ansible-galaxy - Enabled the ``data`` tarfile filter during role installation for Python versions that support it. A probing mechanism is used to avoid Python versions with a broken implementation.
- ansible-galaxy - Fix issue installing collections containing directories with more than 100 characters on python versions before 3.10.6
- ansible-galaxy - Fix variable type error when installing subdir collections (https://github.com/ansible/ansible/issues/80943)
- ansible-galaxy - Provide a better error message when using a requirements file with an invalid format - https://github.com/ansible/ansible/issues/81901
- ansible-galaxy - fix installing collections from directories that have a trailing path separator (https://github.com/ansible/ansible/issues/77803).
- ansible-galaxy - fix installing signed collections (https://github.com/ansible/ansible/issues/80648).
- ansible-galaxy - reduce API calls to servers by fetching signatures only for final candidates.
- ansible-galaxy - started allowing the use of pre-releases for collections that do not have any stable versions published. (https://github.com/ansible/ansible/pull/81606)
- ansible-galaxy - started allowing the use of pre-releases for dependencies on any level of the dependency tree that specifically demand exact pre-release versions of collections and not version ranges. (https://github.com/ansible/ansible/pull/81606)
- ansible-galaxy collection verify - fix verifying signed collections when the keyring is not configured.
- ansible-galaxy info - fix reporting no role found when lookup_role_by_name returns None.
- ansible-inventory - index available_hosts for major performance boost when dumping large inventories
- ansible-test - Add a ``pylint`` plugin to work around a known issue on Python 3.12.
- ansible-test - Add support for ``argcomplete`` version 3.
- ansible-test - All containers created by ansible-test now include the current test session ID in their name. This avoids conflicts between concurrent ansible-test invocations using the same container host.
- ansible-test - Always use ansible-test managed entry points for ansible-core CLI tools when not running from source. This fixes issues where CLI entry points created during install are not compatible with ansible-test.
- ansible-test - Fix a traceback that occurs when attempting to test Ansible source using a different ansible-test. A clear error message is now given when this scenario occurs.
- ansible-test - Fix handling of timeouts exceeding one day.
- ansible-test - Fix parsing of cgroup entries which contain a ``:`` in the path (https://github.com/ansible/ansible/issues/81977).
- ansible-test - Fix several possible tracebacks when using the ``-e`` option with sanity tests.
- ansible-test - Fix various cases where the test timeout could expire without terminating the tests.
- ansible-test - Include missing ``pylint`` requirements for Python 3.10.
- ansible-test - Pre-build a PyYAML wheel before installing requirements to avoid a potential Cython build failure.
- ansible-test - Remove redundant warning about missing programs before attempting to execute them.
- ansible-test - The ``import`` sanity test now checks the collection loader for remote-only Python support when testing ansible-core.
- ansible-test - Unit tests now report warnings generated during test runs. Previously only warnings generated during test collection were reported.
- ansible-test - Update ``pylint`` to 2.17.2 to resolve several possible false positives.
- ansible-test - Update ``pylint`` to 2.17.3 to resolve several possible false positives.
- ansible-test - Update ``pylint`` to version 3.0.1.
- ansible-test - Use ``raise ... from ...`` when raising exceptions from within an exception handler.
- ansible-test - When bootstrapping remote FreeBSD instances, use the OS packaged ``setuptools`` instead of installing the latest version from PyPI.
- ansible-test local change detection - use ``git merge-base <branch> HEAD`` instead of ``git merge-base --fork-point <branch>`` (https://github.com/ansible/ansible/pull/79734).
- ansible-vault - fail when the destination file location is not writable before performing encryption (https://github.com/ansible/ansible/issues/81455).
- apt - ignore fail_on_autoremove and allow_downgrade parameters when using aptitude (https://github.com/ansible/ansible/issues/77868).
- blockinfile - avoid crash with Python 3 if creating the directory fails when ``create=true`` (https://github.com/ansible/ansible/pull/81662).
- connection timeouts defined in ansible.cfg will now be properly used, the --timeout cli option was obscuring them by always being set.
- copy - print correct destination filename when using `content` and `--diff` (https://github.com/ansible/ansible/issues/79749).
- copy unit tests - Fixing "dir all perms" documentation and formatting for easier reading.
- core will now also look at the connection plugin to force 'local' interpreter for networking path compatibility as just ansible_network_os could be misleading.
- deb822_repository - use http-agent for receiving content (https://github.com/ansible/ansible/issues/80809).
- debconf - idempotency in questions with type 'password' (https://github.com/ansible/ansible/issues/47676).
- distribution facts - fix Source Mage family mapping
- dnf - fix a failure when a package from URI was specified and ``update_only`` was set (https://github.com/ansible/ansible/issues/81376).
- dnf5 - Update dnf5 module to handle API change for setting the download directory (https://github.com/ansible/ansible/issues/80887)
- dnf5 - Use ``transaction.check_gpg_signatures`` API call to check package signatures AND possibly to recover from when keys are missing.
- dnf5 - fix module and package names in the message following failed module respawn attempt
- dnf5 - use the logs API to determine transaction problems
- dpkg_selections - check if the package exists before performing the selection operation (https://github.com/ansible/ansible/issues/81404).
- encrypt - deprecate passlib_or_crypt API (https://github.com/ansible/ansible/issues/55839).
- fetch - Handle unreachable errors properly (https://github.com/ansible/ansible/issues/27816)
- file modules - Make symbolic modes with X use the computed permission, not original file (https://github.com/ansible/ansible/issues/80128)
- file modules - fix validating invalid symbolic modes.
- first found lookup has been updated to use the normalized argument parsing (pythonic) matching the documented examples.
- first found lookup, fixed an issue with subsequent items clobbering information from previous ones.
- first_found lookup now gets 'untemplated' loop entries and handles templating itself as task_executor was removing even 'templatable' entries and breaking functionality. https://github.com/ansible/ansible/issues/70772
- galaxy - check if the target for symlink exists (https://github.com/ansible/ansible/pull/81586).
- galaxy - cross check the collection type and collection source (https://github.com/ansible/ansible/issues/79463).
- gather_facts parallel option was doing the reverse of what was stated, now it does run modules in parallel when True and serially when False.
- handlers - fix ``v2_playbook_on_notify`` callback not being called when notifying handlers
- handlers - the ``listen`` keyword can affect only one handler with the same name, the last one defined as it is a case with the ``notify`` keyword (https://github.com/ansible/ansible/issues/81013)
- include_role - expose variables from parent roles to role's handlers (https://github.com/ansible/ansible/issues/80459)
- inventory_ini - handle SyntaxWarning while parsing ini file in inventory (https://github.com/ansible/ansible/issues/81457).
- iptables - remove default rule creation when creating iptables chain to be more similar to the command line utility (https://github.com/ansible/ansible/issues/80256).
- lib/ansible/utils/encrypt.py - remove unused private ``_LOCK`` (https://github.com/ansible/ansible/issues/81613)
- lookup/url.py - Fix incorrect var/env/ini entry for `force_basic_auth`
- man page build - Remove the dependency on the ``docs`` directory for building man pages.
- man page build - Sub commands of ``ansible-galaxy role`` and ``ansible-galaxy collection`` are now documented.
- module responses - Ensure that module responses are utf-8 adhereing to JSON RFC and expectations of the core code.
- module/role argument spec - validate the type for options that are None when the option is required or has a non-None default (https://github.com/ansible/ansible/issues/79656).
- modules/user.py - Add check for valid directory when creating new user homedir (allows /dev/null as skeleton) (https://github.com/ansible/ansible/issues/75063)
- paramiko_ssh, psrp, and ssh connection plugins - ensure that all values for options that should be strings are actually converted to strings (https://github.com/ansible/ansible/pull/81029).
- password_hash - fix salt format for ``crypt`` (only used if ``passlib`` is not installed) for the ``bcrypt`` algorithm.
- pep517 build backend - Copy symlinks when copying the source tree. This avoids tracebacks in various scenarios, such as when a venv is present in the source tree.
- pep517 build backend - Use the documented ``import_module`` import from ``importlib``.
- pip module - Update module to prefer use of the python ``packaging`` and ``importlib.metadata`` modules due to ``pkg_resources`` being deprecated (https://github.com/ansible/ansible/issues/80488)
- pkg_mgr.py - Fix `ansible_pkg_mgr` incorrect in TencentOS Server Linux
- pkg_mgr.py - Fix `ansible_pkg_mgr` is unknown in Kylin Linux (https://github.com/ansible/ansible/issues/81332)
- powershell modules - Only set an rc of 1 if the PowerShell pipeline signaled an error occurred AND there are error records present. Previously it would do so only if the error signal was present without checking the error count.
- replace - handle exception when bad escape character is provided in replace (https://github.com/ansible/ansible/issues/79364).
- role deduplication - don't deduplicate before a role has had a task run for that particular host (https://github.com/ansible/ansible/issues/81486).
- service module, does not permanently configure flags flags on Openbsd when enabling/disabling a service.
- service module, enable/disable is not a exclusive action in checkmode anymore.
- setup gather_timeout - Fix timeout in get_mounts_facts for linux.
- setup module (fact gathering) will now try to be smarter about different versions of facter emitting error when --puppet flag is used w/o puppet.
- syntax check - Limit ``--syntax-check`` to ``ansible-playbook`` only, as that is the only CLI affected by this argument (https://github.com/ansible/ansible/issues/80506)
- tarfile - handle data filter deprecation warning message for extract and extractall (https://github.com/ansible/ansible/issues/80832).
- template - Fix for formatting issues when a template path contains valid jinja/strftime pattern (especially line break one) and using the template path in ansible_managed (https://github.com/ansible/ansible/pull/79129)
- templating - In the template action and lookup, use local jinja2 environment overlay overrides instead of mutating the templars environment
- templating - prevent setting arbitrary attributes on Jinja2 environments via Jinja2 overrides in templates
- templating escape and single var optimization now use correct delimiters when custom ones are provided either via task or template header.
- unarchive - fix unarchiving sources that are copied to the remote node using a relative temporory directory path (https://github.com/ansible/ansible/issues/80710).
- uri - fix search for JSON type to include complex strings containing '+'
- uri/urls - Add compat function to handle the ability to parse the filename from a Content-Disposition header (https://github.com/ansible/ansible/issues/81806)
- urls.py - fixed cert_file and key_file parameters when running on Python 3.12 - https://github.com/ansible/ansible/issues/80490
- user - set expiration value correctly when unable to retrieve the current value from the system (https://github.com/ansible/ansible/issues/71916)
- validate-modules sanity test - replace semantic markup parsing and validating code with the code from `antsibull-docs-parser 0.2.0 <https://github.com/ansible-community/antsibull-docs-parser/releases/tag/0.2.0>`__ (https://github.com/ansible/ansible/pull/80406).
- vars_prompt - internally convert the ``unsafe`` value to ``bool``
- vault and unvault filters now properly take ``vault_id`` parameter.
- win_fetch - Add support for using file with wildcards in file name. (https://github.com/ansible/ansible/issues/73128)
- winrm - Better handle send input failures when communicating with hosts under load
Known Issues
------------
- ansible-galaxy - dies in the middle of installing a role when that role contains Java inner classes (files with $ in the file name). This is by design, to exclude temporary or backup files. (https://github.com/ansible/ansible/pull/81553).
- ansible-test - The ``pep8`` sanity test is unable to detect f-string spacing issues (E201, E202) on Python 3.10 and 3.11. They are correctly detected under Python 3.12. See (https://github.com/PyCQA/pycodestyle/issues/1190).

View File

@ -1,6 +0,0 @@
Placeholder changelog
=====================
This file is a placeholder; a version-specific ``CHANGELOG-vX.Y.rst`` will be generated during releases from fragments
under changelogs/fragments. On release branches once a release has been created, consult the branch's version-specific
file for changes that have occurred in that branch.

8
changelogs/README.md Normal file
View File

@ -0,0 +1,8 @@
Changelogs
==========
As part of the release process a version-specific `CHANGELOG-vX.Y.rst` will be generated from fragments in
the `fragments` directory.
On release branches once a release has been created, consult the branch's version-specific file for changes that have
occurred in that branch. The `devel` branch does not have a generated changelog, only changelog fragments.

View File

@ -1,2 +1,824 @@
ancestor: 2.12.0
releases: {}
ancestor: 2.15.0
releases:
2.16.0:
changes:
bugfixes:
- ansible-test - Fix parsing of cgroup entries which contain a ``:`` in the
path (https://github.com/ansible/ansible/issues/81977).
release_summary: '| Release Date: 2023-11-06
| `Porting Guide <https://docs.ansible.com/ansible-core/2.16/porting_guides/porting_guide_core_2.16.html>`__
'
codename: All My Love
fragments:
- 2.16.0_summary.yaml
- ansible-test-cgroup-split.yml
release_date: '2023-11-06'
2.16.0b1:
changes:
breaking_changes:
- Any plugin using the config system and the `cli` entry to use the `timeout`
from the command line, will see the value change if the use had configured
it in any of the lower precedence methods. If relying on this behaviour to
consume the global/generic timeout from the DEFAULT_TIMEOUT constant, please
consult the documentation on plugin configuration to add the overlaping entries.
- ansible-test - Test plugins that rely on containers no longer support reusing
running containers. The previous behavior was an undocumented, untested feature.
- service module will not permanently configure variables/flags for openbsd
when doing enable/disable operation anymore, this module was never meant to
do this type of work, just to manage the service state itself. A rcctl_config
or similar module should be created and used instead.
bugfixes:
- Allow for searching handler subdir for included task via include_role (https://github.com/ansible/ansible/issues/81722)
- AnsibleModule.run_command - Only use selectors when needed, and rely on Python
stdlib subprocess for the simple task of collecting stdout/stderr when prompt
matching is not required.
- Display - Defensively configure writing to stdout and stderr with a custom
encoding error handler that will replace invalid characters while providing
a deprecation warning that non-utf8 text will result in an error in a future
version.
- Exclude internal options from man pages and docs.
- Fix ``ansible-config init`` man page option indentation.
- Fix ``ast`` deprecation warnings for ``Str`` and ``value.s`` when using Python
3.12.
- Fix exceptions caused by various inputs when performing arg splitting or parsing
key/value pairs. Resolves issue https://github.com/ansible/ansible/issues/46379
and issue https://github.com/ansible/ansible/issues/61497
- Fix incorrect parsing of multi-line Jinja2 blocks when performing arg splitting
or parsing key/value pairs.
- Fix post-validating looped task fields so the strategy uses the correct values
after task execution.
- Fixed `pip` module failure in case of usage quotes for `virtualenv_command`
option for the venv command. (https://github.com/ansible/ansible/issues/76372)
- From issue https://github.com/ansible/ansible/issues/80880, when notifying
a handler from another handler, handler notifications must be registered immediately
as the flush_handler call is not recursive.
- Import ``FILE_ATTRIBUTES`` from ``ansible.module_utils.common.file`` in ``ansible.module_utils.basic``
instead of defining it twice.
- Inventory scripts parser not treat exception when getting hostsvar (https://github.com/ansible/ansible/issues/81103)
- On Python 3 use datetime methods ``fromtimestamp`` and ``now`` with UTC timezone
instead of ``utcfromtimestamp`` and ``utcnow``, which are deprecated in Python
3.12.
- PluginLoader - fix Jinja plugin performance issues (https://github.com/ansible/ansible/issues/79652)
- PowerShell - Remove some code which is no longer valid for dotnet 5+
- Prevent running same handler multiple times when included via ``include_role``
(https://github.com/ansible/ansible/issues/73643)
- Prompting - add a short sleep between polling for user input to reduce CPU
consumption (https://github.com/ansible/ansible/issues/81516).
- Properly disable ``jinja2_native`` in the template module when jinja2 override
is used in the template (https://github.com/ansible/ansible/issues/80605)
- Remove unreachable parser error for removed ``static`` parameter of ``include_role``
- Replace uses of ``configparser.ConfigParser.readfp()`` which was removed in
Python 3.12 with ``configparser.ConfigParser.read_file()`` (https://github.com/ansible/ansible/issues/81656)
- Set filters ``intersect``, ``difference``, ``symmetric_difference`` and ``union``
now always return a ``list``, never a ``set``. Previously, a ``set`` would
be returned if the inputs were a hashable type such as ``str``, instead of
a collection, such as a ``list`` or ``tuple``.
- Set filters ``intersect``, ``difference``, ``symmetric_difference`` and ``union``
now use set operations when the given items are hashable. Previously, list
operations were performed unless the inputs were a hashable type such as ``str``,
instead of a collection, such as a ``list`` or ``tuple``.
- Switch result queue from a ``multiprocessing.queues.Queue` to ``multiprocessing.queues.SimpleQueue``,
primarily to allow properly handling pickling errors, to prevent an infinite
hang waiting for task results
- The ``ansible-config init`` command now has a documentation description.
- The ``ansible-galaxy collection download`` command now has a documentation
description.
- The ``ansible-galaxy collection install`` command documentation is now visible
(previously hidden by a decorator).
- The ``ansible-galaxy collection verify`` command now has a documentation description.
- The ``ansible-galaxy role install`` command documentation is now visible (previously
hidden by a decorator).
- The ``ansible-inventory`` command command now has a documentation description
(previously used as the epilog).
- The ``hostname`` module now also updates both current and permanent hostname
on OpenBSD. Before it only updated the permanent hostname (https://github.com/ansible/ansible/issues/80520).
- Update module_utils.urls unit test to work with cryptography >= 41.0.0.
- When generating man pages, use ``func`` to find the command function instead
of looking it up by the command name.
- '``StrategyBase._process_pending_results`` - create a ``Templar`` on demand
for templating ``changed_when``/``failed_when``.'
- '``ansible-galaxy`` now considers all collection paths when identifying which
collection requirements are already installed. Use the ``COLLECTIONS_PATHS``
and ``COLLECTIONS_SCAN_SYS_PATHS`` config options to modify these. Previously
only the install path was considered when resolving the candidates. The install
path will remain the only one potentially modified. (https://github.com/ansible/ansible/issues/79767,
https://github.com/ansible/ansible/issues/81163)'
- '``ansible.module_utils.service`` - ensure binary data transmission in ``daemonize()``'
- '``ansible.module_utils.service`` - fix inter-process communication in ``daemonize()``'
- '``pkg_mgr`` - fix the default dnf version detection'
- ansiballz - Prevent issue where the time on the control host could change
part way through building the ansiballz file, potentially causing a pre-1980
date to be used during ansiballz unpacking leading to a zip file error (https://github.com/ansible/ansible/issues/80089)
- ansible terminal color settings were incorrectly limited to 16 options via
'choices', removing so all 256 can be accessed.
- ansible-console - fix filtering by collection names when a collection search
path was set (https://github.com/ansible/ansible/pull/81450).
- ansible-galaxy - Enabled the ``data`` tarfile filter during role installation
for Python versions that support it. A probing mechanism is used to avoid
Python versions with a broken implementation.
- ansible-galaxy - Fix issue installing collections containing directories with
more than 100 characters on python versions before 3.10.6
- ansible-galaxy - Fix variable type error when installing subdir collections
(https://github.com/ansible/ansible/issues/80943)
- ansible-galaxy - fix installing collections from directories that have a trailing
path separator (https://github.com/ansible/ansible/issues/77803).
- ansible-galaxy - fix installing signed collections (https://github.com/ansible/ansible/issues/80648).
- ansible-galaxy - reduce API calls to servers by fetching signatures only for
final candidates.
- ansible-galaxy - started allowing the use of pre-releases for collections
that do not have any stable versions published. (https://github.com/ansible/ansible/pull/81606)
- ansible-galaxy - started allowing the use of pre-releases for dependencies
on any level of the dependency tree that specifically demand exact pre-release
versions of collections and not version ranges. (https://github.com/ansible/ansible/pull/81606)
- ansible-galaxy collection verify - fix verifying signed collections when the
keyring is not configured.
- ansible-test - Add support for ``argcomplete`` version 3.
- ansible-test - All containers created by ansible-test now include the current
test session ID in their name. This avoids conflicts between concurrent ansible-test
invocations using the same container host.
- ansible-test - Always use ansible-test managed entry points for ansible-core
CLI tools when not running from source. This fixes issues where CLI entry
points created during install are not compatible with ansible-test.
- ansible-test - Fix a traceback that occurs when attempting to test Ansible
source using a different ansible-test. A clear error message is now given
when this scenario occurs.
- ansible-test - Fix handling of timeouts exceeding one day.
- ansible-test - Fix several possible tracebacks when using the ``-e`` option
with sanity tests.
- ansible-test - Fix various cases where the test timeout could expire without
terminating the tests.
- ansible-test - Pre-build a PyYAML wheel before installing requirements to
avoid a potential Cython build failure.
- ansible-test - Remove redundant warning about missing programs before attempting
to execute them.
- ansible-test - The ``import`` sanity test now checks the collection loader
for remote-only Python support when testing ansible-core.
- ansible-test - Unit tests now report warnings generated during test runs.
Previously only warnings generated during test collection were reported.
- ansible-test - Update ``pylint`` to 2.17.2 to resolve several possible false
positives.
- ansible-test - Update ``pylint`` to 2.17.3 to resolve several possible false
positives.
- ansible-test - Use ``raise ... from ...`` when raising exceptions from within
an exception handler.
- ansible-test - When bootstrapping remote FreeBSD instances, use the OS packaged
``setuptools`` instead of installing the latest version from PyPI.
- ansible-test local change detection - use ``git merge-base <branch> HEAD``
instead of ``git merge-base --fork-point <branch>`` (https://github.com/ansible/ansible/pull/79734).
- ansible-vault - fail when the destination file location is not writable before
performing encryption (https://github.com/ansible/ansible/issues/81455).
- apt - ignore fail_on_autoremove and allow_downgrade parameters when using
aptitude (https://github.com/ansible/ansible/issues/77868).
- blockinfile - avoid crash with Python 3 if creating the directory fails when
``create=true`` (https://github.com/ansible/ansible/pull/81662).
- connection timeouts defined in ansible.cfg will now be properly used, the
--timeout cli option was obscuring them by always being set.
- copy - print correct destination filename when using `content` and `--diff`
(https://github.com/ansible/ansible/issues/79749).
- copy unit tests - Fixing "dir all perms" documentation and formatting for
easier reading.
- core will now also look at the connection plugin to force 'local' interpreter
for networking path compatibility as just ansible_network_os could be misleading.
- deb822_repository - use http-agent for receiving content (https://github.com/ansible/ansible/issues/80809).
- debconf - idempotency in questions with type 'password' (https://github.com/ansible/ansible/issues/47676).
- distribution facts - fix Source Mage family mapping
- dnf - fix a failure when a package from URI was specified and ``update_only``
was set (https://github.com/ansible/ansible/issues/81376).
- dnf5 - Update dnf5 module to handle API change for setting the download directory
(https://github.com/ansible/ansible/issues/80887)
- dnf5 - Use ``transaction.check_gpg_signatures`` API call to check package
signatures AND possibly to recover from when keys are missing.
- dnf5 - fix module and package names in the message following failed module
respawn attempt
- dnf5 - use the logs API to determine transaction problems
- dpkg_selections - check if the package exists before performing the selection
operation (https://github.com/ansible/ansible/issues/81404).
- encrypt - deprecate passlib_or_crypt API (https://github.com/ansible/ansible/issues/55839).
- fetch - Handle unreachable errors properly (https://github.com/ansible/ansible/issues/27816)
- file modules - Make symbolic modes with X use the computed permission, not
original file (https://github.com/ansible/ansible/issues/80128)
- file modules - fix validating invalid symbolic modes.
- first found lookup has been updated to use the normalized argument parsing
(pythonic) matching the documented examples.
- first found lookup, fixed an issue with subsequent items clobbering information
from previous ones.
- first_found lookup now gets 'untemplated' loop entries and handles templating
itself as task_executor was removing even 'templatable' entries and breaking
functionality. https://github.com/ansible/ansible/issues/70772
- galaxy - check if the target for symlink exists (https://github.com/ansible/ansible/pull/81586).
- galaxy - cross check the collection type and collection source (https://github.com/ansible/ansible/issues/79463).
- gather_facts parallel option was doing the reverse of what was stated, now
it does run modules in parallel when True and serially when False.
- handlers - fix ``v2_playbook_on_notify`` callback not being called when notifying
handlers
- handlers - the ``listen`` keyword can affect only one handler with the same
name, the last one defined as it is a case with the ``notify`` keyword (https://github.com/ansible/ansible/issues/81013)
- include_role - expose variables from parent roles to role's handlers (https://github.com/ansible/ansible/issues/80459)
- inventory_ini - handle SyntaxWarning while parsing ini file in inventory (https://github.com/ansible/ansible/issues/81457).
- iptables - remove default rule creation when creating iptables chain to be
more similar to the command line utility (https://github.com/ansible/ansible/issues/80256).
- lib/ansible/utils/encrypt.py - remove unused private ``_LOCK`` (https://github.com/ansible/ansible/issues/81613)
- lookup/url.py - Fix incorrect var/env/ini entry for `force_basic_auth`
- man page build - Remove the dependency on the ``docs`` directory for building
man pages.
- man page build - Sub commands of ``ansible-galaxy role`` and ``ansible-galaxy
collection`` are now documented.
- module responses - Ensure that module responses are utf-8 adhereing to JSON
RFC and expectations of the core code.
- module/role argument spec - validate the type for options that are None when
the option is required or has a non-None default (https://github.com/ansible/ansible/issues/79656).
- modules/user.py - Add check for valid directory when creating new user homedir
(allows /dev/null as skeleton) (https://github.com/ansible/ansible/issues/75063)
- paramiko_ssh, psrp, and ssh connection plugins - ensure that all values for
options that should be strings are actually converted to strings (https://github.com/ansible/ansible/pull/81029).
- password_hash - fix salt format for ``crypt`` (only used if ``passlib`` is
not installed) for the ``bcrypt`` algorithm.
- pep517 build backend - Copy symlinks when copying the source tree. This avoids
tracebacks in various scenarios, such as when a venv is present in the source
tree.
- pep517 build backend - Use the documented ``import_module`` import from ``importlib``.
- pip module - Update module to prefer use of the python ``packaging`` and ``importlib.metadata``
modules due to ``pkg_resources`` being deprecated (https://github.com/ansible/ansible/issues/80488)
- pkg_mgr.py - Fix `ansible_pkg_mgr` incorrect in TencentOS Server Linux
- pkg_mgr.py - Fix `ansible_pkg_mgr` is unknown in Kylin Linux (https://github.com/ansible/ansible/issues/81332)
- powershell modules - Only set an rc of 1 if the PowerShell pipeline signaled
an error occurred AND there are error records present. Previously it would
do so only if the error signal was present without checking the error count.
- replace - handle exception when bad escape character is provided in replace
(https://github.com/ansible/ansible/issues/79364).
- role deduplication - don't deduplicate before a role has had a task run for
that particular host (https://github.com/ansible/ansible/issues/81486).
- service module, does not permanently configure flags flags on Openbsd when
enabling/disabling a service.
- service module, enable/disable is not a exclusive action in checkmode anymore.
- setup gather_timeout - Fix timeout in get_mounts_facts for linux.
- setup module (fact gathering) will now try to be smarter about different versions
of facter emitting error when --puppet flag is used w/o puppet.
- syntax check - Limit ``--syntax-check`` to ``ansible-playbook`` only, as that
is the only CLI affected by this argument (https://github.com/ansible/ansible/issues/80506)
- tarfile - handle data filter deprecation warning message for extract and extractall
(https://github.com/ansible/ansible/issues/80832).
- template - Fix for formatting issues when a template path contains valid jinja/strftime
pattern (especially line break one) and using the template path in ansible_managed
(https://github.com/ansible/ansible/pull/79129)
- templating - In the template action and lookup, use local jinja2 environment
overlay overrides instead of mutating the templars environment
- templating - prevent setting arbitrary attributes on Jinja2 environments via
Jinja2 overrides in templates
- templating escape and single var optimization now use correct delimiters when
custom ones are provided either via task or template header.
- unarchive - fix unarchiving sources that are copied to the remote node using
a relative temporory directory path (https://github.com/ansible/ansible/issues/80710).
- uri - fix search for JSON type to include complex strings containing '+'
- urls.py - fixed cert_file and key_file parameters when running on Python 3.12
- https://github.com/ansible/ansible/issues/80490
- user - set expiration value correctly when unable to retrieve the current
value from the system (https://github.com/ansible/ansible/issues/71916)
- validate-modules sanity test - replace semantic markup parsing and validating
code with the code from `antsibull-docs-parser 0.2.0 <https://github.com/ansible-community/antsibull-docs-parser/releases/tag/0.2.0>`__
(https://github.com/ansible/ansible/pull/80406).
- vars_prompt - internally convert the ``unsafe`` value to ``bool``
- vault and unvault filters now properly take ``vault_id`` parameter.
- win_fetch - Add support for using file with wildcards in file name. (https://github.com/ansible/ansible/issues/73128)
deprecated_features:
- Deprecated ini config option ``collections_paths``, use the singular form
``collections_path`` instead
- Deprecated the env var ``ANSIBLE_COLLECTIONS_PATHS``, use the singular form
``ANSIBLE_COLLECTIONS_PATH`` instead
- Support for Windows Server 2012 and 2012 R2 has been removed as the support
end of life from Microsoft is October 10th 2023. These versions of Windows
will no longer be tested in this Ansible release and it cannot be guaranteed
that they will continue to work going forward.
- '``STRING_CONVERSION_ACTION`` config option is deprecated as it is no longer
used in the Ansible Core code base.'
- the 'smart' option for setting a connection plugin is being removed as it's
main purpose (choosing between ssh and paramiko) is now irrelevant.
- vault and unfault filters - the undocumented ``vaultid`` parameter is deprecated
and will be removed in ansible-core 2.20. Use ``vault_id`` instead.
- yum_repository - deprecated parameter 'keepcache' (https://github.com/ansible/ansible/issues/78693).
known_issues:
- ansible-galaxy - dies in the middle of installing a role when that role contains
Java inner classes (files with $ in the file name). This is by design, to
exclude temporary or backup files. (https://github.com/ansible/ansible/pull/81553).
- ansible-test - The ``pep8`` sanity test is unable to detect f-string spacing
issues (E201, E202) on Python 3.10 and 3.11. They are correctly detected under
Python 3.12. See (https://github.com/PyCQA/pycodestyle/issues/1190).
minor_changes:
- Add Python type hints to the Display class (https://github.com/ansible/ansible/issues/80841)
- Add ``GALAXY_COLLECTIONS_PATH_WARNING`` option to disable the warning given
by ``ansible-galaxy collection install`` when installing a collection to a
path that isn't in the configured collection paths.
- Add ``python3.12`` to the default ``INTERPRETER_PYTHON_FALLBACK`` list.
- Add ``utcfromtimestamp`` and ``utcnow`` to ``ansible.module_utils.compat.datetime``
to return fixed offset datetime objects.
- Add a general ``GALAXY_SERVER_TIMEOUT`` config option for distribution servers
(https://github.com/ansible/ansible/issues/79833).
- Added Python type annotation to connection plugins
- CLI argument parsing - Automatically prepend to the help of CLI arguments
that support being specified multiple times. (https://github.com/ansible/ansible/issues/22396)
- DEFAULT_TRANSPORT now defaults to 'ssh', the old 'smart' option is being deprecated
as versions of OpenSSH without control persist are basically not present anymore.
- Documentation for set filters ``intersect``, ``difference``, ``symmetric_difference``
and ``union`` now states that the returned list items are in arbitrary order.
- Record ``removal_date`` in runtime metadata as a string instead of a date.
- Remove the ``CleansingNodeVisitor`` class and its usage due to the templating
changes that made it superfluous. Also simplify the ``Conditional`` class.
- Removed ``exclude`` and ``recursive-exclude`` commands for generated files
from the ``MANIFEST.in`` file. These excludes were unnecessary since releases
are expected to be built with a clean worktree.
- Removed ``exclude`` commands for sanity test files from the ``MANIFEST.in``
file. These tests were previously excluded because they did not pass when
run from an sdist. However, sanity tests are not expected to pass from an
sdist, so excluding some (but not all) of the failing tests makes little sense.
- Removed redundant ``include`` commands from the ``MANIFEST.in`` file. These
includes either duplicated default behavior or another command.
- The ``ansible-core`` sdist no longer contains pre-generated man pages. Instead,
a ``packaging/cli-doc/build.py`` script is included in the sdist. This script
can generate man pages and standalone RST documentation for ``ansible-core``
CLI programs.
- The ``docs`` and ``examples`` directories are no longer included in the ``ansible-core``
sdist. These directories have been moved to the https://github.com/ansible/ansible-documentation
repository.
- The minimum required ``setuptools`` version is now 66.1.0, as it is the oldest
version to support Python 3.12.
- Update ``ansible_service_mgr`` fact to include init system for SMGL OS family
- Use ``ansible.module_utils.common.text.converters`` instead of ``ansible.module_utils._text``.
- Use ``importlib.resources.abc.TraversableResources`` instead of deprecated
``importlib.abc.TraversableResources`` where available (https:/github.com/ansible/ansible/pull/81082).
- Use ``include`` where ``recursive-include`` is unnecessary in the ``MANIFEST.in``
file.
- Use ``package_data`` instead of ``include_package_data`` for ``setup.cfg``
to avoid ``setuptools`` warnings.
- Utilize gpg check provided internally by the ``transaction.run`` method as
oppose to calling it manually.
- '``Templar`` - do not add the ``dict`` constructor to ``globals`` as all required
Jinja2 versions already do so'
- ansible-doc - allow to filter listing of collections and metadata dump by
more than one collection (https://github.com/ansible/ansible/pull/81450).
- ansible-galaxy - Add a plural option to improve ignoring multiple signature
error status codes when installing or verifying collections. A space-separated
list of error codes can follow --ignore-signature-status-codes in addition
to specifying --ignore-signature-status-code multiple times (for example,
``--ignore-signature-status-codes NO_PUBKEY UNEXPECTED``).
- ansible-galaxy - Remove internal configuration argument ``v3`` (https://github.com/ansible/ansible/pull/80721)
- ansible-galaxy - add note to the collection dependency resolver error message
about pre-releases if ``--pre`` was not provided (https://github.com/ansible/ansible/issues/80048).
- ansible-galaxy - used to crash out with a "Errno 20 Not a directory" error
when extracting files from a role when hitting a file with an illegal name
(https://github.com/ansible/ansible/pull/81553). Now it gives a warning identifying
the culprit file and the rule violation (e.g., ``my$class.jar`` has a ``$``
in the name) before crashing out, giving the user a chance to remove the invalid
file and try again. (https://github.com/ansible/ansible/pull/81555).
- ansible-test - Add Alpine 3.18 to remotes
- ansible-test - Add Fedora 38 container.
- ansible-test - Add Fedora 38 remote.
- ansible-test - Add FreeBSD 13.2 remote.
- ansible-test - Add new pylint checker for new ``# deprecated:`` comments within
code to trigger errors when time to remove code that has no user facing deprecation
message. Only supported in ansible-core, not collections.
- ansible-test - Add support for RHEL 8.8 remotes.
- ansible-test - Add support for RHEL 9.2 remotes.
- ansible-test - Add support for testing with Python 3.12.
- ansible-test - Allow float values for the ``--timeout`` option to the ``env``
command. This simplifies testing.
- ansible-test - Enable ``thread`` code coverage in addition to the existing
``multiprocessing`` coverage.
- ansible-test - RHEL 8.8 provisioning can now be used with the ``--python 3.11``
option.
- ansible-test - RHEL 9.2 provisioning can now be used with the ``--python 3.11``
option.
- ansible-test - Refactored ``env`` command logic and timeout handling.
- ansible-test - Remove Fedora 37 remote support.
- ansible-test - Remove Fedora 37 test container.
- ansible-test - Remove Python 3.8 and 3.9 from RHEL 8.8.
- ansible-test - Remove obsolete embedded script for configuring WinRM on Windows
remotes.
- ansible-test - Removed Ubuntu 20.04 LTS image from the `--remote` option.
- ansible-test - Removed `freebsd/12.4` remote.
- ansible-test - Removed `freebsd/13.1` remote.
- 'ansible-test - Removed test remotes: rhel/8.7, rhel/9.1'
- ansible-test - Removed the deprecated ``--docker-no-pull`` option.
- ansible-test - Removed the deprecated ``--no-pip-check`` option.
- ansible-test - Removed the deprecated ``foreman`` test plugin.
- ansible-test - Removed the deprecated ``govcsim`` support from the ``vcenter``
test plugin.
- ansible-test - Replace the ``pytest-forked`` pytest plugin with a custom plugin.
- ansible-test - The ``no-get-exception`` sanity test is now limited to plugins
in collections. Previously any Python file in a collection was checked for
``get_exception`` usage.
- ansible-test - The ``replace-urlopen`` sanity test is now limited to plugins
in collections. Previously any Python file in a collection was checked for
``urlopen`` usage.
- ansible-test - The ``use-compat-six`` sanity test is now limited to plugins
in collections. Previously any Python file in a collection was checked for
``six`` usage.
- ansible-test - The openSUSE test container has been updated to openSUSE Leap
15.5.
- ansible-test - Update pip to ``23.1.2`` and setuptools to ``67.7.2``.
- ansible-test - Update the ``default`` containers.
- ansible-test - Update the ``nios-test-container`` to version 2.0.0, which
supports API version 2.9.
- ansible-test - Update the logic used to detect when ``ansible-test`` is running
from source.
- ansible-test - Updated the CloudStack test container to version 1.6.1.
- ansible-test - Updated the distro test containers to version 6.3.0 to include
coverage 7.3.2 for Python 3.8+. The alpine3 container is now based on 3.18
instead of 3.17 and includes Python 3.11 instead of Python 3.10.
- ansible-test - Use ``datetime.datetime.now`` with ``tz`` specified instead
of ``datetime.datetime.utcnow``.
- ansible-test - Use a context manager to perform cleanup at exit instead of
using the built-in ``atexit`` module.
- ansible-test - remove Alpine 3.17 from remotes
- "ansible-test \u2014 Python 3.8\u20133.12 will use ``coverage`` v7.3.2."
- "ansible-test \u2014 ``coverage`` v6.5.0 is to be used only under Python 3.7."
- 'ansible-vault create: Now raises an error when opening the editor without
tty. The flag --skip-tty-check restores previous behaviour.'
- ansible_user_module - tweaked macos user defaults to reflect expected defaults
(https://github.com/ansible/ansible/issues/44316)
- apt - return calculated diff while running apt clean operation.
- blockinfile - add append_newline and prepend_newline options (https://github.com/ansible/ansible/issues/80835).
- cli - Added short option '-J' for asking for vault password (https://github.com/ansible/ansible/issues/80523).
- command - Add option ``expand_argument_vars`` to disable argument expansion
and use literal values - https://github.com/ansible/ansible/issues/54162
- config lookup new option show_origin to also return the origin of a configuration
value.
- display methods for warning and deprecation are now proxied to main process
when issued from a fork. This allows for the deduplication of warnings and
deprecations to work globally.
- dnf5 - enable environment groups installation testing in CI as its support
was added.
- dnf5 - enable now implemented ``cacheonly`` functionality
- executor now skips persistent connection when it detects an action that does
not require a connection.
- find module - Add ability to filter based on modes
- gather_facts now will use gather_timeout setting to limit parallel execution
of modules that do not themselves use gather_timeout.
- group - remove extraneous warning shown when user does not exist (https://github.com/ansible/ansible/issues/77049).
- include_vars - os.walk now follows symbolic links when traversing directories
(https://github.com/ansible/ansible/pull/80460)
- module compression is now sourced directly via config, bypassing play_context
possibly stale values.
- reboot - show last error message in verbose logs (https://github.com/ansible/ansible/issues/81574).
- service_facts now returns more info for rcctl managed systesm (OpenBSD).
- tasks - the ``retries`` keyword can be specified without ``until`` in which
case the task is retried until it succeeds but at most ``retries`` times (https://github.com/ansible/ansible/issues/20802)
- user - add new option ``password_expire_warn`` (supported on Linux only) to
set the number of days of warning before a password change is required (https://github.com/ansible/ansible/issues/79882).
- yum_repository - Align module documentation with parameters
release_summary: '| Release Date: 2023-09-26
| `Porting Guide <https://docs.ansible.com/ansible-core/2.16/porting_guides/porting_guide_core_2.16.html>`__
'
removed_features:
- ActionBase - remove deprecated ``_remote_checksum`` method
- PlayIterator - remove deprecated ``cache_block_tasks`` and ``get_original_task``
methods
- Remove deprecated ``FileLock`` class
- Removed Python 3.9 as a supported version on the controller. Python 3.10 or
newer is required.
- Removed ``include`` which has been deprecated in Ansible 2.12. Use ``include_tasks``
or ``import_tasks`` instead.
- '``Templar`` - remove deprecated ``shared_loader_obj`` parameter of ``__init__``'
- '``fetch_url`` - remove auto disabling ``decompress`` when gzip is not available'
- '``get_action_args_with_defaults`` - remove deprecated ``redirected_names``
method parameter'
- ansible-test - Removed support for the remote Windows targets 2012 and 2012-R2
- inventory_cache - remove deprecated ``default.fact_caching_prefix`` ini configuration
option, use ``defaults.fact_caching_prefix`` instead.
- module_utils/basic.py - Removed Python 3.5 as a supported remote version.
Python 2.7 or Python 3.6+ is now required.
- stat - removed unused `get_md5` parameter.
codename: All My Love
fragments:
- 2.16.0b1_summary.yaml
- 20802-until-default.yml
- 22396-indicate-which-args-are-multi.yml
- 27816-fetch-unreachable.yml
- 50603-tty-check.yaml
- 71916-user-expires-int.yml
- 73643-handlers-prevent-multiple-runs.yml
- 74723-support-wildcard-win_fetch.yml
- 75063-allow-dev-nul-as-skeleton-for-new-homedir.yml
- 76372-fix-pip-virtualenv-command-parsing.yml
- 78487-galaxy-collections-path-warnings.yml
- 79129-ansible-managed-filename-format.yaml
- 79364_replace.yml
- 79677-fix-argspec-type-check.yml
- 79734-ansible-test-change-detection.yml
- 79844-fix-timeout-mounts-linux.yml
- 79999-ansible-user-tweak-macos-defaults.yaml
- 80089-prevent-module-build-date-issue.yml
- 80128-symbolic-modes-X-use-computed.yml
- 80257-iptables-chain-creation-does-not-populate-a-rule.yml
- 80258-defensive-display-non-utf8.yml
- 80334-reduce-ansible-galaxy-api-calls.yml
- 80406-validate-modules-semantic-markup.yml
- 80449-fix-symbolic-mode-error-msg.yml
- 80459-handlers-nested-includes-vars.yml
- 80460-add-symbolic-links-with-dir.yml
- 80476-fix-loop-task-post-validation.yml
- 80488-pip-pkg-resources.yml
- 80506-syntax-check-playbook-only.yml
- 80520-fix-current-hostname-openbsd.yml
- 80523_-_adding_short_option_for_--ask-vault-pass.yml
- 80605-template-overlay-native-jinja.yml
- 80648-fix-ansible-galaxy-cache-signatures-bug.yml
- 80721-ansible-galaxy.yml
- 80738-abs-unarachive-src.yml
- 80841-display-type-annotation.yml
- 80880-register-handlers-immediately-if-iterating-handlers.yml
- 80887-dnf5-api-change.yml
- 80943-ansible-galaxy-collection-subdir-install.yml
- 80968-replace-deprecated-ast-attr.yml
- 80985-fix-smgl-family-mapping.yml
- 81005-use-overlay-overrides.yml
- 81013-handlers-listen-last-defined-only.yml
- 81029-connection-types.yml
- 81064-daemonize-fixes.yml
- 81082-deprecated-importlib-abc.yml
- 81083-add-blockinfile-append-and-prepend-new-line-options.yml
- 81104-inventory-script-plugin-raise-execution-error.yml
- 81319-cloudstack-test-container-bump-version.yml
- 81332-fix-pkg-mgr-in-kylin.yml
- 81450-list-filters.yml
- 81494-remove-duplicated-file-attribute-constant.yml
- 81555-add-warning-for-illegal-filenames-in-roles.yaml
- 81584-daemonize-follow-up-fixes.yml
- 81606-ansible-galaxy-collection-pre-releases.yml
- 81613-remove-unusued-private-lock.yml
- 81656-cf_readfp-deprecated.yml
- 81662-blockinfile-exc.yml
- 81722-handler-subdir-include_tasks.yml
- CleansingNodeVisitor-removal.yml
- a-g-col-install-directory-with-trailing-sep.yml
- a-g-col-prevent-reinstalling-satisfied-req.yml
- a_test_rmv_alpine_317.yml
- add-missing-cli-docs.yml
- ag-ignore-multiple-signature-statuses.yml
- ansible-galaxy-server-timeout.yml
- ansible-runtime-metadata-removal-date.yml
- ansible-test-added-fedora-38.yml
- ansible-test-argcomplete-3.yml
- ansible-test-atexit.yml
- ansible-test-coverage-update.yml
- ansible-test-default-containers.yml
- ansible-test-deprecated-cleanup.yml
- ansible-test-distro-containers.yml
- ansible-test-entry-points.yml
- ansible-test-explain-traceback.yml
- ansible-test-fedora-37.yml
- ansible-test-freebsd-bootstrap-setuptools.yml
- ansible-test-import-sanity-fix.yml
- ansible-test-layout-detection.yml
- ansible-test-long-timeout-fix.yml
- ansible-test-minimum-setuptools.yml
- ansible-test-nios-container.yml
- ansible-test-pylint-update.yml
- ansible-test-pytest-forked.yml
- ansible-test-python-3.12.yml
- ansible-test-pyyaml-build.yml
- ansible-test-remove-old-rhel-remotes.yml
- ansible-test-remove-ubuntu-2004.yml
- ansible-test-rhel-9.2-python-3.11.yml
- ansible-test-rhel-9.2.yml
- ansible-test-sanity-scope.yml
- ansible-test-source-detection.yml
- ansible-test-thread-coverage.yml
- ansible-test-timeout-fix.yml
- ansible-test-unique-container-names.yml
- ansible-test-use-raise-from.yml
- ansible-test-utcnow.yml
- ansible-test-winrm-config.yml
- ansible-vault.yml
- ansible_test_alpine_3.18.yml
- apt_fail_on_autoremove.yml
- aptclean_diff.yml
- basestrategy-lazy-templar.yml
- ci_freebsd_new.yml
- collections_paths-deprecation.yml
- colors.yml
- command-expand-args.yml
- config_origins_option.yml
- connection-type-annotation.yml
- copy_diff.yml
- deb822_open_url.yml
- debconf.yml
- deprecated_string_conversion_action.yml
- display_proxy.yml
- dnf-update-only-latest.yml
- dnf5-cacheonly.yml
- dnf5-fix-interpreter-fail-msg.yml
- dnf5-gpg-check-api.yml
- dnf5-gpg-check-builtin.yml
- dnf5-logs-api.yml
- dnf5-test-env-groups.yml
- dotnet-preparation.yml
- dpkg_selections.yml
- fbsd13_1_remove.yml
- fetch_url-remove-auto-disable-decompress.yml
- find-mode.yml
- first_found_fixes.yml
- first_found_template_fix.yml
- fix-display-prompt-cpu-consumption.yml
- fix-handlers-callback.yml
- fix-pkg-mgr-in-TencentOS.yml
- fix-setuptools-warnings.yml
- fix-url-lookup-plugin-docs.yml
- forced_local+fix+.yml
- freebsd_12_4_removal.yml
- galaxy_check_type.yml
- galaxy_symlink.yml
- gather_facts_fix_parallel.yml
- get_action_args_with_defaults-remove-deprecated-arg.yml
- group_warning.yml
- inventory_cache-remove-deprecated-default-section.yml
- inventory_ini.yml
- jinja_plugin_cache_cleanup.yml
- long-collection-paths-fix.yml
- man-page-build-docs-dependency.yml
- man-page-subcommands.yml
- manifest-in-cleanup.yml
- mc_from_config.yml
- missing-doc-func.yml
- no-arbitrary-j2-override.yml
- omit-man-pages-from-sdist.yml
- parsing-splitter-fixes.yml
- passlib_or_crypt.yml
- password_hash-fix-crypt-salt-bcrypt.yml
- pep517-backend-import-fix.yml
- pep517-backend-traceback-fix.yml
- pep8-known-issue.yml
- persist_skip.yml
- pkg_mgr-default-dnf.yml
- powershell-module-error-handling.yml
- pre-release-hint-for-dep-resolution-error.yml
- pylint-deprecated-comment-checker.yml
- reboot.yml
- remove-deprecated-actionbase-_remote_checksum.yml
- remove-deprecated-datetime-methods.yml
- remove-deprecated-filelock-class.yml
- remove-docs-examples.yml
- remove-include.yml
- remove-play_iterator-deprecated-methods.yml
- remove-python3.5.yml
- remove-python3.9-controller-support.yml
- remove-templar-shared_loader_obj-arg.yml
- remove-unreachable-include_role-static-err.yml
- remove_md5.yml
- role-deduplication-condition.yml
- run-command-selectors-prompt-only.yml
- server2012-deprecation.yml
- service_facts_rcctl.yml
- service_facts_simpleinit_msb.yml
- service_fix_obsd.yml
- set-filters.yml
- setup_facter_fix.yml
- simple-result-queue.yml
- smart_connection_bye.yml
- suppressed-options.yml
- tarfile_extract_warn.yml
- templar-globals-dict.yml
- templating_fixes.yml
- text-converters.yml
- timeout_config_fix.yml
- update-maybe-json-uri.yml
- urls-client-cert-py12.yml
- urls-unit-test-latest-cryptography.yml
- user-add-password-exp-warning.yml
- v2.16.0-initial-commit.yaml
- vault_unvault_id_fix.yml
- yum-repository-docs-fixes.yml
- yum_repository_keepcache.yml
release_date: '2023-09-26'
2.16.0b2:
changes:
bugfixes:
- '``import_role`` reverts to previous behavior of exporting vars at compile
time.'
- ansible-galaxy info - fix reporting no role found when lookup_role_by_name
returns None.
- uri/urls - Add compat function to handle the ability to parse the filename
from a Content-Disposition header (https://github.com/ansible/ansible/issues/81806)
- winrm - Better handle send input failures when communicating with hosts under
load
minor_changes:
- ansible-test - When invoking ``sleep`` in containers during container setup,
the ``env`` command is used to avoid invoking the shell builtin, if present.
release_summary: '| Release Date: 2023-10-03
| `Porting Guide <https://docs.ansible.com/ansible-core/2.16/porting_guides/porting_guide_core_2.16.html>`__
'
security_fixes:
- ansible-galaxy - Prevent roles from using symlinks to overwrite files outside
of the installation directory (CVE-2023-5115)
codename: All My Love
fragments:
- 2.16.0b2_summary.yaml
- 81806-py2-content-disposition.yml
- ansible-test-container-sleep.yml
- cve-2023-5115.yml
- fix-ansible-galaxy-info-no-role-found.yml
- import_role_goes_public.yml
- winrm-send-input.yml
release_date: '2023-10-03'
2.16.0rc1:
changes:
bugfixes:
- Cache host_group_vars after instantiating it once and limit the amount of
repetitive work it needs to do every time it runs.
- Call PluginLoader.all() once for vars plugins, and load vars plugins that
run automatically or are enabled specifically by name subsequently.
- Fix ``run_once`` being incorrectly interpreted on handlers (https://github.com/ansible/ansible/issues/81666)
- Properly template tags in parent blocks (https://github.com/ansible/ansible/issues/81053)
- ansible-galaxy - Provide a better error message when using a requirements
file with an invalid format - https://github.com/ansible/ansible/issues/81901
- ansible-inventory - index available_hosts for major performance boost when
dumping large inventories
- ansible-test - Add a ``pylint`` plugin to work around a known issue on Python
3.12.
- ansible-test - Include missing ``pylint`` requirements for Python 3.10.
- ansible-test - Update ``pylint`` to version 3.0.1.
deprecated_features:
- Old style vars plugins which use the entrypoints `get_host_vars` or `get_group_vars`
are deprecated. The plugin should be updated to inherit from `BaseVarsPlugin`
and define a `get_vars` method as the entrypoint.
minor_changes:
- ansible-test - Make Python 3.12 the default version used in the ``base`` and
``default`` containers.
release_summary: '| Release Date: 2023-10-16
| `Porting Guide <https://docs.ansible.com/ansible-core/2.16/porting_guides/porting_guide_core_2.16.html>`__
'
codename: All My Love
fragments:
- 2.16.0rc1_summary.yaml
- 79945-host_group_vars-improvements.yml
- 81053-templated-tags-inheritance.yml
- 81666-handlers-run_once.yml
- 81901-galaxy-requirements-format.yml
- ansible-test-pylint3-update.yml
- ansible-test-python-3.12-compat.yml
- ansible-test-python-default.yml
- inv_available_hosts_to_frozenset.yml
release_date: '2023-10-16'
2.16.1:
changes:
release_summary: '| Release Date: 2023-12-04
| `Porting Guide <https://docs.ansible.com/ansible-core/2.16/porting_guides/porting_guide_core_2.16.html>`__
'
codename: All My Love
fragments:
- 2.16.1_summary.yaml
release_date: '2023-12-04'
2.16.1rc1:
changes:
breaking_changes:
- assert - Nested templating may result in an inability for the conditional
to be evaluated. See the porting guide for more information.
bugfixes:
- Fix issue where an ``include_tasks`` handler in a role was not able to locate
a file in ``tasks/`` when ``tasks_from`` was used as a role entry point and
``main.yml`` was not present (https://github.com/ansible/ansible/issues/82241)
- Plugin loader does not dedupe nor cache filter/test plugins by file basename,
but full path name.
- Restoring the ability of filters/tests can have same file base name but different
tests/filters defined inside.
- ansible-pull now will expand relative paths for the ``-d|--directory`` option
is now expanded before use.
- ansible-pull will now correctly handle become and connection password file
options for ansible-playbook.
- flush_handlers - properly handle a handler failure in a nested block when
``force_handlers`` is set (http://github.com/ansible/ansible/issues/81532)
- module no_log will no longer affect top level booleans, for example ``no_log_module_parameter='a'``
will no longer hide ``changed=False`` as a 'no log value' (matches 'a').
- role params now have higher precedence than host facts again, matching documentation,
this had unintentionally changed in 2.15.
- wait_for should not handle 'non mmapable files' again.
release_summary: '| Release Date: 2023-11-27
| `Porting Guide <https://docs.ansible.com/ansible-core/2.16/porting_guides/porting_guide_core_2.16.html>`__
'
security_fixes:
- templating - Address issues where internal templating can cause unsafe variables
to lose their unsafe designation (CVE-2023-5764)
codename: All My Love
fragments:
- 2.16.1rc1_summary.yaml
- 81532-fix-nested-flush_handlers.yml
- 82241-handler-include-tasks-from.yml
- cve-2023-5764.yml
- j2_load_fix.yml
- no_log_booly.yml
- pull_file_secrets.yml
- pull_unfrack_dest.yml
- restore_role_param_precedence.yml
- wait_for_mmap.yml
release_date: '2023-11-27'

View File

@ -1,2 +0,0 @@
bugfixes:
- ansible_facts.devices - Fix parsing of device serial number detected via sg_inq for rhel8 (https://github.com/ansible/ansible/issues/75420)

View File

@ -0,0 +1,3 @@
release_summary: |
| Release Date: 2023-11-06
| `Porting Guide <https://docs.ansible.com/ansible-core/2.16/porting_guides/porting_guide_core_2.16.html>`__

View File

@ -0,0 +1,3 @@
release_summary: |
| Release Date: 2023-09-26
| `Porting Guide <https://docs.ansible.com/ansible-core/2.16/porting_guides/porting_guide_core_2.16.html>`__

View File

@ -0,0 +1,3 @@
release_summary: |
| Release Date: 2023-10-03
| `Porting Guide <https://docs.ansible.com/ansible-core/2.16/porting_guides/porting_guide_core_2.16.html>`__

View File

@ -0,0 +1,3 @@
release_summary: |
| Release Date: 2023-10-16
| `Porting Guide <https://docs.ansible.com/ansible-core/2.16/porting_guides/porting_guide_core_2.16.html>`__

View File

@ -0,0 +1,3 @@
release_summary: |
| Release Date: 2023-12-04
| `Porting Guide <https://docs.ansible.com/ansible-core/2.16/porting_guides/porting_guide_core_2.16.html>`__

View File

@ -0,0 +1,3 @@
release_summary: |
| Release Date: 2023-11-27
| `Porting Guide <https://docs.ansible.com/ansible-core/2.16/porting_guides/porting_guide_core_2.16.html>`__

View File

@ -0,0 +1,2 @@
minor_changes:
- tasks - the ``retries`` keyword can be specified without ``until`` in which case the task is retried until it succeeds but at most ``retries`` times (https://github.com/ansible/ansible/issues/20802)

View File

@ -0,0 +1,3 @@
minor_changes:
- CLI argument parsing - Automatically prepend to the help of CLI arguments that support being specified multiple times.
(https://github.com/ansible/ansible/issues/22396)

View File

@ -0,0 +1,2 @@
bugfixes:
- fetch - Handle unreachable errors properly (https://github.com/ansible/ansible/issues/27816)

View File

@ -1,2 +0,0 @@
bugfixes:
- apt - fails to deploy deb file to old debian systems using python-apt < 0.8.9 (https://github.com/ansible/ansible/issues/47277)

View File

@ -0,0 +1,4 @@
---
minor_changes:
- "ansible-vault create: Now raises an error when opening the editor without
tty. The flag --skip-tty-check restores previous behaviour."

View File

@ -1,3 +0,0 @@
minor_changes:
- uri - Eliminate multiple requests to determine the final URL for file naming with ``dest``
- uri - Avoid reading the response body when not needed

View File

@ -1,2 +0,0 @@
bugfixes:
- Make include_role/include_tasks work with any_errors_fatal (https://github.com/ansible/ansible/issues/50897)

View File

@ -1,2 +0,0 @@
minor_changes:
- ansible-galaxy - the option to skip certificate verification now also applies when cloning via SCM (git/hg) (https://github.com/ansible/ansible/issues/41077)

View File

@ -1,3 +0,0 @@
---
minor_changes:
- Added AIX root CA certs folders - enhance the TLS support in ``uri`` task on AIX

View File

@ -1,2 +0,0 @@
bugfixes:
- "add_host/group_by: fix using changed_when in a loop (https://github.com/ansible/ansible/issues/71627)"

View File

@ -1,2 +0,0 @@
minor_changes:
- "ansible-test sanity validate-modules - the validate-modules sanity test now also checks the documentation of documentable plugin types (https://github.com/ansible/ansible/pull/71734)."

View File

@ -0,0 +1,2 @@
bugfixes:
- user - set expiration value correctly when unable to retrieve the current value from the system (https://github.com/ansible/ansible/issues/71916)

View File

@ -1,2 +0,0 @@
minor_changes:
- git - display the destination directory path in error msg when local_mods detects local modifications conflict so that users see the exact location

View File

@ -1,2 +0,0 @@
bugfixes:
- catch the case that cowsay is broken which would lead to missing output

View File

@ -1,2 +0,0 @@
bugfixes:
- unarchive - apply ``owner`` and ``group`` permissions to top folder (https://github.com/ansible/ansible/issues/35426)

View File

@ -1,3 +0,0 @@
minor_changes:
- apt - Adds APT option ``--allow-change-held-packages`` as module parameter ``allow_change_held_packages`` to allow APT up- or
downgrading a package which is on APTs hold list (https://github.com/ansible/ansible/issues/65325)

View File

@ -0,0 +1,2 @@
bugfixes:
- Prevent running same handler multiple times when included via ``include_role`` (https://github.com/ansible/ansible/issues/73643)

View File

@ -1,2 +0,0 @@
bugfixes:
- Parser errors from within includes should not be rescueable (https://github.com/ansible/ansible/issues/73657)

View File

@ -1,5 +0,0 @@
bugfixes:
- Templating - Ensure we catch exceptions when getting ``.filters`` and
``.tests`` attributes on their respective plugins and properly error,
instead of aborting which results in no filters being added to the
jinja2 environment

View File

@ -1,2 +0,0 @@
bugfixes:
- setup - detect docker container with check for ./dockerenv or ./dockinit (https://github.com/ansible/ansible/pull/74349).

View File

@ -1,2 +0,0 @@
minor_changes:
- "PlayIterator - introduce public methods to access ``PlayIterator._host_states`` (https://github.com/ansible/ansible/pull/74416)"

View File

@ -1,2 +0,0 @@
minor_changes:
- "PlayIterator - use enums for Iterating and Failed states (https://github.com/ansible/ansible/pull/74511)"

View File

@ -0,0 +1,3 @@
bugfixes:
- win_fetch - Add support for using file with wildcards in file name.
(https://github.com/ansible/ansible/issues/73128)

View File

@ -1,2 +0,0 @@
minor_changes:
- apt - Add support for using ">=" in package version number matching.

View File

@ -1,3 +0,0 @@
bugfixes:
- urls - Allow ``ca_path`` to point to a bundle containing multiple PEM certs
(https://github.com/ansible/ansible/issues/75015)

View File

@ -1,3 +0,0 @@
bugfixes:
- user - allow ``password_expiry_min`` and ``password_expiry_min`` to be set to ``0`` (https://github.com/ansible/ansible/issues/75017)
- user - allow password min and max to be set at the same time (https://github.com/ansible/ansible/issues/75017)

View File

@ -0,0 +1,3 @@
bugfixes:
- modules/user.py - Add check for valid directory when creating new user homedir (allows /dev/null as skeleton) (https://github.com/ansible/ansible/issues/75063)

View File

@ -1,2 +0,0 @@
bugfixes:
- "ansible-vault encrypt_string - fix ``--output`` option to correctly write encrypted string into given file (https://github.com/ansible/ansible/issues/75101)"

View File

@ -1,2 +0,0 @@
bugfixes:
- systemd - check if service is alias so it gets enabled (https://github.com/ansible/ansible/issues/75538).

View File

@ -1,2 +0,0 @@
bugfixes:
- vault - Warn instead of fail for missing vault IDs if at least one valid vault secret is found.

View File

@ -1,4 +0,0 @@
bugfixes:
- Interpreter Discovery - Fallback to OS family if the distro is not found in
``INTERPRETER_PYTHON_DISTRO_MAP``
(https://github.com/ansible/ansible/issues/75560)

View File

@ -1,2 +0,0 @@
bugfixes:
- validate_argument_spec - Skip suboption validation if the top level option is an invalid type (https://github.com/ansible/ansible/issues/75612).

View File

@ -1,2 +0,0 @@
bugfixes:
- Fix executing includes in the always section in the free strategy (https://github.com/ansible/ansible/issues/75642)

View File

@ -1,2 +0,0 @@
bugfixes:
- ansible-doc - ignore plugin deprecation warnings (https://github.com/ansible/ansible/issues/75671)

View File

@ -1,2 +0,0 @@
removed_features:
- cli - remove deprecated ability to set verbosity before the sub-command (https://github.com/ansible/ansible/issues/75823)

View File

@ -1,2 +0,0 @@
removed_features:
- copy - remove deprecated ``thirsty`` alias (https://github.com/ansible/ansible/issues/75824)

View File

@ -1,2 +0,0 @@
removed_features:
- url_argument_spec - remove deprecated ``thirsty`` alias for ``get_url`` and ``uri`` modules (https://github.com/ansible/ansible/issues/75825, https://github.com/ansible/ansible/issues/75826)

View File

@ -1,2 +0,0 @@
removed_features:
- Remove deprecated ``Templar.set_available_variables()`` method (https://github.com/ansible/ansible/issues/75828)

View File

@ -1,2 +0,0 @@
bugfixes:
- ansible-galaxy - Add galaxy_collection_skeleton/galaxy_collection_skeleton_ignore configuration options

View File

@ -1,2 +0,0 @@
minor_changes:
- "Start of moving away from using Six, Python 2 and 3 compatibility library (https://github.com/ansible/ansible/pull/75863)"

View File

@ -1,3 +0,0 @@
major_changes:
- Jinja2 Controller Requirement - Jinja2 3.0.0 or newer is required for the control node (the machine that runs Ansible)
(https://github.com/ansible/ansible/pull/75881)

View File

@ -1,2 +0,0 @@
minor_changes:
- "ansible-test validate_modules - allow ``choices`` for return values (https://github.com/ansible/ansible/pull/76009)."

View File

@ -1,3 +0,0 @@
bugfixes:
- _run_loop - Add the task name to the warning
(https://github.com/ansible/ansible/issues/76011)

View File

@ -1,2 +0,0 @@
bugfixes:
- "Fix task debugger to work with ``run_once`` using ``linear`` strategy (https://github.com/ansible/ansible/issues/76049)"

View File

@ -1,3 +0,0 @@
bugfixes:
- unarchive - Fix zip archive file listing that caused issues with content
postprocessing (https://github.com/ansible/ansible/issues/76067).

View File

@ -1,3 +0,0 @@
bugfixes:
- Fix help message for the 'ansible-galaxy collection verify' positional argument.
The positional argument must be a collection name (https://github.com/ansible/ansible/issues/76087).

View File

@ -1,3 +0,0 @@
bugfixes:
- hostname - Fix Debian strategy KeyError, use `SystemdStrategy`
(https://github.com/ansible/ansible/issues/76124)

View File

@ -1,2 +0,0 @@
minor_changes:
- dnf - add more specific error message for GPG validation (https://github.com/ansible/ansible/issues/76192)

View File

@ -1,4 +0,0 @@
bugfixes:
- >-
collection_loader - Implement 'find_spec' and 'exec_module' to override deprecated importlib methods
'find_module' and 'load_module' when applicable (https://github.com/ansible/ansible/issues/74660).

View File

@ -1,2 +0,0 @@
bugfixes:
- ansible-doc - Fix ansible-doc -l ansible.builtin / ansible.legacy not returning anything

View File

@ -1,2 +0,0 @@
minor_changes:
- "validate-modules - do some basic validation on the ``M(...)``, ``U(...)``, ``L(..., ...)`` and ``R(..., ...)`` documentation markups (https://github.com/ansible/ansible/pull/76262)."

View File

@ -1,2 +0,0 @@
bugfixes:
- "ansible-galaxy - when installing a role properly raise an error when inaccessible path is specified multiple times in roles_path (e.g. via environment variable and command line option) (https://github.com/ansible/ansible/issues/76316)"

Some files were not shown because too many files have changed in this diff Show More