Commit Graph

32195 Commits (56d142350d62fb674e1c6874b3ace2cf5cb933a7)

Author SHA1 Message Date
Matt Martz 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>
1 year ago
Sloane Hertel b5b239fd71
fix role argument spec error for invalid suboptions (#76578)
fixes https://github.com/ansible/ansible/issues/75536
1 year ago
Sloane Hertel 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
1 year ago
Sloane Hertel fd325c00bd
ansible-galaxy collection|role init - fix preserving symlinks (#79134)
* Preserve symlinks in custom role/collection skeletons

* changelog
1 year ago
Olaf Klischat 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>
1 year ago
evangelionlion 6f8c1da0c8
correct the mistake of example repeat_original (#79659)
there is a little mistake 


##### ISSUE TYPE
- Docs Pull Request

+label: docsite_pr
1 year ago
Jonathan Rietveld 4a29591b98
Fix a typo in the warning message (#79635) 1 year ago
jbreitwe-rh 38cedc7f1a
Fixed incorrect spelling of the word overridden. (#79620) 1 year ago
Brian Coca 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'
1 year ago
Rafał Osiecki 0f01c69f1e
Update split.yml (#79570)
typo fix
1 year ago
Martin Krizek 60f76436c1
Simplify AnsibleJ2Vars by using ChainMap for vars (#78713)
Co-authored-by: Matt Martz <matt@sivel.net>
2 years ago
Thomas Poindessous 6a7fb7d2ab
fix: broken link (#79461) 2 years ago
zitatorocsik bc13099e56
fixed misleading setup example (#79495) 2 years ago
Sloane Hertel 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
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
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
Martin Krizek 3bda4eae6f
Fix repr(Task) to check action when testing for a meta task (#79464)
Fixes #79459
2 years ago
Sloane Hertel 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>
2 years ago
Gaudenz Steinlin 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
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 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
2 years ago
Christian Loos f79a54ae22
Update vendored distro (#79227)
Commit bb35d41 in branch python2.7-support from 2022-10-10:
https://github.com/python-distro/distro/commit/bb35d41
2 years ago
Brian Coca 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>
2 years ago
Wong Hoi Sing Edison 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>
2 years ago
Brian Coca 1bda6750f5
fix reject list (#79391) 2 years ago
Matt Martz 942bcf6e7a
Add manifest includes for reuse licenses (#79403)
* Add includes for reuse licenses

* Add additional exludes to follow REJECT_EXTS

* clog frag
2 years ago
Matt Martz d925ece764
Allow pip like version syntax for installing collections (#79405) 2 years ago
seachanged 6cec31574f
Update fileglob.py (#78887)
Improve documentation for relative file paths
2 years ago
Joseph Shraibman f089aae5ee
Clarify that b64decode does not work with binary output (#79294) 2 years ago
faust 0a2b96f402
typos (#79377) 2 years ago
saranti b7ea661807
Update pull.py (#79387) 2 years ago
Rabi Mishra 6059116a64
Replace _valid_attrs with fattributes (#79376)
It was missed in one place it seems.
2 years ago
Felix Fontein 1705ec98cd
ansible-doc and validate-modules: remove underscore deprecation handling for collections (#79362)
* Remove underscore deprecation handling for collections.

* Also consider ansible.legacy.
2 years ago
Brian Coca 3448fcabc5
file lookup now works with general lookup error framework (#79339)
* file lookup now works with general lookup error framework
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
Darshan eae42ec57e
openbsd factgs, use physmem instead of usermem for total mem (#79316)
Signed-off-by: darshanip <darshancoding@gmail.com>
2 years ago
stmps 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
2 years ago
Louis Mandel 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
2 years ago
Felix Fontein 2a03c8028e
Fix typo 'Ansbile'. (#79318) 2 years ago
Sloane Hertel f700047e69
blockinfile - document multiline marker behavior (#79292) 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
Jordan Borean 6def4a3180 Fix up sanity problems 2 years ago
Alicia Cozine bfcb557777
replace yes/no with true/false in docstrings (#79274)
Co-authored-by: Alicia Cozine <acozine@users.noreply.github.com>
2 years ago
Felix Fontein 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.
2 years ago
Alex Willmer 6d9e2bc5e9
De-duplicate initialisation of ConnectionBase._connected (#79256)
The same value is unconditionally set 4 lines down.
2 years ago
Brian Coca 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
2 years ago
Brian Coca 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
2 years ago
Kenyon Ralph 0bacea70c4
plugins/lookup/pipe: docs typo fixes (#79222) 2 years ago