Commit Graph

19153 Commits (78ff1ab54631d0d18c6902b08f0167accdd7bdab)

Author SHA1 Message Date
Matt Martz 96b221b344
Update vendored copy of distro to 1.6.0 (#75732)
* Update vendored copy of distro to 1.6.0

* copy pasta mistake

* ci_complete
3 years ago
Sloane Hertel 45459346ed
Document diff mode support for apt_repository and cron (#75709) 3 years ago
Brian Coca 8dc5516c83
getent, fix returning mulitple results for key (#75620)
* getent, fix returning multiple results for key
* added return docs

Co-authored-by: flowerysong <junk+github@flowerysong.com>
3 years ago
Sam Doran a11bb8b4d3
Revert "user - consistently create user home directory on Linux (#71952)" (#75704)
This reverts commit 2f7e0b8489.
3 years ago
maulikd 9558f53a58
Fix git submodules path issue (#75655)
* Fix git path used for submodules

* Fix git submodules integration test
3 years ago
hyperreality c3fc8fb99a
apt module: add option to allow package downgrades (#74852)
* apt module: add option to allow package downgrades

* Add new option to module so users don't have to force downgrades which
  is insecure and dangerous

* Add integration tests similar to upgrade integration tests

* Changelog

* Update changelog fragment

* Update changelogs/fragments/74852-apt-allow-downgrade.yaml

Co-authored-by: Amin Vakil <info@aminvakil.com>

* Update lib/ansible/modules/apt.py

Co-authored-by: Amin Vakil <info@aminvakil.com>

* Update lib/ansible/modules/apt.py

Co-authored-by: Amin Vakil <info@aminvakil.com>

Co-authored-by: Amin Vakil <info@aminvakil.com>
3 years ago
Matt Clay de01db08d0
pip - Use pip from the current Python interpreter. (#75634)
* pip - Use pip from the current Python interpreter.

If `executable` and `virtualenv` were not specified, and
the `pip` Python module is available for the current interpreter,
use that `pip` module instead of searching for a `pip` command.

* Add comment about needing `__main__` to run `pip`.

* Fix unit test.

* Add porting guide entry.

* Update changelog to match porting guide description.

ci_complete
3 years ago
Martin Krizek e60ee82343
docs: clarify that known_hosts path must exist (#75615)
* docs: clarify that known_hosts path must exist

Fixes #75606

* Clarify clarification.
3 years ago
MaxBrady ccf8a7da82
Modify getent example; closes #75624. (#75633)
* Adds "ansible_facts." in front of each getent example.
3 years ago
Brian Coca dcd31da01a
clarify cacheable (#75085)
* clarify cacheable

* Update lib/ansible/modules/set_fact.py

Co-authored-by: Abhijeet Kasurde <akasurde@redhat.com>

Co-authored-by: Abhijeet Kasurde <akasurde@redhat.com>
3 years ago
Mads Jensen d6dededab8
Use context manager for file handling in some system modules. (#65227) 3 years ago
Brian Coca 2462ec74a0
validate_args_spec, use combine vars and in precedence (#75471)
* combine vars and in correct precedence
* add examples
3 years ago
Brian Coca 051a257092
Add attributes a-c (#75561)
* removed redundant notes
3 years ago
Martin Krizek d36116ef1c
dnf: ensure we use the correct locale for dnf API (#75264)
Fixes #75021
3 years ago
Toshio Kuratomi b37a0630da
Revert "use versioned doclink for url references (#74245)" (#74782) 3 years ago
Martin Krizek 2ba9e35d09
yum: fix yumstate when wildcards are used in list arg (#75545)
Fixes #74557

* map is not available on centos 6's jinja...
3 years ago
Martin Krizek 51f2f1ac5e
yum: fix parsing of check-update with subsequent empty lines (#75452)
Rather than adding further complexity to the regex, preprocess the output to
remove any empty lines. Now the only purpose of the regex is to fix
wrapped lines.

Fixes #70949
3 years ago
Martin Krizek 9505f8c75d
dnf: allow for download_only to be run without root (#75532)
Fixes #75530
3 years ago
Martin Krizek 1c34492413
dnf: align the return value of the list argument with yum (#75501)
* dnf: align the return value of the list argument with yum

Fixes #75483

* Add integration test
3 years ago
Martin Krizek a88741cf14
dnf: properly capture transaction error (#75444)
Fixes #72651
3 years ago
Matt Clay ce6d8a143c
Code cleanup to prepare for pylint update. (#75475)
* user - Remove unused code.
* Replace deprecated abstractproperty decorator.
* Fix __all__ to be a tuple.
* Use a generator in subelements lookup.
* Use from import in basic.py
* Add changelog fragment.
* Fix selinux unit test.
3 years ago
Brian Coca f1ad6cf479
added more attributes for existing facilities (#74331) 3 years ago
Brian Coca 75e6bdb579
ensure we convert path in warning or py2.6 breaks (#75413) 3 years ago
Sloane Hertel b541a148d5
Fix dnf package matching (#75411)
* Fix a bug with the dnf module not using all components of a package name when filtering to determine if it's installed

* changelog

* Simplify splitting on the last '.'

* Update lib/ansible/modules/dnf.py
3 years ago
Brian Coca 82bab063e7
service_facts, now more accurate on systemd (#75326)
* service_facts, now more accurate on systemd
3 years ago
Matt Martz 4dca539a29
Expose `unredirected_headers` to `uri` and `get_url` modules (#75308) 3 years ago
Brian Coca 61900c7672
modules moved to use best_parsable_locale (#75250)
* modules moved to use best_parsable_locale

* fixed invocations

* better better

* also module_utils

* converted to function as per fb

* patch testt

* whitespace
3 years ago
Junegunn Choi 8e755707b9
Add 'hash_behaviour' option to include_vars module (#72944) 3 years ago
Matt Clay ce17498ec5
blockinfile - Remove unused code for Ansible 1.x. (#75040) 3 years ago
Matt Clay 5e65d9834b
tempfile - Remove unnecessary conditional. (#75039)
Also add integration tests for 100% code coverage.
3 years ago
Sam Doran afe6eb574e
slurp - improve error code and test coverage (#75038)
* Improve the error handling code

Rather than multiple return paths, have a single return and set the message based
on the type of failure.

* Add another test for non-specific failures

* Reorganize tests so failure tests are in one tasks file

* Remove os.stat() call and add changelog
3 years ago
Sam Doran 4ab791d501
command - remove unreachable code and achieve full test coverage (#75036) 3 years ago
Brian Coca 7d38bb05e4
small note about add_hosts/limit interaction (#74978)
clarifying the scope and applicability

Co-authored-by: Abhijeet Kasurde <akasurde@redhat.com>
Co-authored-by: Sandra McCann <samccann@redhat.com>
3 years ago
Brian Coca 77e936bd50
async_status revert most changes, keep some fixes, undep module (#74931)
* revert most changes, keep some fixes, undep module

  too many corner cases, reverting major changes for controller
  side processing.
3 years ago
Sam Doran a8cf0196f7
subversion - fix stack trace when getting repository information (#74405)
* subversion - set LC_ALL for accurate command output parsing

When LC_ALL is not set, the output language of commands will differ based on locale. There
is a lot of history of trying to fix this. See the following pull requests:

https://github.com/ansible/ansible-modules-core/pull/4358
https://github.com/ansible/ansible-modules-core/pull/4358

This patch attempts to fix this my setting LC_ALL to a UTF-8 locale. Setting LC_ALL to C reintroduces this bug https://github.com/ansible/ansible-modules-core/issues/4178.

I'm sure there are some problems I am not seeing with setting this to en_US.UTF-8, but that is
the only way I could find to fix this bug without reintriducing the bug mentioned above.

* Rather than setting locale, just check for matches before trying to get groups

This is a pragmatic solution to avoid the stack trace since setting the locale correctly
to ensure message parsing is accurate is problematic.

* Improve regexps for finding revision and URL
3 years ago
Daniel Ziegenberg 473df5c13f
fix doc: add possible state 'inactive' (#74928) 3 years ago
Jonathan Kirszling 50e998e303
apt_key: add --recv argument as last one (#74949)
* apt_key: add --recv argument as last one

* Add unit test

* Add the required boilerplate

Co-authored-by: Marius Gedminas <marius@gedmin.as>
3 years ago
Sam Doran 0a5cc80ce2
slurp - handle error when path is a directory (#74930) 3 years ago
Sam Doran 004c33d9c5
unarchive - do not fail in init when trying to find required binary (#74892)
Test for the required binaries in the can_handle_archive() method and fail there. This
prevents failures for missing binaries unrelated to the archive type.

* Update missing zip binary message to match tar message
* Update unit tests
* Add integration tests
* Define packages based on the system rather than ignoring failures
3 years ago
Brian Coca 6840b79e56
bring back async_status module for direct callers
also, deprecate it, they should use action instead
Co-authored-by: Felix Fontein <felix@fontein.de>
3 years ago
Hideki Saito e70fc88656
slurp - better error handling for unreadable files and directories (#68608) 3 years ago
Martin Krizek 4f3ee4624e
Add end_batch meta task (#74899)
* Add end_batch meta task

* Add note

* Fix sanity
3 years ago
Brian Coca 9c718ccc42
Async status rewrite
-  remove need for module (at least for posix side)
  - adds retry with backoff on fetching file, since
    race is bigger since we don't spend time on module
  - now gives more info on fail
  - also made actionfail/skip handle results if given
3 years ago
Abhijeet Kasurde be9f8c69d1
unarchive: Fail when zipinfo is not available (#74632)
Fixes: #39029

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
3 years ago
Jaroslav Mracek d9183b8df5
dnf - replace usage of private attribute with supported API (#73529)
base._update_security_filters is a private attribute of DNF used
as performance optimization. Modification or even call from outside
of DNF is against all recommendation including PEP8.

* Improve compatibility with all DNF versions

* Add changelog fragment for dnf security change
3 years ago
Therry van Neerven 35a2345809
Fixed typo in yum package (#72964)
* yum: Fixed typo in failure message: nevra --> envra
* Added changelog fragment
3 years ago
Abhijeet Kasurde 148d4f6248
hostname: Add support for RedOS (#74844)
Fixes: #74779

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
3 years ago
geliwei 138b3b6851
hostname: add support for Anolis distro (#74829)
project website https://openanolis.org/

Signed-off-by: Liwei Ge <geliwei@openanolis.org>
3 years ago
Alexander Sowitzki 774e563452 Use get_file_lines in hostname module 3 years ago
Alexander Sowitzki 502270c804 hostname: clean up strategies
Apply #74744 and #69929 to #70828
3 years ago