Commit Graph

51396 Commits (f752c7f179e3090d794ec09d4d6c544548897c4b)
 

Author SHA1 Message Date
David Shrewsbury f752c7f179
role argspec - tag role argspec validation task with 'always' (#74994) (#74996)
* update tag docs

(cherry picked from commit 97acb0f470)
3 years ago
Brian Coca dce10b89ad
Ssh opts fix (#74972)
(cherry picked from commit 675df166c2)
3 years ago
Sloane Hertel 7448c2fa62
[2.11] Fix using module-specific module_defaults in action plugins (#74849)
* Use the module redirect_list when getting defaults for action plugins (#73864)

* Fix module-specific defaults in the gather_facts, package, and service action plugins.

* Handle ansible.legacy actions better in get_action_args_with_defaults

* Add tests for each action plugin

* Changelog

Fixes #72918

(cherry picked from commit 5640093f1c)

* Fix tests for < 3.8
3 years ago
Sam Doran bf6f277edd
[stable-2.11] slurp - handle error when path is a directory (#74930). (#74964)
(cherry picked from commit 0a5cc80ce2)

Co-authored-by: Sam Doran <sdoran@redhat.com>
3 years ago
Sam Doran fad56bd4e6
[stable-2.11] subversion - fix stack trace when getting repository information (#74405) (#74977)
* 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
(cherry picked from commit a8cf0196f7)

Co-authored-by: Sam Doran <sdoran@redhat.com>
3 years ago
Hideki Saito f92f039ea7
[2.11] Fix slurp error handling for unreadable files and directories (#74915)
- Fixes #67340
- Backport PR for #68608

Signed-off-by: Hideki Saito <saito@fgrep.org>
3 years ago
Martin Krizek 13e5c64918
Apply display_failed_stderr on loop item results (#74865) (#74898)
(cherry picked from commit 01ab6c6ec7)
3 years ago
Felix Fontein 25ac505975
Basic: don't call lstat when check_mode (#64279) (#74883)
While mode is specified in check_mode, don't call lstat.
Since file may not present.

Fixes: #61185
(cherry picked from commit 7099657dd7)

Co-authored-by: Logistic Bot <logistic-bot@protonmail.com>
3 years ago
Andrew Klychkov 93de61a8da
Due to the takeover of freenode we're moving to a different irc network. (#74775) (#74968)
* Updates our channels to point at the same channel name on libera.chat
* Links that used to point to webchat.freenode.net now point to https://libera.chat
* Removes http://irc.freenode.net from the linkcheck exceptions.
* Updates docs/docsite/rst/dev_guide/developing_modules_in_groups.rst

(cherry picked from commit 80e7e1a17c)

Co-authored-by: John R Barker <john@johnrbarker.com>
Co-authored-by: Felix Fontein <felix@fontein.de>
Co-authored-by: Toshio Kuratomi <a.badger@gmail.com>
3 years ago
Jordan Borean dad721d9dc
psrp - Fix reset connection on failed scenarios (#74967) (#74984)
Co-authored-by: Abhijeet Kasurde <akasurde@redhat.com>

(cherry picked from commit cf3a304ce1)
3 years ago
David Shrewsbury a16dd1150e
ansible-pull - update help info for --directory option (#74936) (#74993)
* Update -d help info for ansible-pull

* fix pep8

(cherry picked from commit 6539c59857)
3 years ago
Brian Coca 03aff644cc
fix unsafe preservation across newlines (#74960) (#74973)
CVE-2021-3583
  ensure we always have unsafe

Co-authored-by: Rick Elrod <rick@elrod.me>
(cherry picked from commit 4c8c40fd3d)
4 years ago
Sam Doran 578fa17af5
[stable-2.11] version test - improve message when value is empty (#74754) (#74789)
When an empty value is provided, no `version` attribute will exist on the `LooseVersion` or
`StrictVersion` object. We catch and handle this, but it's not immediatebly clear that an
AttributeError means an empty value was provided.

Specifically handle the case where value or version are empty and add more
helpful error messages.

Add integration tests.
(cherry picked from commit 71e33d2578)

Co-authored-by: Sam Doran <sdoran@redhat.com>
4 years ago
Brian Coca 46378f0086
avoid literal quoting in config lists (#74740) (#74773)
* avoid literal quoting in config lists (#74740)
* added tests
(cherry picked from commit d2d1f01f9d)
4 years ago
Felix Fontein b2808ed147
Fix name of subkey. (#74939) (#74966)
(cherry picked from commit 81ad125aa6)
4 years ago
Yanis Guenane 8b8996cb36
Localization: Import first set of translated files (#74954)
* Localization: Import first set of translated files

(cherry picked from commit d45c2cec55)

* Ignore smart quotes in the dev guide translation.

The smart quotes are in the warning message to not use smart quotes.

(cherry picked from commit 3f694e9f02)

Co-authored-by: Toshio Kuratomi <a.badger@gmail.com>
4 years ago
Felix Fontein 9627912180
Update inventory script references from c.g to ansible-community/contrib-scripts. (#74905) (#74926)
(cherry picked from commit acf09e56a2)
4 years ago
Alicia Cozine 56ab8508d0
adds banner for GalaxyNG survey (#74889) (#74906)
* adds banner for GalaxyNG survey (#74889)

(cherry picked from commit 62fc4ad8da)

* gives each banner a unique div ID (#74907)

(cherry picked from commit 33924d7e8d)
4 years ago
Abhijeet Kasurde 13a829af2b
[bp-2.11] Fix small typo in playbook_filters doc (#74763)
Move versionadded to next line to render correctly.

(cherry picked from commit 888fea69e5)

Co-authored-by: Chander G <mail@chandergovind.org>
4 years ago
Felix Fontein 8d6a8583c9
Improve and extend changelog logs (#74106) (#74753)
Co-authored-by: Andrew Klychkov <aaklychkov@mail.ru>
Co-authored-by: Abhijeet Kasurde <akasurde@redhat.com>
(cherry picked from commit 4bf420706b)
4 years ago
Abhijeet Kasurde 6f126a8d08
[bp-2.11] Update example and description of git:single_branch (#74832)
(cherry picked from commit b63512774b)

Co-authored-by: Daniel Chabrowski <dantezstudio@gmail.com>
4 years ago
Abhijeet Kasurde 6987150d40
[bp-2.11] filters: Add a note about seed (#74874)
While using ``seed`` parameter of the 'random' filter, behavior changes between Python 2 and Python 3.
Added a note about this in the documentation.
Fixes: #63784

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>

Co-authored-by: Sandra McCann <samccann@redhat.com>
Co-authored-by: Alicia Cozine <879121+acozine@users.noreply.github.com>
4 years ago
Alicia Cozine ee38c4244b
remove package porting guides from stable branch, point to devel (#74890)
Co-authored-by: Alicia Cozine <acozine@users.noreply.github.com>
4 years ago
Rick Elrod 4ceaefc240 Update Ansible release version to v2.11.1.post0. 4 years ago
Rick Elrod f468ec7087 New release v2.11.1 4 years ago
Sandra McCann 84707c60a4
updates list of available versions for Ansible 3 (#74265) (#74757)
* updates list of available versions for Ansible 3 (#74265)

(cherry picked from commit 126e9244c2)

* update conf.py (#74751)

(cherry picked from commit cd8e3a2208)

Co-authored-by: Alicia Cozine <879121+acozine@users.noreply.github.com>
4 years ago
Sandra McCann bbca98f622
Set the version to 4 (#74755) 4 years ago
Rick Elrod 15ae85269f Update Ansible release version to v2.11.1rc1.post0. 4 years ago
Rick Elrod d24f793ab1 New release v2.11.1rc1 4 years ago
Sloane Hertel 892f0bf644
Add changelog for ansible-galaxy improvements (#74738) (#74739)
Changelog for #74240

(cherry picked from commit 9cfedcd9c9)
4 years ago
Brian Coca b5f13e5f28
Fix world readable setting (#74324) (#74418)
now uses shell option in all cases, the old constant still exists
as 'documentation' but it not settable.
also fix the docsite link in warnings/errors

import cleanup

(cherry picked from commit d8fa2b50d5)
4 years ago
Brian Coca ed456f25f6
restores delegated vars that were not passed (#74371)
* restores delegatd vars that were not passed

   this will restore delegate display on callbacks using the vars
   also moves to use delegate_to directly on the default callback

* clog

(cherry picked from commit cbc83545582d8d7a718140263c465129e0e535d9)
4 years ago
Brian Coca 00d5a1610f
Fix pb subs collapse (#74301) (#74376)
* fix subdir parsing for plays

  fixes #74283

  Co-authored-by: Nikolaos Kakouros <nkak@kth.se>

(cherry picked from commit 6418f368e3)
4 years ago
elara-leitstellentechnik 22adad0f19
[2.11] Do not remove non-empty cron tabs (#74698)
* 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>
4 years ago
Matt Davis 3d6c8ee3e0
Map Debian 8 to Python 2 (#74152) (#74359)
* 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>
4 years ago
Fernando Correia 5ee1fe2665
Detect Homebrew on Mac M1 (Apple Silicon) (#74378) (#74401)
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.
4 years ago
Maxim Masiutin 71fc9ec393
[bp-2.11]: apt_key - Binary GnuPG keys downloaded via URL were corrupted (#74522)
* Binary GnuPG keys downloaded via URLs by the 'ansible.builtin.apt_key' module were corrupted so 'gpg' could not import them (https://github.com/ansible/ansible/issues/74424)
(cherry picked from commit 0375070871)
(cherry picked from commit 4cc80ef9c9)
4 years ago
Martin Krizek 5b0a3ac43d
Actually run blocks/finalized_task test (#74291) (#74312)
(cherry picked from commit 7fecb7ccc3)
4 years ago
Brian Coca 85b4c70172 defend against bad or missing crypt (#74304)
* defend against bad or missing crypt

  fixes #74279

(cherry picked from commit 4494ef3a9d)
4 years ago
Brian Coca 46b67b74c7 removed unused imports (#74299)
(cherry picked from commit e3eeb88f7c)
4 years ago
Rick Elrod 02d07dcace [become] Add Solaris chmod ACL fallback
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>
4 years ago
Rick Elrod 341834fe70 [become] Fix solaris permissions regression
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>
4 years ago
Martin Krizek 2c9389b193
Prevent ansible_failed_task from further templating (#74290) (#74308)
Fixes #74036

* Add changelog

(cherry picked from commit 664531d7d6)
4 years ago
Brian Coca a81386fa62
fix config manager list loption with choices (#74267) (#74298)
fixes #74225

  Co-authored-by: Kim Nørring <github@norring.dk>

(cherry picked from commit b91749d671)
4 years ago
Maxim Masiutin 3aab644285
The error message about the failure to import a 'gpg' key by the 'ansible.builtin.apt_key' module was incorrect (https://github.com/ansible/ansible/issues/74423) (#74521)
Co-authored-by: Sam Doran <sdoran@redhat.com>
(cherry picked from commit e4d7fc9745)
4 years ago
Rick Elrod 3d4d43a1ce
[incidental_setup_rabbitmq] [2.11] Remove main (#74728)
Change:
- This file got missed in bcd7b61c03 /
  #74715 somehow.

Test Plan:
- If CI passes, it worked.

Signed-off-by: Rick Elrod <rick@elrod.me>
4 years ago
Rick Elrod a9b7625151
Makefile: Allow one to specify python version (#74517) (#74528)
Change:
- Allow overriding python version as env var for Makefile
- Including hacking directory in git export, for docs build

Test Plan:
- Tested as part of recent downstream work

Co-authored-by: Yanis Guenane <yguenane@gmail.com>
4 years ago
Sam Doran dd7118c433
[stable-2.11] hostname - add Rocky Linux support (#74545) (#74560)
(cherry picked from commit 2d41e5f99a)

Co-authored-by: Louis Abel <nazunalika@users.noreply.github.com>
4 years ago
Sam Doran ebf7233e35
[stable-2.11] facts - set correct OS family for Rocky Linux (#74530) (#74561)
(cherry picked from commit d101009688)

Co-authored-by: Ruairidh MacLeod <ruairidh@rkm.dev>
4 years ago
Brian Coca 45618a6f38
dont specify default for port, allow ssh/config (#74526) (#74562)
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)
4 years ago