summaryrefslogtreecommitdiffstats
path: root/test/units/module_utils (unfollow)
Commit message (Collapse)AuthorFilesLines
2024-10-04ansible-test - Update astroid for pylint sanity test (#84054)Matt Clay2-2/+2
2024-10-04ansible-test - Disable pylint deprecated-* rules (#84050)Matt Clay7-2/+21
2024-10-04Implicit flush_handlers inherit play tags (#83968)Martin Krizek5-12/+41
2024-10-03Fix error message given by ansible.module_utils.facts.timeout.timeout (#83945)Sloane Hertel3-4/+4
* Update unit test Co-authored-by: Sviatoslav Sydorenko (Святослав Сидоренко) <wk.cvs.github@sydorenko.org.ua>
2024-10-03ansible-test - Update sanity tests and default Python (#83998)Matt Clay13-23/+31
* ansible-test - Update sanity test requirements * ansible-test - Default to Python 3.13 in base/default containers * ansible-test - Fix incorrect AnyStr type hints
2024-10-03Reduce number of implicit meta tasks (#84007)Martin Krizek10-152/+93
This greatly reduces run time on large inventories since meta tasks are executed in the main process sequentially and just executing them is expensive. This change avoids running the following implicit meta tasks: * ``flush_handlers`` on hosts where no handlers are notified * ``noop`` for the linear strategy's lockstep, instead hosts that are not executing the current task are just not part of the current host loop A playbook consiting of two simple plays both running on ~6000 hosts runs in: devel: 37s this PR: 1.3s Co-authored-by: Sloane Hertel <19572925+s-hertel@users.noreply.github.com> Co-authored-by: Sviatoslav Sydorenko (Святослав Сидоренко) <wk.cvs.github@sydorenko.org.ua>
2024-10-03file: simplify the code (#84043)Abhijeet Kasurde2-94/+126
* Remove unnecessary code * Make code simple to read Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2024-10-03get_url: properly parse filename in content-disposition (#83748)Martin Krizek4-22/+41
Since we don't really care about the type we don't have to query for it and just retrieve the filename value. Unfortunately we cannot use module_utils.urls.get_response_filename as we don't have the response object, so just utilize email.message.Message to parse the filename instead of manually doing the work ourselves. Fixes: #83690
2024-10-03Use sentinel everywhere (#84041)Abhijeet Kasurde19-94/+92
* Use sentinel everywhere Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2024-10-02ansible-test - Update nios-test-container to 6.0.0 (#84042)Matt Clay2-1/+3
2024-10-02remove one ignore clause for module copy (#83643)Alexei Znamensky3-3/+4
--------- Co-authored-by: flowerysong <junk+github@flowerysong.com>
2024-10-01cron: return stdout and rc for cron command (#83290)Jack Farzan2-1/+4
Co-authored-by: Jack Farzan <jfarzan@adobe.com>
2024-10-01debconf: set empty password value (#83217)Abhijeet Kasurde4-41/+153
Fixes: #83214 --------- Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2024-09-30Prevent condor from being installed and fulfilling libfmt dependency (#84023)Matt Martz1-1/+1
2024-09-30Add additional logging for SSH runtime output timeouts and escalation ↵uber-dendy2-7/+12
messages (#84008) Signed-off-by: Yuri Savinkin <stkwar@gmail.com> Co-authored-by: Abhijeet Kasurde <akasurde@redhat.com>
2024-09-26INVENTORY_IGNORE_EXTS stop ignoring ini (#84001)Brian Coca3-1/+5
* INVENTORY_IGNORE_EXTS stop ignoring ini Originally added to avoid configuration files for inventory scripts now clashes with the much more common ini inventory files. * add a note to script plugin * Update lib/ansible/plugins/inventory/script.py Co-authored-by: Abhijeet Kasurde <akasurde@redhat.com>
2024-09-26facts: Skip path if the distribution path is directory (#84012)Abhijeet Kasurde3-1/+21
* facts: Skip path if the distribution path is directory Skip path if the distribution path is directory instead of file. Handle exception raised while handling distribution path. Fixes: #84006 Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com> * Review requests --------- Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2024-09-26package/dnf action plugins: better facts failure msg (#83995)Martin Krizek3-9/+14
2024-09-24Test entry points with editable install (#84002)Matt Clay1-17/+32
This allows collection of code coverage for the entry points.
2024-09-24Ansible Errors, Don't hide stacked messages when yaml (#83933)Brian Coca4-8/+16
Also remove redundant msg now that we fixed yaml case So no more need to %s % e. Co-authored-by: Abhijeet Kasurde <akasurde@redhat.com>
2024-09-24split: Fix incorrect example result of the split builtin filter (#83982)林博仁 Buo-ren Lin1-1/+1
The following Python output proves that the second member of the resulting list should be " a", not "a": ```txt $ python3 Python 3.12.3 (main, Sep 11 2024, 14:17:37) [GCC 13.2.0] on linux Type "help", "copyright", "credits" or "license" for more information. >>> string = "jojo is, a" >>> string.split(',') ['jojo is', ' a'] ```
2024-09-24Add basic validation for action_groups (#83965)Felix Fontein6-1/+60
Co-authored-by: Sloane Hertel <19572925+s-hertel@users.noreply.github.com>
2024-09-24dnf5: fix tb when plugins API is not available (#83969)Martin Krizek2-1/+11
Follow up on https://github.com/ansible/ansible/pull/83105
2024-09-24Move ansible-deprecated ignores for tests inline (#83989)Matt Clay3-17/+13
2024-09-24zap changelogs (#83988)Matt Davis157-446/+1
2024-09-24bump devel to 2.19 (#83985)Matt Davis3-2/+10
2024-09-23isidentifier: Remove Python 2 specific code (#83688)Abhijeet Kasurde3-34/+20
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2024-09-23ansible-test - Use Python version in pylint contexts (#83984)Matt Clay3-43/+25
2024-09-23ansible-galaxy - fix the usage for role/collection install (#83979)Sloane Hertel1-1/+1
2024-09-23dnf5: re-introduce ``state: installed`` alias (#83961)Martin Krizek3-3/+5
Fixes #83960
2024-09-20Do not convert floats to ints when there is truncation (#83864)Brian Coca9-110/+43
Adjusted error messages fixed tests removed py2 compat tests, since no more py2 Co-authored-by: Matt Clay <matt@mystile.com>
2024-09-19Add mount_facts module (#83508)Sloane Hertel7-0/+1847
* 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-19ansible-test no longer needs special casing in `__main__.py` (#83962)Matt Martz1-17/+2
2024-09-18Clarify galaxy CLI --help about install locations (#83919)Sloane Hertel2-4/+32
* 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-18timedout extended (#83953)Brian Coca5-1/+46
* timedout extended * add timedout test
2024-09-16Update communication links for the forum (#83862)Don Naro6-42/+60
* update communication details in README * update comms details in contributing * update comms details in issue templates * add link to contributors guide * point to devel for comms
2024-09-13runas - create new SYTEM token for become (#83827)Jordan Borean2-25/+18
Instead of re-using the token used in impersonation, this change will create a new token for the SYSTEM account as returned by LogonUser. The benefits of this is that the token will contain the full privileges for the SYSTEM account rather than potentially one that has restricted privileges we used during impersonation. It should also help avoid problems on Windows that fails on status 0x0000016F when the impersonated token during become was from a process that is restricted from creating sub processes.
2024-09-11file module: Clarify the docs that the force parameter works for hardlinks ↵Gleb Popov1-2/+2
too (#83913)
2024-09-10service_facts, fix systemd/ubuntu failed reporting (#83424)Brian Coca2-4/+8
Avoid check description, better comments
2024-09-10fact gathering, mounts, fixes for single proc code and tests (#83866)Brian Coca5-105/+40
* Fact gathering fix 'no shm' branhc * Use concurrent.futures instead of multiprocessing This entirely avoids the need for fallback logic since the concurrent.futures thread pool does not depend on `/dev/shm`. Co-authored-by: Matt Clay <matt@mystile.com>
2024-09-10Replace binary_modules Makefile with Python script (#83925)Matt Clay2-18/+41
Also update the platform list: * Remove linux ppc64le * Add darwin arm64
2024-09-09ansible-test - Update base/default containers (#83930)Matt Clay1-3/+3
2024-09-09ansible-test - Update sanity test requirements (#83921)Matt Clay4-9/+9
2024-09-09release.py - Use changelog requirements (#83920)Matt Clay3-17/+2
Use the changelog sanity test requirements instead of the package-data sanity test requirements. This enables removal of most package-data sanity test requirements, as they are no longer used by the test itself. The additional requirements were being maintained only to provide pinned requirements for building the changelog during a release.
2024-09-06iptables, use existing validation (#83907)Brian Coca2-18/+1
also remove redundant and wrong test
2024-09-06Stop suggesting `easy_install` in hacking (#83909)Sviatoslav Sydorenko (Святослав Сидоренко)1-1/+1
It's been discouraged for the past decade. And CPython actually ships with pip nowadays, that is bundled within the built-in `ensurepip` stdlib module.
2024-09-06delay keyword changed from int to float (#83901)Brian Coca3-25/+46
* delay keyword changed from int to float * draft test * fixed test * expanded test, fixed 'name' tests also * cleanup * fix
2024-09-05Update subset.yml (#83908)Suman Tripuraneni1-1/+1
Typo error in examples
2024-09-05loop_control "early exit" feature (#62151)Brian Coca6-0/+44
* add a loop_control break_when directive to break out of a loop after any item * remove loop var as normal exit would * example usage: - name: generate a random password up to 10 times, until it matches the policy set_fact: password: "{{ lookup('password', '/dev/null', chars=character_set, length=length) }}" loop: "{{ range(0, 10) }}" loop_control: break_when: - password is match(password_policy) Co-authored-by: s-hertel <19572925+s-hertel@users.noreply.github.com>
2024-09-04release.py - Include pyproject.toml in git add (#83892)Matt Clay1-0/+1