Commit Graph
54083 Commits
Author SHA1 Message Date
Jordan BoreanandGitHub f5d7dc1a97 Legacy.psm1 - Add note telling people not to use function (#82076) 2023-10-27 05:16:05 +10:00
Thomas SjögrenandGitHub fb8ede22e1 don't warn about using a yescrypt hash as user password (#82071)
* dont warn about using a yescrypt hash as password

Signed-off-by: Thomas Sjögren <konstruktoid@users.noreply.github.com>

* add changelog

Signed-off-by: Thomas Sjögren <konstruktoid@users.noreply.github.com>

* add yescrypt test

Signed-off-by: Thomas Sjögren <konstruktoid@users.noreply.github.com>

---------

Signed-off-by: Thomas Sjögren <konstruktoid@users.noreply.github.com>
2023-10-27 05:03:49 +10:00
Abhijeet KasurdeandGitHub e8ef6b7d7c Consolidate systemd detection logic (#81809)
* Add logic to consider the canary location for systemd files

Fixes: #80975

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2023-10-25 19:09:46 -07:00
bf29458726 Address nuance in key checking docs (#82058)
* Address nuance in key checking docs

  and add note to ssh plugin to let users know 'final authoritative source'.

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

Co-authored-by: Abhijeet Kasurde <akasurde@redhat.com>
2023-10-25 12:02:29 -04:00
Michael PardatscherandGitHub b4920c83ad Fix locale related parsing error in git.py
* Fix locale related parsing error in git.py

This fixes the issue found at https://github.com/ansible/ansible/issues/77213 which got introduced by changing over to "best parseable locale" approach, but missing out the requirement of locales other than `L` having to have `LANGUAGE` specified as well. For further details, check this post within the issue discussion: https://github.com/ansible/ansible/issues/77213#issuecomment-1446919617

* Add changelog

Create 81931-locale-related-parsing-error-git.yml
2023-10-25 15:47:55 +02:00
Martin KrizekandGitHub fe94a99aa2 any_errors_fatal fixes (#78680)
Fixes #31543
Fixes #36308
Fixes #73246
Fixes #80981
Fixes #81533

ci_complete
2023-10-25 09:42:13 +02:00
Matt Clay c827dc0dab Remove obsolete requirements from prepare_http_tests 2023-10-24 09:19:58 -07:00
Abhijeet KasurdeandGitHub 0bfc5bcf82 Fix contains example (#82067)
* Added missing round bracket

Fixes: https://github.com/ansible/ansible-documentation/issues/555

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2023-10-24 17:30:11 +02:00
Brian CocaandGitHub 99e0d25857 ansible-pull now handles all secret files CLI options (#82009)
* ansible-pull added missing pasthrough for secrets

 Both become and connection password file options were missing.
 Also added test
2023-10-24 09:20:25 -04:00
9ee603d1c5 Clarify some points in config lookup documentation (#81951)
Also update tests to support the format on modules/plugins

Co-authored-by: Brian Scholer <1260690+briantist@users.noreply.github.com>
Co-authored-by: Felix Fontein <felix@fontein.de>
2023-10-24 09:17:32 -04:00
Adam RossandGitHub b815b15362 Fix additional spelling errors in builtin modules (#82012) 2023-10-23 21:22:35 -07:00
Matt Clay 0b7387d46c Improve filter_encryption test
- Update `data2_vaulted_string_with_id` to match the documented plaintext.
- Add a comment explaining how `data2_vaulted_string_with_id` was derived.
- Add assertions for unvaulted values to ensure they match their plaintext.
- Add round-trip tests for vault+unvault when no salt is used.
2023-10-23 15:46:00 -07:00
Matt ClayandGitHub 2d2211e4e1 Simplify filter_encryption test (#82062) 2023-10-23 19:11:31 +00:00
Matt DavisandGitHub 40263992df remove args passthru on role runme tests that use grep (#82060)
* varying verbosity was masking some first-pass test failures
2023-10-23 17:37:50 +00:00
Brian CocaandGitHub b4566c18b3 Fix Jinja plugin deduplication (#82002)
for j2 plugins dedupe on path and  not basename
for j2 this is a container file , for other plugins file name == plugin name
2023-10-20 19:00:41 -04:00
Matt Clay e933d9d8a6 ansible-test - Fix parsing of cgroup entries 2023-10-19 15:30:32 -07:00
Matt ClayandGitHub 09d943445c 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
2023-10-19 13:49:00 -07:00
Steve MaherandGitHub 598a9307d7 var names not matching in example. (#82001)
Update to var name as example is not correct.
2023-10-19 12:41:51 -07:00
DomenickD3andGitHub 2e4f5d5ca0 Replace launchpad.net/api with api.launchpad.net @ apt_repository module
This patch is a refactoring change. It replaces one Launchpad endpoint URL with another on a subdomain. There is no functional effect to this whatsoever.

PR #81978

Refs:
* https://github.com/ansible/ansible/pull/81978#issuecomment-1767062178
* https://bugs.launchpad.net/launchpad/+bug/2039251/comments/12
2023-10-19 01:33:11 +02:00
Matt ClayandGitHub 37cee8bdfc ansible-test - Remove special cryptography install (#82008)
Python 3.10 is the minimum version on the controller, and it requires openssl 1.1.1 or later.

As a result, there's no need to check the openssl version any longer.
2023-10-18 10:52:18 -07:00
Deeptanshu DasandGitHub 74f6e6a134 Update apt.py (#81975)
updating documentation
2023-10-17 11:58:04 -04:00
Jordan BoreanandGitHub 22568305d6 Add ignore invalid options override for mod wrapper (#81899)
Adds an option that can have an action plugin tell the module to ignore
options that do not fit its arg spec. This is to enable support for core
running modules that exist outside of the collection that may not be new
enough to support some of the options supplied to it.
2023-10-17 11:05:21 -04:00
Isaac ChungandGitHub 5812cabaf5 Fix typos in builtin modules (#81969) 2023-10-13 20:37:58 -07:00
Matt ClayandGitHub 4f04df75cc Fix outdated S3 URLs (#81964)
We should always use the CloudFront backed endpoint (ci-files) not the direct S3 bucket reference (ansible-ci-files).
2023-10-12 19:28:40 -07:00
Matt ClayandGitHub f5c742cdfd ansible-test - Clean up old Python 2 compat code (#81962)
* Update generated code __future__ import

* Remove Python 2.x compat from compile sanity test

* Remove __metaclass__ from pylint good names list

* Remove Python 2.x compat from ansible-test injector

* Remove Python 2.x compat from ansible-test importer

* Remove Python 2.x compat from ansible-test units

* Remove Python 2.x compat from validate-modules

* Remove Python 2.x compat from pylint plugins

* Remove more Python 2.x compat from ansible-test

* Remove Python 2.x openssl detection in ansible-test

* Remove obsolete Python 2.x comment

* Remove obsolete ansible-test Python 2.x support

* Remove unused bootstrap script functions

* Keep mypy happy

* Remove unused imports

* Keep pylint happy
2023-10-11 19:04:30 -07:00
Matt ClayandGitHub 3ae8541133 Update boilerplate in galaxy network templates (#81959) 2023-10-11 18:32:57 -07:00
Matt ClayandGitHub 3f607359de Remove obsolete compat code from integration tests (#81961)
Also fix up boilerplate for non .py extension files that contain Python code.
2023-10-11 18:22:33 -07:00
Matt ClayandGitHub 40e4c69724 Cleanup the hacking directory a bit (#81960)
* Clean up hacking/ansible-profile script

Also rename the script so it has a `.py` extension.

* Remove test-module symlink

Use the test-module.py script instead.
2023-10-11 17:44:42 -07:00
Matt ClayandGitHub 9295bb5b5d Unit test cleanup (#81958)
Remove obsolete Python 2.7 and 3.6 support code and fix up existing tests.
2023-10-11 17:31:04 -07:00
Matt ClayandGitHub fd0f48e99d ansible-test - Update base/default containers (#81957) 2023-10-11 17:17:11 -07:00
Matt DavisandGitHub d8484f0af7 Update default test container Python to 3.12 and support for PyLint 3.0.1 (#81953)
* 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
2023-10-11 13:04:22 -07:00
Sviatoslav SydorenkoandGitHub d2ba76c117 Remove Python < 3.5 selectors fallbacks (#81872) 2023-10-11 08:36:20 -07:00
Sviatoslav SydorenkoandGitHub 46623b0a96 Deprecate pycompat24 (#81896) 2023-10-10 12:00:05 -04:00
Sviatoslav SydorenkoandGitHub 350a394185 Remove Python 2 importlib.import_module compat (#81879) 2023-10-10 11:52:47 -04:00
Matt MartzandGitHub 92d2c66db2 Remove py2 support from urls.py (#81880) 2023-10-09 11:35:50 -05:00
Klaas DemterandGitHub 858a3dbaad Fix example in strftime filter plugin help (#81696)
* Move the timestamp example to to_datetime.yml and be more verbose in its description
2023-10-09 08:55:06 -07:00
Jordan BoreanandGitHub 8a5ccc9d63 ansible-galaxy - fix traceback error for invalid req file (#81917)
Provide a better error message when encountering a YAML requirements file that is not a dictionary or list.

Fixes: #81901
2023-10-05 12:03:01 -07:00
Jordan BoreanandGitHub 976067c15f Add more winrm coverage (#81923) 2023-10-06 04:55:47 +10:00
Jordan BoreanandGitHub 282908c57e Add test coverage for winrm (#81910) 2023-10-06 01:28:12 +10:00
Matt ClayandGitHub 16b23d6779 Rename boilerplate sanity test (#81903)
The test covers more than just future boilerplate, so the shorter name is more appropriate.
2023-10-04 15:33:12 -07:00
Matt ClayandGitHub 9f899f9492 Require from __future__ import annotations (#81902) 2023-10-04 22:11:17 +00:00
Matt ClayandGitHub 921efce43a ansible-test - Remove more Python 2.7 / 3.6 support (#81898) 2023-10-04 11:32:31 -07:00
Jordan BoreanandGitHub dfc62589f6 win_fetch - improve test time by not scanning Win dir (#81884) 2023-10-05 00:57:39 +10:00
Abhijeet KasurdeandGitHub c0eefa955a docs: update error message (#81554)
* Reword the error message when the module fails to parse parameters
  in JSON format
* misc typo fixes

Fixes: #81188

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2023-10-04 14:49:03 +00:00
Kunal VardaniandGitHub d67d8bd823 Misc typo fixes in connection plugin (#81883) 2023-10-04 06:54:50 -07:00
Matt ClayandGitHub b94ee1cefd Drop Python 2.7 and Python 3.6 support (#81866)
* Drop Python 2.7 and Python 3.6 support

* Remove obsolete _json_compat
2023-10-03 21:52:38 +00:00
Matt DavisandGitHub c1343cc304 switch available_hosts to frozenset from list in ansible-inventory (#81870)
* major speedup large inventories, since it's consulted iteratively
2023-10-03 17:20:14 -04:00
debf2be913 optimize host_group_vars and vars plugin loading (#79945)
* 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>
2023-10-03 16:24:06 -04:00
Martin KrizekandGitHub 9b3ed5ec68 Properly template tags in parent blocks (#81624)
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
2023-10-03 15:07:26 -04:00
Abhijeet KasurdeandGitHub 304e63d76e Add family fallback for Amzn to register as RedHat (#81755)
* Add family fallback for Amzn to register as RedHat

Fixes: #80882

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2023-10-03 18:54:14 +00:00