Commit Graph

5572 Commits (754c54d3d6fb4346ed2c47db1f9757bd6ccfb473)

Author SHA1 Message Date
Matt Clay 754c54d3d6 Clean up setup_paramiko test target.
- Remove obsolete install/uninstall files.
- Use OS packages on Alpine 3.
2 years ago
Matt Clay 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.
2 years ago
Matt Clay f6c0e22f98 Add more retries to ansible-test-container test. 2 years ago
Matt Davis 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
2 years ago
Matt Clay 31f95e201a Handle line wraps in jinja_plugins test. 2 years ago
Matt Clay 79dfe14adf
More integration tests for import sanity test. (#79532) 2 years ago
Matt Clay 31f9d60b8d Don't use color in jinja_plugins test.
This should prevent color codes from interfering with string matches.
2 years ago
Brian Coca 5b51b560d0
Removed sorting to preserve original order (#74839)
updated tests to reflect new order
2 years ago
Matt Martz 1998521e2d
Always create new role (#78661)
Don't use role cache for determining whether to create a new instance of role
2 years ago
Matt Clay cda16cc5e9
ansible-test - Improve container management. (#78550)
See changelogs/fragments/ansible-test-container-management.yml for details.
2 years ago
Martin Krizek 3bda4eae6f
Fix repr(Task) to check action when testing for a meta task (#79464)
Fixes #79459
2 years ago
sbettid 3936b5c471
Fix file touch check mode result (#79360) (#79422)
Fixes #79360
2 years ago
Maxwell G 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.
2 years ago
Brian Coca 1bda6750f5
fix reject list (#79391) 2 years ago
Matt Martz d925ece764
Allow pip like version syntax for installing collections (#79405) 2 years ago
Matt Martz 7d35f70caf
Add tests to validate vars_files first found behavior (#79386) 2 years ago
Tom Page d72326b6af
Allow force deletion of group (#78172)
* Allow force deletion of group

* Update version_added

Co-authored-by: Jordan Borean <jborean93@gmail.com>
2 years ago
Roy Lenferink 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.
2 years ago
inifares23lab 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)
2 years ago
Sloane Hertel 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.
2 years ago
Sviatoslav Sydorenko bb7ad0f0d8 Enable the `reboot` integration test in CI
Co-Authored-By: Matt Clay <matt@mystile.com>
2 years ago
Jordan Borean 6def4a3180 Fix up sanity problems 2 years ago
Sviatoslav Sydorenko 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
2 years ago
Matt Clay 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
2 years ago
Sviatoslav Sydorenko 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>
2 years ago
Sloane Hertel 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.
2 years ago
Brian Coca f66016df0e
copy, avoid moving non temp remote 'non' files (#79102)
* copy, avoid moving non temp remote files that are not dirs/files
fix tests
2 years ago
Sloane Hertel 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
2 years ago
Martin Krizek 3a6eca6670
Fix test for jinja2_native preserve quotes (#79131)
Fixes https://github.com/ansible/ansible/pull/79119#discussion_r993752129
2 years ago
Martin Krizek d34b578685
jinja2_native: preserve quotes in strings (#79119)
Fixes #79083
2 years ago
Sloane Hertel f9cb679675
compile role with all parents in the dep chain (#79079)
fix inheriting from parents when role depth exceeds 3

Fixes #47023
2 years ago
Sloane Hertel 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.
2 years ago
Brian Coca 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>
2 years ago
sbettid 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
2 years ago
Matt Martz 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
2 years ago
Martin Krizek e1daaae42a
Fix using FQCN for flush_handlers (#79057)
Fixes #79023
2 years ago
Brian Coca 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
2 years ago
Felix Fontein 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>
2 years ago
Brian Coca 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
2 years ago
Jordan Borean ba6da65a0f
Fix connection/become task loop settings (#78565)
* Fix connection/become task loop settings

* Remove old code
2 years ago
Jordan Borean be4807b712
ansible-test validate-module - support sidecar docs (#78904) 2 years ago
Matt Martz c3fc8db41c
Deprecate using a list of dicts for vars. See #78920 (#78927) 2 years ago
Brian Coca 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
2 years ago
sbettid 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>
2 years ago
Felix Fontein 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 '---'.
2 years ago
Matt Clay 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).
2 years ago
Matt Martz 4c26022171
Don't request repo updates when only testing modes (#78843) (#78850)
(cherry picked from commit 254204856f)
2 years ago
Brian Coca 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>
2 years ago
Sloane Hertel 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>
2 years ago
Ruediger Pluem 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.
2 years ago