Commit Graph

11982 Commits (1fdeff949c599a8f4e294699faa05d79c3cbce29)

Author SHA1 Message Date
Matt Clay 1fdeff949c
ansible-test - Update default containers (#80559) 1 year ago
Matt Clay ba47dd9ef4
ansible-test - Update pylint to 2.17.2 (#80555) 1 year ago
Sloane Hertel 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.
1 year ago
Sloane Hertel 964e678a7f
ansible-galaxy - fix installing dir sources with a trailing path separator (#79110)
* strip trailing path separator from type=dir sources
1 year ago
Matt Clay 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.
1 year ago
kloud-byun 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
1 year ago
Matt Clay 43c5cbcaef
Fix galaxy CLI unit test assertions (#80504) 1 year ago
Matt Clay 3ec828703f
Fix unit test asserts (#80500) 1 year ago
Matt Clay 74b102b33c
Fix unit tests returning values (#80499) 1 year ago
Matt Clay bd22b849c6
Fix unclosed files in unit tests (#80497) 1 year ago
Martin Krizek 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
1 year ago
Matt Clay 0371ea08d6
ansible-test - Add support for argcomplete 3 (#80482) 1 year ago
Matt Martz 62211097cb
Expand pylint deprecated plugin to catch ansible.module_utils.common.warnings uses (#80462) 1 year ago
Martin Krizek bc3cc426bf
fetch_url: remove auto disabling decompress when gzip is not available (#80474) 1 year ago
Martin Krizek 9f0a9cf20d
get_action_args_with_defaults: remove deprecated redirected_names arg (#80473) 1 year ago
Matt Martz 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
1 year ago
Sean Reifschneider 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
1 year ago
Matt Clay f9534fd7b7
ansible-test - Update default containers (#80468) 1 year ago
Matt Clay 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.
2 years ago
Matt Martz 7251938370
ansible.builtin inferred by collection_name == None (#80446) 2 years ago
Felix Fontein 92c694372b
Replace validate-modules's semantic markup parser with antsibull-docs-parser (#80406) 2 years ago
Felix Fontein 96f7fd5539
Extend ansible-doc test with more classic markup. (#80407) 2 years ago
Matt Clay 163f297d7f
Extend bulk issue creator (#80423)
It can now be used to create feature requests, not just deprecation bug reports.
2 years ago
Matt Martz 6d1e355639
Only use the selectors code path when we are prompt matching (#79931) 2 years ago
Sloane Hertel 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>
2 years ago
Matt Davis 5e131a96c0
bump devel to 2.16.0.dev0 (#80390) 2 years ago
Felix Fontein 2f647e9617
Implement semantic markup support for Ansible documentation in validate-modules. (#80243) 2 years ago
Matt Clay 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.
2 years ago
tu1h 043a0f3ee8
Fix run_once by instantly tiny post_validate (#78492) (#80051)
Signed-off-by: tu1h <lihai.tu@daocloud.io>
2 years ago
Felix Fontein 0e509ecf25
Support role extension for semantic markup. (#80305) 2 years ago
Martin Krizek a81b787a05
Add new dnf5 module (#80272) 2 years ago
Sloane Hertel 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
2 years ago
Matt Clay 5d64024f1a
ansible-test - Fix packaging change classification (#80360) 2 years ago
Matt Clay d8adc081d8
ansible-test - Update base and default container (#80355) 2 years ago
Matt Clay 49b5c80c41
ansible-test - Update sanity test requirements (#80354) 2 years ago
Matt Clay 46362bbd27
Update package-data sanity test (#80344)
The test no longer relies on the Makefile.
2 years ago
Matt Clay 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.
2 years ago
Matt Clay 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
2 years ago
Matt Martz d2f6ea4179
New deb822_repository module (#80018)
Fixes #77073
2 years ago
Felix Fontein 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.
2 years ago
Felix Fontein 086ae42209
Fix URL processing. (#80295) 2 years ago
Jordan Borean ba4505f5cb
Ansible.Basic - Improve temporary file cleanup process (#80293)
* Ansible.Basic - Improve temporary file cleanup process

* Add comment on struct value used
2 years ago
Matt Clay 8ce102f302
ansible-test - Remove macos/12.0 remote (#80319) 2 years ago
Brian Coca 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.
2 years ago
Wong Hoi Sing Edison 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>
2 years ago
Felix Fontein b398613120
Add support for plugin field in seealso. (#80212) 2 years ago
Matt Clay 054aa92158
Fix url lookup test to use test container (#80284) 2 years ago
Matt Martz 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
2 years ago
Matt Martz 42355d181a
Do not double calculate loops and `delegate_to` (#80171) 2 years ago
Felix Fontein fafb23094e
ansible-doc: fix broken seealso links in text output (#80280)
* Fix broken URLs.

* Also remove auto-generated description for modules outside ansible.builtin.
2 years ago