Commit Graph
54002 Commits
Author SHA1 Message Date
Sviatoslav SydorenkoandGitHub c59bcbe627 Bump coverage.py to v7.3.0 in ansible-test (#81077) 2023-08-30 08:58:45 -07:00
John HUandGitHub 65a96daaf4 Fix typos in url lookup plugin options (#81587) 2023-08-29 16:27:09 -05:00
Matt MartzandGitHub 509be19357 Fix nested jinja statements in integration tests (#81591) 2023-08-29 14:33:19 -05:00
Felix FonteinandGitHub 5dc3a2ee6d mode is a module option. (#81590) 2023-08-29 18:42:43 +01:00
kpincandGitHub aeec51ac54 Improve ansible.builtin.copy directory_mode parameter docs (#81127)
* Improve ansible.builtin.copy directory_mode parameter docs
2023-08-29 11:23:41 +01:00
bdaa091b33 Add warnings for illegal file names in role (#81555)
Co-authored-by: Aleksey Tsalolikhin <atsaloli.tech@gmail.com>
2023-08-28 14:54:08 -04:00
Brent BarbachemandGitHub 4ab5ecbe81 dnf - fix for a package from URI and update_only (#81568)
Fixes #81376
2023-08-28 10:48:45 +02:00
Abhijeet KasurdeandGitHub da63f32d59 script: add argument validation (#81469)
partially fixes: #81349

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2023-08-25 10:27:26 -07:00
Vlad GlagolevandGitHub 37cb44ec37 find: correct typo (#81512) 2023-08-25 10:22:43 -07:00
Jordan BoreanandGitHub 7865b198d2 PowerShell - Improve error checking (#80984)
Improves the error checking when running PowerShell modules using
Ansible.ModuleUtils.Legacy. It will only return an rc of 1 if both the
PowerShell module runner signalled an error occurred and those error
records were present in the output. This should reduce some false
positive errors when using the older module style.
2023-08-25 05:24:02 +10:00
Jordan BoreanandGitHub f3976117fb PowerShell - remove uneeded dotnet code for future compatibility (#81472) 2023-08-25 05:23:48 +10:00
Sam DoranandGitHub 116948cd14 user - set current expiration correctly when no shadow entry exists (#75194) 2023-08-23 11:18:57 -07:00
Abhijeet KasurdeandGitHub 2e6d849bdb apt: ignore fail_on_autoremove and allow_downgrade when using aptitude (#81445)
* apt: ignore fail_on_autoremove and allow_downgrade when using aptitude

* fail_on_autoremove (--no-remove) and allow_downgrade (--allow-downgrades)
  parameters are only valid for apt-get and not for aptitude. Ignore them when
  aptitude is detected and used.

Fixes: #77868
2023-08-23 08:42:03 -07:00
swakeertandGitHub 5deb4ee991 Remove duplicate FILE_ATTRIBUTES definition (#81494)
* Remove duplicated definition of the FILE_ATTRIBUTES constant in basic.py by importing it from the new location.
2023-08-23 09:34:29 -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
Dmitry K. AnisimovandGitHub 3e9d374fda fix typo in example human_to_bytes filter (#81559) 2023-08-22 11:25:51 -04:00
Abhijeet KasurdeandGitHub aa8a29a9d4 group: remove extraneous warning (#81557)
* remove extraneous warning shown when group does not exist

Fixes: #77049

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2023-08-22 11:23:10 -04:00
Abhijeet KasurdeandGitHub 4a96b3d5b4 path_join: update docs and examples for absolute path (#81544)
Document path_join behavior -
    If a path component is an absolute path, then all previous components
    are ignored and joining continues from the absolute path.

Fixes: #81446

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2023-08-22 11:12:21 -04:00
Abhijeet KasurdeandGitHub 863e2571db debconf: idempotency for password question (#81484)
* Gather value of password using debconf-get-selections command,
  use this information for idempotency.

Fixes: #47676

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2023-08-21 18:25:03 -07:00
Matt ClayandGitHub 6627ba9ace Unit test cleanup (#81556)
* Fix cleanup_tmp_file unit tests

* Simplify the problematic wcwidth chars unit test
2023-08-21 15:54:03 -07:00
Matt ClayandGitHub f28e32c063 ansible-test - Limit deprecated check to core (#81552)
Using `# deprecated:` comment checks in collections would effectively limit those collections to a single version of ansible-core.
2023-08-21 12:58:09 -07:00
CaesarovichandGitHub c69c83c962 Fix macos defaults (#79999) 2023-08-21 10:02:47 -07:00
Matt ClayandGitHub 390e508d27 ansible-test - Always use managed entry points (#81537) 2023-08-17 19:13:29 -07:00
Martin KrizekandGitHub a48feb4cfc "retries" without "until": retry until success (#81531)
Fixes #20802
2023-08-17 15:17:26 -04:00
Martin KrizekandGitHub 98f1627817 include_role: expose vars from parent roles to role's handlers (#81524)
* include_role: expose vars from parent roles to role's handlers

Fixes #80459
2023-08-17 15:14:20 -04:00
Matt MartzandGitHub a2673cb564 Pre-calculate date early and use it for all zipfile writes (#81521)
* Pre-calculate date early and use it for all zipfile writes

Fixes #80089
Closes #80578
2023-08-17 15:08:53 -04:00
Matt ClayandGitHub 9afaf2216b Remove obsolete text from release.py PR template (#81526) 2023-08-16 10:52:20 -07:00
Martin KrizekandGitHub 470f41b275 Deprecate STRING_CONVERSION_ACTION (#78860) 2023-08-16 08:44:35 -07:00
Matt MartzandGitHub ca08261f08 Add ability to filter find on mode (#81485) 2023-08-15 11:58:19 -05:00
Sverre H. HusebyandGitHub a2d9c4d62f docs: Update examples in systemd_service to use the new name (#81518) 2023-08-15 15:45:31 +00:00
Martin KrizekandGitHub 0cba3b7504 Last handler with same name wins for listen too (#81358)
Fixes #49371
Fixes #81013
2023-08-15 15:03:56 +02:00
Nikita KorolevandGitHub bd3ffbe109 fix incorrect ansible_managed formatting (#79129)
Ansible breaks configs if file name could be parsed as jinja template
or contains `%` chars.
Especially `%n`[ame%] which is a line break pattern according to [strftime (3)](https://manpages.debian.org/bullseye/manpages-dev/strftime.3.en.html)
2023-08-14 09:59:40 -04:00
01469c558c sanity: Document pep8 known issue with Python 3.12 (#81495)
The ``pep8`` sanity test may detect issues with f-strings on
Python 3.12, such as E201/E202, that are not detected under earlier
Python versions.

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
Co-authored-by: Matt Clay <matt@mystile.com>
2023-08-11 13:23:16 -07:00
6347da9696 Document return values of template module (#75980)
* Document return values of template module

Add documentation for some return values of template module. 

I have not tested this extensively, so it's possible that under special
circumstances this might not be entirely accurate, but briefly looking
at the code as far as I can tell they are correct.

Co-authored-by: mprasil <mprasil@mpT15p>
2023-08-11 14:04:23 -04:00
Matt ClayandGitHub 47ab59753c Clean up release script (#81488)
* Enable mypy for the entire packaging directory

* Return CompletedProcess only when capturing output

This allows stdout/stderr on CompletedProcess to be `str` instead of `str | None`.
The unused args on CompletedProcess have been removed.
Overload type hints have been added to reflect these changes.

* Relax return type on ensure_venv

This improves consistency with its usage, since `run` accepts `env` of `dict[str, t.Any]`.
Also removed unnecssary `str()` usage when updating `env`.

* Fix type hint on suppress_when

* Fix callable annotation

* Add type hint for command_parser

PyCharm complains about using a protected member, and also that it can't find the type in the type stubs.
However, mypy properly recognizes the type.

* Avoid unnecessary TypeVar usage
2023-08-10 13:39:37 -07:00
pippo571andGitHub 5dbcf47e02 Add documentation for systemd reload (#81473)
* Add documentation for systemd reload
2023-08-10 15:04:23 -04:00
Michael ConeandGitHub b4943e45d0 Update cliconf-> __init__.py -> get_capabilities() (#79097)
Doc string was incorrect. 
The `get_capabilities` method returns a Python Dict data structure not a JSON string as stated.
2023-08-10 10:54:15 -07:00
Matt ClayandGitHub d0699cb44a Add unit tests for module_utils.compat.datetime (#81483) 2023-08-09 12:24:10 -07:00
Matt ClayandGitHub 580b87252c Remove unreachable code in password lookup test (#81482) 2023-08-09 12:23:58 -07:00
Matt ClayandGitHub 726d9a5fcc Fix constructed inventory plugin unit test (#81481) 2023-08-09 12:23:47 -07:00
553f51e728 Revert logic to use Popen.communicate (#80874)
* Back out use of communicate, add better comments, add bufsize, and align with subprocess._communicate

* tests

* re-order logic slightly

* more comments

* loopty loop

* yet another comment

* Revert "yet another comment"

This reverts commit 96cd8ada5fa0441b92f2298bdaa6cb40594847d2.

* Revert "loopty loop"

This reverts commit 96ea066f6a7d18902c04a14f18dd79b38e56f5e7.

* ci_complete

* Copy in comment too

* Wording updates

Co-authored-by: Matt Davis <6775756+nitzmahone@users.noreply.github.com>

* Back out bufsize

---------

Co-authored-by: Matt Davis <6775756+nitzmahone@users.noreply.github.com>
2023-08-09 11:09:43 -07:00
Matt ClayandGitHub 85d3305889 Fix f-string whitespace in release script (#81477) 2023-08-09 09:35:38 -07:00
Matt DavisandGitHub 1c765a6afc restore conditional lookup nerfing (#81460)
* a recent optimization lost the unsafe lookup disable behavior when templating conditionals with inline templates that referred to untrusted values
* added regression test to catch this case
2023-08-09 09:25:20 -07:00
Abhijeet KasurdeandGitHub fa5fe8a7db Bump test container versions to latest (#81471)
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2023-08-08 19:53:04 -07:00
Abhijeet KasurdeandGitHub 493c678795 Sanity: Bump version to match Python 3.12 (#81399)
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2023-08-08 09:05:46 -07:00
f3a15a4a95 filters vault/unvault fix vault_id parameter usage (#81422)
* vault/unvault filters, fixed id field to match documented.

fixes #81420

Co-authored-by: Felix Fontein <felix@fontein.de>
2023-08-04 17:50:57 -04:00
Kristopher NewsomeandGitHub a1569ea4ca iptables chain creation does not populate with a rule (#80257)
* iptables chain creation does not populate with a rule

fixes #80256

* Add changelog fragment

* Add rules and flush chain during integration tests

* Check chain rule on comment

* Update test/integration/targets/iptables/tasks/chain_management.yml
2023-08-04 13:59:21 -04:00
Abhijeet KasurdeandGitHub f10d11bcdc dpkg_selections: Check if package exists before selection operation (#81406)
* dpkg_selections: Check if the package exists before the selection operation

Fixes: #81404

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2023-08-03 14:01:20 -07:00
Abhijeet KasurdeandGitHub 95fdd555b3 galaxy: Cross check the collection type (#81423)
* User-provided collection type might differ from collection
  source. Cross-check the type before proceeding

Fixes: #79463

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2023-08-03 13:59:59 -07:00
Matt ClayandGitHub f894ce89b4 Overhaul package-data sanity test (#81427)
The sanity test now only inspects the sdist and wheel instead of trying to install the sdist using setup.py.
2023-08-03 13:24:25 -07:00