* Only remove crontabs if they are empty
(cherry picked from commit fefda12827)
* Add integration test to ensure system cron tab doesn't get removed. Increase cron integration tests separation.
(cherry picked from commit 1e37fa86b4)
* Also detect crontab which only contains whitespace as empty.
(cherry picked from commit 4b69c8f501)
* cron integration test: Adjust system crontab path to be distribution specific.
(cherry picked from commit 70be3730db)
* Add changelog fragment for #74497.
(cherry picked from commit c606b50a3d)
Co-authored-by: Fabian Klemp <fabian.klemp@elara-gmbh.de>
* Map Debian 8 to Python 2
If Python 3 is installed on Debian 8 Ansible cannot run, as the version
is too old (3.4)
* Add integration test for python interpreter discovery on Debian 8
* fix test issue on Debian 9, add changelog
* un"fix" not broken test :D
Co-authored-by: Fabian Klemp <fabian.klemp@elara-gmbh.de>
Co-authored-by: Matt Davis <mrd@redhat.com>
(cherry picked from commit 437a08eb6d)
Co-authored-by: elara-leitstellentechnik <elara-leitstellentechnik@users.noreply.github.com>
Homebrew's default install location for macOS on ARM is /opt/homebrew.
Source: https://docs.brew.sh/FAQ
On a Mac M1 (Apple Silicon), homebrew will be installed at
/opt/homebrew/bin/brew.
Change:
- Newer Solaris drops setfacl. Add a fallback for its chmod ACL syntax.
Test Plan:
- New units
Tickets:
- Fixes#74282
Signed-off-by: Rick Elrod <rick@elrod.me>
Change:
- Regression introduced in #70785
- When macOS chmod ACL syntax is used, Solaris-derived chmods return
with a status of 5. This is also used for our sshpass handling,
because sshpass will return 5 on auth failure. This means on Solaris,
we incorrectly assume auth failure when we reach this branch of logic
and try to run chmod with macOS syntax.
- We now wrap this specific use of chmod in an exception handler that
looks for AnsibleAuthenticationFailure and skips over it. This adds
another authentication attempt (something we normally avoid to prevent
account lockout), but seems better than the regression of not allowing
other fallbacks to be used.
- Without this patch, if setfacl fails on Solaris (and sshpass is used),
we do not try common_remote_group or world-readable tmpdir fallbacks.
Test Plan:
- New unit
Signed-off-by: Rick Elrod <rick@elrod.me>
also added general note on how defaults work.
Co-authored-by: Abhijeet Kasurde <akasurde@redhat.com>
Co-authored-by: Sam Doran <sdoran@redhat.com>
(cherry picked from commit 30912b6a47)
On some systems, curses.tigetstr() returns None, which does not work as a control character.
* Add unit tests
* Sort imports
* Skip on older Python
This is an action plugin and only runs on the controller, so no need to test of Python 2. Making
the import hackery work on Python 2 would required some more work which I am not sure is
worth it since we are moving away from Python 2 support on the controller.
* Make the tests work on Python 2 and 3
(cherry picked from commit 55b401a3e7)
Co-authored-by: Sam Doran <sdoran@redhat.com>
The distutils module is not shipped with SUNWPython on Solaris.
It's in the SUNWPython-devel package. Do not use LooseVersion.
Fixes: #74488
(cherry picked from commit 4d7dc15d4e)
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
* support separate role argspec file in ansible-core
* support both .yml and .yaml extensions on argspec file in ansible-doc
* fix filename building bug and rename some argspec files to test variations
* use yaml extensions from constants
* add superfluous meta/main.yml files to tests
* Update lib/ansible/cli/doc.py
* update docs
* add changelog and allow for main.yml variations
* add collection role testing
Co-authored-by: Sam Doran <sdoran@redhat.com>
(cherry picked from commit 8fb54885bf)
From the sha512sum man page:
... The default mode is to print a line with checksum, a character indicating type ('*' for binary, ' ' for text), and name for each FILE.
(cherry picked from commit 403a5d147d)
* Add constraint for MarkupSafe
MarkupSafe >= 2.0.0 requires Python >= 3.6.0. Add a constraint for older Python versions
and fix the `groupby_filter` test.
* Fix template_jinja2_latest test.
* patch filter decorators on newer Jinja2
* Jinja2 >= 3.0 renames several filter decorators used by Ansible itself, as well as by filters in collections. This patch ensures that the old names are usable within Ansible and by collections without warnings or errors.
* Ignore docs-build issues.
Co-authored-by: Matt Clay <matt@mystile.com>
Co-authored-by: Matt Davis <mrd@redhat.com>.
(cherry picked from commit f99d024851)
Co-authored-by: Sam Doran <sdoran@redhat.com>
* Change Shippable refs in docs to Azure Pipelines.
(cherry picked from commit 8bd599d048)
* Update cli_parsing.rst (#74555)
Bad indent in an example
(cherry picked from commit dcb807dea7)
* systemd doc update (#74442)
Document that systemd module manages units (timers, services, ...) and not only service. (#74442)
Co-authored-by: Abhijeet Kasurde <akasurde@redhat.com>
Co-authored-by: Brian Coca <bcoca@users.noreply.github.com>
(cherry picked from commit 74647a1314)
* Update the module lifecycle document to also cover plugins and collections (#74413)
Co-authored-by: Abhijeet Kasurde <akasurde@redhat.com>
(cherry picked from commit a6cc508822)
* Docs: communication.rst - add ansible-community to the IRC channel list (#74570)
(cherry picked from commit 5463cbb841)
* adhoc clarify help (#74616)
also added comments to code
(cherry picked from commit 7f7d3067e3)
* update docs copyright (#74643)
(cherry picked from commit 7195367635)
* docs: Add a note about `crypt` (#74640)
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
(cherry picked from commit 79e12ba98e)
Co-authored-by: Matt Clay <matt@mystile.com>
Co-authored-by: Joseph Jacobs <joej164@gmail.com>
Co-authored-by: Baptiste Mille-Mathias <baptiste.millemathias@gmail.com>
Co-authored-by: Felix Fontein <felix@fontein.de>
Co-authored-by: Andrew Klychkov <aklychko@redhat.com>
Co-authored-by: Brian Coca <bcoca@users.noreply.github.com>
Co-authored-by: Abhijeet Kasurde <akasurde@redhat.com>
* AWS: update reference to auto-retrying ResourceNotFound (#72314)
AWS Dev Guidelines: update reference to auto-retrying ResourceNotFound
Co-authored-by: Abhijeet Kasurde <akasurde@redhat.com>
(cherry picked from commit c387b318a6)
* docs: Improve documentation for regex_search,replace,findall (#74368)
Improve the documentation for regex_search by adding a few more
realistic examples such as showing how to extract only parts of a
string by using regex groups.
Extend regex_findall and regex_replace by an example that includes
the multiline and ignorecase parameters.
(cherry picked from commit f194108a26)
* Improve a documentation of the first_found lookup plugin (#73080)
Co-authored-by: Wojciech Ściesiński <wojciech.sciesinski@huuugegames.com>
(cherry picked from commit f40ab25909)
* Update the porting guide for a new ansible version (#74490)
(cherry picked from commit 112b175f17)
* setup: Add note and example of delegated facts (#74479)
* Added a note about 'delegated_facts'
* Added an example of 'delegated_facts'
Fixes: #67067
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
(cherry picked from commit 7b03ebf939)
* command - add command name to warning (#74475)
(cherry picked from commit 9e61952cdc)
* update backporting instructions to reflect new latest stable branch, some edits (#74512)
Co-authored-by: Alicia Cozine <acozine@users.noreply.github.com>
(cherry picked from commit b765d3799b)
Co-authored-by: Mark Chappell <mchappel@redhat.com>
Co-authored-by: Christian Fetzer <christian.fetzer@bmw.de>
Co-authored-by: Wojciech Sciesinski <it-praktyk@users.noreply.github.com>
Co-authored-by: Toshio Kuratomi <a.badger@gmail.com>
Co-authored-by: Abhijeet Kasurde <akasurde@redhat.com>
Co-authored-by: Alicia Cozine <879121+acozine@users.noreply.github.com>
For connection units tests, if the `__init__.py` file is modified, the trailing separator was
not added, making the target invalid.
(cherry picked from commit 7b79b69369)
Co-authored-by: Sam Doran <sdoran@redhat.com>
* Update distro test containers to version 2.0.2.
* Update the default test containers.
(cherry picked from commit 459ea5a4a4)
Co-authored-by: Matt Clay <mclay@redhat.com>
* --offline allows in-place verify for installed collections with manifests
* manifest hash, collection name, version, and path are now always displayed
* test updates