Commit Graph
100 Commits
Author SHA1 Message Date
Sloane HertelandGitHub 7d174104be [stable-2.20] Document paramiko_ssh deprecation (#86258)
* Add deprecated to paramiko_ssh DOCUMENTATION

* Fix deprecation

Rename plugin with prefix _

Fix validate-modules bug introduced in 2.18 for ansible.builtin plugins

* Add 'removed' to the initial definition of main_fields
2026-03-12 22:06:37 +00:00
85ddbc4444 copy - fix reporting changed=True when a single-file dir is copied with remote_src=False (#85834) (#86336)
* Fix directory path construction in the action plugin

Fixes #85833

(cherry picked from commit 17fb4af38d)

Co-authored-by: Yuxiao Zeng <98871678+fh-yuxiao-zeng@users.noreply.github.com>
2026-01-14 14:13:23 -08:00
Sloane HertelandGitHub 2e35dd00ce adhoc, ansible-console - fix traceback for meta end_play tasks (#86294) (#86337)
Ensure all entrypoints using TaskQueueManager catch AnsibleEndPlay

(cherry picked from commit f924902830)
2026-01-14 13:55:35 -08:00
Sloane HertelandGitHub 1ec3664d05 Fix module_defaults templating for gather_facts, service, and package actions (#85857) (#86399)
* Ensure action plugins template module arguments from module_defaults as necessary

(cherry picked from commit f2357cdc53)
2026-01-14 13:49:59 -08:00
Sloane HertelandMatt Martz cbeb1da98b Remove support for resolvelib < 0.8.0 (#85936)
* Remove support for resolvelib < 0.8.0

Remove code handling differences between resolvelib 0.5.3 and 0.8.0

Drop some versions from the test to reduce the time it takes to run

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

* Remove type annotation

---------

Co-authored-by: Sviatoslav Sydorenko <wk@sydorenko.org.ua>
(cherry picked from commit cb2ecda514)
2025-10-06 11:58:06 -05:00
Sloane HertelandGitHub 27a56a34df Add feature preview play argument spec validation (#85763)
* Add new play keyword validate_argspec

Set to True to use the play name as the argument spec identifier. A play name is required (i.e. a host pattern is not supported as an argument spec name).

Alternatively, set to a specific argument spec name.

A valid argument spec for the play is required. Example:

# playbook.meta.yml
argument_specs:
  name of the play:
    options: {}

* Play argument spec validation runs after fact gathering

Play keywords like tags are inherited and work similarly to fact gathering
2025-09-18 15:13:07 -04:00
Sloane HertelandGitHub 43bb87107d Remove 'usage' parameter from CLI.init_parser and ansible.cli.arguments.option_helpers.create_base_parser (#85859)
The usage is generated from CLI arguments
2025-09-16 08:16:25 -07:00
Sloane HertelandGitHub 5e8815b823 Fix ansible-doc -l/-F/--metadata-dump for relative imports in filter/test plugins (#85801)
* Add test for sidecar documentation for filter plugin in a subdirectory

Fix ansible-doc --list/--list_files/--metadata-dump for relative imports in nested filter/test plugin files
2025-09-15 18:15:55 -04:00
Sloane HertelandGitHub ced362a50d ansible-galaxy - remove deprecated v2 API (#85830)
* ansible-galaxy - remove deprecated v2 API

Update unit tests exercising the v2 Galaxy API

Remove v2 API integration tests

* Remove internal test configuration for servers which support API v2 and v3

* Update and simplify verify tests by using the configured server list
2025-09-15 17:29:12 -04:00
Sloane HertelandGitHub 0ed37ca899 setup - add logical volume facts scoped by volume group (#85705)
Add an 'lvs' key to each value in ansible_facts['vgs'] to support extracting all logical volume facts.

Add note to consider deprecating ansible_facts['lvs'] in a future release since it is misleading if any volume groups have identical logical volume names.

Fixes #85632
2025-09-02 13:30:03 -04:00
Sloane HertelandGitHub 15e9f51e2d Task.resolved_action - fix resolving static actions consistently for callback plugins (#85524)
* Resolve static actions when the FQCN is already known or demanded by a callback plugin

shorthand syntax (e.g. "- ping:") is resolved by ModuleArgsParser

action/local_action syntax (e.g. "- action: ping") is resolved on demand

* Emit a warning if a callback plugin accesses the property when it's None. This is expected if action/local_action is a template and a callback plugin uses this value too early (like in v2_playbook_on_task_start) or late (like in v2_runner_on_ok for a task with a loop).
2025-08-11 15:04:54 -04:00
Sloane HertelandGitHub 9a6420e1d5 Fix nested import_tasks when the parent import contains a template (#85599)
* Test nested import_tasks when the parent import contains a template

* Fix templating the parent_include.args
2025-08-08 15:51:00 -04:00
Sloane HertelandGitHub 945516c209 ansible-galaxy - remove internal path when using AnsibleCollectionConfig.collection_paths (#85596)
* remove internal collections earlier to ignore consistently for different sub-commands

* remove internal collection handling from the dependency resolver

* add a test to ensure ansible._protomatter is not in the output of ansible-galaxy collection list

* fix existing test to ensure an error is given if no valid collection path is configured

* changelog
2025-08-04 13:45:26 -04:00
Sloane HertelandGitHub da6735160d Fix passing callbacks the delegated connection, host, port, and user (#85397)
Fix ssh plugin host variables. Variable names should conform to Python variable naming rules.
, and not contain characters like "[" or "]".

Update unit test
2025-07-08 10:12:42 -04:00
Sloane HertelandGitHub 7216e04139 Remove deprecation warning caused by automatic role argument spec validation (#85401) 2025-06-30 12:19:57 -07:00
8e9f5fb9d5 password lookup - re-attempt acquiring lock file regardless of locale (#85318)
* Fix handling FileExistsError, instead of only handling OSError when the human-readable error message is "File exists".

Co-authored-by: Matt Clay <matt@mystile.com>
2025-06-17 16:37:25 -04:00
d3977ebc88 fix handler include_tasks templating (#85015)
* Add test for a handler including tasks from a variable filename

* Add FieldAttributeBase attribute to indicate if the object should be post validated

Co-authored-by: Matt Davis <6775756+nitzmahone@users.noreply.github.com>
2025-06-11 11:27:00 -04:00
Sloane HertelandGitHub 93e6f012cb Remove unused local function _get_plugin_vars from vars manager (#85008) 2025-04-17 15:16:30 -04:00
Sloane HertelandGitHub d049e7b1b3 fix broken ansible-galaxy-collection resolvelib test (#84626) 2025-02-11 10:03:58 -05:00
Sloane HertelandGitHub a086c34a91 linear - don't treat end_role as a run_once task (#84673) 2025-02-11 08:54:39 -06:00
Sloane HertelandGitHub 333ee8d010 Test include_vars reserved variable matching (#84678)
* Add test case for include_vars

* Revise test to catch erroneous warnings
2025-02-07 16:15:59 -05:00
Sloane HertelandGitHub ad93b96750 host_group_vars - remove unnecessary os.path.join cache (#84549) 2025-01-14 14:55:33 -05:00
Sloane HertelandGitHub f0f5d7f88b simplify copy module (#84313)
* simplify redundancy with AnsibleModule set_*_if_different methods

* simplify copying a source directory to a dest directory without modifying behavior
2024-12-10 09:09:15 -05:00
Sloane HertelandGitHub af2bb2c182 wait_for_connection - test connection=local does not emit warning (#84438)
Add test for PR 84421
2024-12-05 17:24:48 -05:00
Sloane HertelandGitHub 3e82ed307b include_vars - fix including new hash variables when hash_behaviour is set to merge (#84303) 2024-11-14 13:50:14 -05:00
Sloane HertelandGitHub 157ef04b1e Add --flush-cache option to ansible-pull (#84211) 2024-11-06 11:40:15 -05:00
Sloane HertelandGitHub 771f7ad29c update ansible-galaxy resolvelib requirement to >= 0.5.3, < 2.0.0 (#84218)
* Update resolvelib upperbound to 2.0.0

Minor SemVer releases should not contain breaking changes

* Test the latest minor release and reduce number of resolvelib versions tested for efficiency
2024-11-06 10:20:26 -05:00
Sloane HertelandGitHub 32ae3ce117 Remove encrypt unit tests for undocumented algorithms, which are disallowed in 2.19. (#84219) 2024-11-01 13:21:24 -04:00
Sloane HertelandGitHub 03acb22f99 Fix returning unreachable for looped tasks (#84049)
* Fix returning unreachable for looped tasks

Add tests for ignore_unreachable and loop
2024-10-30 10:35:23 -04:00
Sloane HertelandGitHub a3b58fb67c Add a test using ignore_errors as a variable (#84175)
* Add a regression test for https://github.com/ansible/ansible/issues/32384
2024-10-29 16:32:17 +01:00
Sloane HertelandGitHub 4f6276d72d Remove configuration options that were moved to inventory plugins now that ansible-config supports plugin types. (#84130) 2024-10-16 15:39:15 -04:00
Sloane HertelandGitHub 7e57c0fb3d Fix copyright format for gather_facts and mount_facts as documented (#84087) 2024-10-08 17:11:06 -07:00
Sloane HertelandGitHub d0df3a174a ansible-galaxy - fix ignoring certs when installing from git repos (#83332)
* Fix installing collections|roles from git repos with GALAXY_IGNORE_CERTS

* Fix installing collections from git repos with --ignore-certs

* Update unit test

* Add test case
2024-10-07 18:42:49 -04:00
ee9e6130a7 Fix error message given by ansible.module_utils.facts.timeout.timeout (#83945)
* Update unit test

Co-authored-by: Sviatoslav Sydorenko (Святослав Сидоренко) <wk.cvs.github@sydorenko.org.ua>
2024-10-03 21:54:54 +00:00
Sloane HertelandGitHub bf8da52aac ansible-galaxy - fix the usage for role/collection install (#83979) 2024-09-23 10:04:45 -04:00
40ade1f84b Add mount_facts module (#83508)
* Add a mount_facts module capable of gathering mounts skipped by default
fact gathering

* By default, collect mount facts from standard locations including
/etc/mtab, /proc/mounts, /etc/fstab, /etc/mnttab, /etc/vfstab, and on AIX,
/etc/filesystems.

When no file-based source for the current mounts can be found
(like /proc/mounts), the module falls back to using mount as a source.
This allows BSD and AIX to collect the existing mounts by default, without
causing Linux hosts to use both /proc/mounts and mount output.

* Non-standard locations and "mount" can be configured as a sources.

* Support returning an aggregate list of mount points in addition to first
found.

When there are multiple mounts for the same mount point in an
individual source, a warning is given if the include_aggregate_mounts
option is not configured.

* Add options to filter on fstypes and devices (supporting UNIX shell
wildcards).

* Support configuring a timeout and timeout behavior to make it easier
to use the module as a default facts module without risking a hang.

* Include the source and line(s) corresponding to a mount for easier
debugging.

Co-authored-by: Brian Coca <bcoca@users.noreply.github.com>
Co-authored-by: Matt Clay <matt@mystile.com>
Co-authored-by: Matt Davis <6775756+nitzmahone@users.noreply.github.com>
2024-09-19 15:05:05 -04:00
85d9a40aac Clarify galaxy CLI --help about install locations (#83919)
* add descriptions for `ansible-galaxy install` and `ansible-galaxy role|collection install`

* fix the usage for installing roles and collections together and include collections in the description for -r

Closes #81159

Co-authored-by: Alan Rominger <arominge@redhat.com>
Co-authored-by: Sandra McCann <samccann@redhat.com>
2024-09-18 15:07:21 -04:00
fe7e68bfcb Fix ansible-vault integration test for missing vault ids (#83777)
* Fix broken, circumvented test for missing vault ids

* verify the command returns a non-zero exit code

Co-authored-by: Matt Clay <matt@mystile.com>
2024-08-13 17:20:39 -04:00
2b91c57c85 atomic_move - fix creating file in directory with setgid bit (#83718)
* fix creating file in directory with setgid bit

* add a test using the copy module's content option to create a file in a directory with setgid bit

Co-authored-by: Martin Krizek <martin.krizek@gmail.com>
2024-08-12 10:34:20 -04:00
Sloane HertelandGitHub 97a60c1e86 Fix csvfile test - quote file argument (#83751)
file was intended to be a string, not an undefined variable
2024-08-08 13:06:53 -04:00
Sloane HertelandGitHub 0be66ed6dc Fix task-adjacent search path in roles (#83621)
* Restore search path in the current task file’s directory for roles
2024-08-06 17:53:23 -04:00
Sloane HertelandGitHub 26c8a28d05 csvfile lookup - fix giving an error when no search term is provided (#83710)
Fixes #83689
2024-08-06 17:50:51 -04:00
Sloane HertelandGitHub ff5deaf62f fix module_defaults group incorrectly giving deprecation warnings (#83510)
don't display deprecation warnings for actions/modules as a result of using an action_group containing a deprecated plugin
2024-07-30 13:45:25 +00:00
Sloane HertelandGitHub 33565f3774 increase timeout downloading galaxy role URLs (#83562)
* Update the timeout to download role archive to 60 seconds to match collections
TODO: in future make a configurable 'artifact download timeout'
2024-07-23 21:56:15 +00:00
Sloane HertelandGitHub bdc1cdfa54 Revert "bool filter, add booleanization strategy option (#83362)" (#83391)
This reverts commit 655a8ff38f.
2024-06-06 14:30:15 -07:00
Sloane HertelandGitHub 68638f4710 fix any_errors_fatal tests (#83389)
* fix any_errors_fatal test to exit on non-zero rc

Use a typo in the debug msg to avoid matching play recap

* remove duplicate 'set -ux'
2024-06-06 12:25:49 -07:00
Sloane HertelandGitHub f2435375a8 Fix task.resolved_action callbacks (#82003)
* Fix task.resolved_action for callbacks when playbooks use action or local_action

* Fix using module_defaults with 'action' and 'local_action' task FA and add a test case

Fixes #81905
2024-05-30 10:20:54 -04:00
Sloane HertelandGitHub 65638b4d01 remove old install info when installing collections (#83194)
* Fix cleaning up galaxy server info from previous installations

* changelog
2024-05-14 17:09:55 +02:00
Sloane HertelandGitHub e84240db84 Fix installing roles containing symlinks (#82911)
* Fix installing roles containing symlinks

Fix sanitizing tarfile symlinks relative to the link directory instead of the archive

For example:

role
├── handlers
│   └── utils.yml -> ../tasks/utils/suite.yml

The link ../tasks/utils/suite.yml will resolve to a path outside of the link's directory, but within the role

role/handlers/../tasks/utils/suite.yml

the resolved path relative to the role is tasks/utils/suite.yml, but if the symlink is set to that value, tarfile would extract it from role/handlers/tasks/utils/suite.yml

* Replace overly forgiving test case with tests for a symlink in a subdirectory of the archive and a symlink in the archive dir when these are not equivalent.

* Build test case from role files to make it easier to add test cases

Fixes #82702
Fixes #81965
Fixes #82051
2024-04-24 11:07:29 -04:00
Sloane HertelandGitHub 61e18572bb Play - remove deprecated ROLE_CACHE in favor of role_cache (#82979) 2024-04-04 23:07:25 +00:00
Sloane HertelandGitHub 971c49b711 Remove deprecated vars keyword syntax as a list of dictionaries, it is now required to be a single dictionary (#82980)
Update unit test
2024-04-04 12:34:54 -07:00
Sloane HertelandGitHub e03fcda6da Remove deprecated configs for DEFAULT_FACT_PATH, DEFAULT_GATHER_SUBSET, and DEFAULT_GATHER_TIMEOUT (#82978)
Instead, set module_defaults at the play level, which will apply to the
gather_facts keyword as well as any
ansible.builtin.setup/ansible.builtin.gather_facts tasks.

- hosts: all
  gather_facts: yes
  module_defaults:
    ansible.builtin.setup:
      fact_path: /path/to/facts.d/
      gather_subset: '!all,!min,local'
      gather_timeout: 20
  tasks:
    # also applies to:
    - ansible.builtin.setup:
    - ansible.builtin.gather_facts:

If you wish to only apply these to the gather_facts keyword, set as play keywords.
2024-04-04 12:32:25 -07:00
Sloane HertelandGitHub 85d8673860 Follow up to #82933 - remove platforms from templates (#82961) 2024-04-02 17:06:39 -04:00
4bddbe69d5 Fix traceback inheriting from NetworkConnectionBase and add integration tests (#82954)
Co-authored-by: Jeroen van Bemmel <jvb127@gmail.com>
2024-04-02 11:19:07 -04:00
Sloane HertelandGitHub 478e139195 remove nonexistent url from role templates (#82933)
* Remove obsolete v1 link for role platforms from the role templates
* Delete platforms block entirely
2024-04-02 11:15:12 -04:00
b3d8cdde5d fix handling allow_duplicates with the role cache (#82691)
allow_duplicates is not part of the role uniqueness, so the value on the cached role may not match the current role.

* remove the allow_duplicates check from Role.has_run() which operates on the deduplicated role
* check the current role's allow_duplicates value in the strategy

Co-authored-by: Martin Krizek <martin.krizek@gmail.com>
2024-03-28 15:33:09 -04:00
Sloane HertelandGitHub b639bd1fd4 Allow "role_name : " prefix for notifying handler listen topics (#82854)
* Allow role name prefix for handler task listen topics

For example,

- name: handler name
  debug:
  listen: topic1

can be notified using `topic1`, `role : topic1` if the handler is in a
standalone or collection role, and `ns.col.role: topic1` if the role is
in a collection, the same way handler names work.

changelog

* fix changelog and tests
2024-03-26 13:29:45 -05:00
Sloane HertelandGitHub 2bb09bfd12 atomic_move - fix preserving extended acls (#82818)
* use copystat to copy as many attributes as possible before os.rename

update unit test mocks for updated method of attribute preservation

add integration test for lineinfile case

remove erroneous `- meta: end_play` from lineinfile test suite

* add keep_dest_attrs parameter to control whether src attributes are
copied initially, and for existing destinations, whether the src is
updated using the dest before being renamed

consolidate with copy unsetting extended attrs

ci_complete
2024-03-18 10:58:00 -04:00
7adc146e2f Fix traceback and allow installing roles with version None (#81849)
* Allow installing roles with version `None` from Galaxy

Co-authored-by: Matt Martz <matt@sivel.net>
2024-03-16 00:17:37 +00:00
Sloane HertelandGitHub 4bcc27ca99 add --extra-vars for ansible-galaxy role|collection init (#82605)
allow extra vars when templating j2 files in the skeleton, for example:

ansible-galaxy init --role-skeleton /path/to/skeleton --extra-vars @/path/to/vars_file.yml newrole

ansible-galaxy init --extra-vars "min_ansible_version=2.17.0" newrole
2024-02-14 13:50:36 -05:00
Sloane HertelandGitHub a452c53375 import_role - allow subdirectories with _from options (#82642)
* Allow subdirectories with import_role _from options

Add tests that tasks_from is restricted to the role

Note that a task like:

- import_role:
    name: role
    tasks_from: tasks/entrypoint.yml

will now load tasks from "{{ role_path }}/tasks/tasks/entrypoint.yml"
instead of "{{ role_path }}/tasks/entrypoint.yml". This change in
behavior matches include_role.

* better test case (filename doesn't match one in tasks/)

Fixes #82584
2024-02-06 16:13:47 +01:00
Sloane HertelandGitHub 13e6d8487a fix loading vars_plugins in roles (#82273)
* Fix loading legacy vars plugins when the plugin loader cache is reset

* Remove extra cache layer by ensuring vars plugin names are cached (stateless or not) so that the plugin loader cache can double as the load order
2024-01-26 09:01:14 -05:00
Sloane HertelandGitHub 0429520790 expect docs - improve responses description (#82544)
* consolidate notes describing the structure of `responses` with the option description

* include a link to Python regex syntax
2024-01-16 15:03:38 -05:00
Sloane HertelandGitHub da9edd7760 expect - fix argument spec error with timeout=null (#82522)
* Fix using timeout=null to wait indefinitely

* fix error message
2024-01-12 05:21:29 +10:00
d7be3824fe [ansible-galaxy] Remove role name conversion when the repo startswith 'ansible-role' (#82508)
* Remove role name conversion based on whether the repo name starts with
ansible-role

This was added in 2.3 to match the Galaxy ui behavior of truncating the
'ansible-role-' prefix automatically, but the new backend requires an
alternate name to be provided or defined in the ``galaxy_info``
metadata.

Roles that were imported using the ansible-role-$name convention will
need to use ``--role-name`` or add ``role_name`` to the ``galaxy_info``
dictionary in ``meta/main.yml``.

changelog

* Update changelogs/fragments/fix-default-ansible-galaxy-role-import-name.yml

* Update changelogs/fragments/fix-default-ansible-galaxy-role-import-name.yml

Co-authored-by: flowerysong <junk+github@flowerysong.com>

---------

Co-authored-by: flowerysong <junk+github@flowerysong.com>
2024-01-12 05:11:56 +10:00
Sloane HertelandGitHub 4760dae989 document apt auto-installed dep (#82503) 2024-01-09 19:49:13 -05:00
Sloane HertelandGitHub caa86cc4df Add the task info for tombstoned module/action plugins (#82451)
* Add the task info for tombstoned plugins

* Fix deprecation for 'include' by removing it from BUILTIN_TASKS which skip the plugin loader lookup

* changelog

remove obsolete unit test using 'include'

* Update changelogs/fragments/improve-tombstone-error.yml
2024-01-08 04:12:39 +00:00
Sloane HertelandGitHub b5649f9686 Remove more Python 2 handling from tests (#82449) 2024-01-08 04:00:10 +00:00
Sloane HertelandGitHub fe81164fe5 ansible-galaxy - fix exit code for failed role import (#82193) 2023-12-12 13:59:19 -05:00
Sloane HertelandGitHub 3a42a00368 Targeted fix for installing roles with symlinks containing '..' (#82165)
Set the tarfile attribute to a normalized value from unfrackpath instead
of validating path parts and omiting potentially invald parts

Allow tarfile paths/links containing '..', '$', '~' as long as the
normalized realpath is in the tarfile's role directory
2023-11-30 18:05:48 -05: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
Sloane HertelandGitHub 000cf1dd46 Update the test containers to include Python3.12.0 final (#81858) 2023-10-03 10:46:58 -07:00
Sloane HertelandGitHub b3408ab80b Fix dnf module crash for non-existent url (#81801)
* ci_complete ci_coverage
2023-10-03 12:37:34 -04:00
Sloane HertelandGitHub 7fab552563 Fix reporting role as not found when remote_data is None (#81829) 2023-10-02 09:11:12 -07:00
Sloane HertelandGitHub cb8cb8936a Update ansible-test containers
* Include Python 3.12rc3 and PowerShell 7.3.7
2023-09-28 10:24:03 -04:00
Sloane HertelandGitHub 230f956e25 Add lineinfile integration test for removing a line that has already been removed (#81762)
ci_complete ci_coverage
2023-09-26 11:07:53 -04:00
Sloane HertelandGitHub 85adaa76f1 Add integration test for copy with force=false when dest exists (#81756)
ci_complete ci_coverage
2023-09-22 09:53:24 -04:00
Sloane HertelandGitHub 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
Sloane HertelandGitHub 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
Sloane HertelandGitHub 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
Sloane HertelandGitHub 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
Sloane HertelandGitHub f5431321a2 password_hash - fix bcrypt algorithm when passlib is not installed (#81385) 2023-08-03 14:32:42 -04:00
Sloane HertelandGitHub 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
Sloane HertelandGitHub 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
Sloane HertelandGitHub 010e542a13 Fix blockinfile code comment (#81351) 2023-07-26 18:19:04 -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
Sloane HertelandGitHub 5167618e46 Update ansible-test containers to test Python 3.12 with the test venvs (#81330) 2023-07-21 20:15:07 -07:00
Sloane HertelandGitHub 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
Sloane HertelandGitHub 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
Sloane HertelandGitHub 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
Sloane HertelandGitHub 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
Sloane HertelandGitHub 59a791ee3b ansible-test - remove Fedora 37 container and remote support (#81093) 2023-07-13 08:50:15 -04: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
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
Sloane HertelandGitHub ed8a404f4a add coverage for Python 3.12 (#81125) 2023-06-26 10:38:22 -07:00
Sloane HertelandGitHub 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
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
Sloane HertelandGitHub 1ecc62ba06 Document lookups using dwim (#80878) 2023-06-07 12:08:52 -04:00
Sloane HertelandGitHub 090a5cdfcf add 2.16 to the release and maintenance table (#80974) 2023-06-07 11:54:23 -04:00
Sloane HertelandGitHub 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