Commit graph

51609 commits

Author SHA1 Message Date
Sloane Hertel
9cfedcd9c9
Add changelog for ansible-galaxy improvements (#74738)
Changelog for #74240
2021-05-17 16:31:13 -04:00
Brian Coca
5333e4138c
note about adhoc delegate_to hosts (#74687)
* Update docs/docsite/rst/user_guide/playbooks_delegation.rst
2021-05-17 13:24:26 -05:00
Matt Clay
ce04056797 Expand delegation options for coverage commands. 2021-05-17 10:37:42 -07:00
Jordan Borean
e875e91363
ansible-test - use pwsh to generate stubs (#74271) 2021-05-17 10:00:06 -07:00
Sam Doran
d8e6f21d9f
ini lookup - add case sensitive option (#74630)
* Add tests for case-sensitive option
* Run all test playbooks from a single file
2021-05-17 11:41:23 -04:00
Abhijeet Kasurde
2f87b8760d
docs: Add a note about ansible_date_time (#74636)
* For long-running playbooks, discourage users from using
`ansible_date_time`. Use `pipe` or `now` as an alternative.

* Review comments

Fixes: #22561

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
Co-authored-by: Alicia Cozine <879121+acozine@users.noreply.github.com>
2021-05-15 10:13:05 +05:30
Lydie
bf9944266c
Issue 73792: Removed mentions of R() and M() (#74708)
* 73792: Removed mentions of R and M
2021-05-14 14:48:21 -05:00
Sam Doran
8d3dce49bf Remove incidental_setup_rabbitmq integration test
All tests using this have been removed.
2021-05-14 12:31:18 -07:00
Abhijeet Kasurde
39df263f1a
intro: Add a note about current user (#74638)
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2021-05-14 11:41:35 -04:00
m0nt3cr1st0
25de07946c
Fix typo on roles documentation (#74696)
##### SUMMARY
Small fix on the roles directory structure documentation

##### ISSUE TYPE
- Docs Pull Request

+label: docsite_pr
2021-05-14 11:40:00 -04:00
Kelly Brazil
91212b2008
Add JC filter plugin example (#74563)
Co-authored-by: Abhijeet Kasurde <akasurde@redhat.com>
2021-05-14 11:37:29 -04:00
Jill R
fa15d35cb1
Update AWS guides with new SDK and Python requirements (#74585)
The 2.0 collection releases will introduce new Python requirements
and a new SDK support policy
2021-05-14 11:35:45 -04:00
Brian Coca
173d0a8de7
Skip interpreter discovery for network OSs(#74012)
skip python interpreter discovery on network os being set as this indicates a 'forced local' module and should use sys.executable.
2021-05-14 10:19:55 -04:00
David Shrewsbury
51b5659598
replace - better handling of file exceptions (#74686) 2021-05-13 17:00:22 -04:00
Sloane Hertel
bab7acb1ad
update cron test added in #74497 for /etc/crontab (#74689) 2021-05-13 16:58:46 -04:00
Brian Coca
35281e54d9
fix config to match doc split (#74665) 2021-05-14 05:20:32 +10:00
elara-leitstellentechnik
c6ac9de67b
Do not remove non-empty cron tabs (#74497)
* Only remove crontabs if they are empty

* Add integration test to ensure system cron tab doesn't get removed. Increase cron integration tests separation.
* Also detect crontab which only contains whitespace as empty.
* cron integration test: Adjust system crontab path to be distribution specific.

Co-authored-by: Fabian Klemp <fabian.klemp@elara-gmbh.de>
2021-05-13 13:38:13 -04:00
Mark Mercado
1906d75907
Adding DigitalOcean cloud support to ansible-test (#74222) 2021-05-12 16:07:21 -07:00
Matt Martz
d6e28e6859
Update vendored copy of six to 1.16.0 (#74680)
* Update to six 1.16.0

* Address linting issues

* Remove six find_spex/exec_module warning filters

* Remove unnecessary comment about Py2.6, 2.13 will not support Py2.6, and we're bumping this for 2.12

* ci_complete

* Add changelog fragment
2021-05-12 16:26:48 -05:00
Sam Doran
0affe4d027
ini lookup - catch and handle duplicate key and missing section errors (#74629)
* Remove unused import
* Add integration tests for errors
* Cleanup formatting on existing tests
* Add changelog
2021-05-12 16:57:02 -04:00
Alicia Cozine
829c9c3d46 updates jinja filters links with new pattern for Jinja 3.x documentation 2021-05-12 10:08:00 -07:00
Alicia Cozine
8c34eaa69f Jinja intersphinx should point at 3.0; other updates 2021-05-12 10:08:00 -07:00
Sam Doran
f99d024851
CI and compat fixes for Jinja2 >= 3.0 (#74666)
* 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>
2021-05-11 19:59:44 -07:00
Toshio Kuratomi
8f2c0e0574
Update the porting guide for ansible-3.4.0 (#74664) 2021-05-11 16:14:29 -05:00
Abhijeet Kasurde
1006363589
basic: Skip over module parameters (#74559)
While logging, journal.send accepts module parameters.
If module parameters similar to arguments in journal.send,
rename the parameter names before sending to journal.send

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2021-05-11 15:05:56 -04:00
Brian Coca
2c93b22043
use self.host which will always be updated (#74574)
* use self.host which will always be updated

  pc remote_addr is not correctly updated in all cases
2021-05-11 14:49:56 -04:00
Matt Martz
8d1cf7f266
Vendor distutils.version (#74644)
* Vendor distutils.version

* Fix import order. ci_complete

* remove distutils warning filter

* Don't remove warnings filter from importer

* ci_complete

* Add pylint config for preventing distutils.version

* Add changelog fragment
2021-05-11 12:33:51 -05:00
Abhijeet Kasurde
79e12ba98e
docs: Add a note about crypt (#74640)
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2021-05-11 11:39:08 -04:00
Brian Coca
ddaa539ab1
Better handling of rstisms in ansible-doc (#74596)
* Better handling of rstisms

  replace tags more intelligently to make things more readable
  unit tests + minor adjustments
2021-05-11 11:31:20 -04:00
Felix Fontein
60a03a0f87
Add missing 'why:' to 'deprecated:'. (#74639) 2021-05-11 17:19:59 +02:00
Sandra McCann
7195367635
update docs copyright (#74643) 2021-05-11 10:16:27 -05:00
Sloane Hertel
cf11c38caf
Exclude unreachable hosts in ansible_play_batch between plays (#74625)
ci_complete
2021-05-11 17:12:34 +02:00
Shane St Savage
df6554c4ec
fix: action _fixup_perms2 macos +a remote_paths in list() as it can be a tuple (#74613)
* fix: action _fixup_perms2 macos +a remote_paths in list() as it can be tuple

in `lib/ansible/plugin/action/__init__.py`'s `_fixup_perms2`,
`remote_paths` can be a list or tuple. however, the macos
specific attempt to use chmod +a attempts to concatenate
`remote_paths` with a list, which will fail if it is a tuple.
wrapping `remote_paths` in `list()` fixes this error.

* Update changelogs/fragments/74613-actionfixup_perms2_macos_remote_paths_ensure_list.yml

Co-authored-by: Rick Elrod <rick@elrod.me>
2021-05-11 17:08:33 +02:00
David Shrewsbury
8fb54885bf
Role argspec: allow new argument spec file (#74582)
* support separate role argspec file in ansible-doc

* 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

Co-authored-by: Sam Doran <sdoran@redhat.com>

* update docs

* ci_complete

* add changelog and allow for main.yml variations

* add collection role testing

Co-authored-by: Sam Doran <sdoran@redhat.com>
2021-05-11 09:29:47 -05:00
Matt Clay
f6c292d210 Remove unused CI scripts. 2021-05-10 19:47:31 -07:00
Matt Clay
d244e47822
Update Python versions for controller-only tests. (#74652)
* Update Python versions for controller-only tests.

Both `ansible-galaxy` and `ansible-test` integration tests only run on the controller.

* Use a venv to make requirements available.
2021-05-10 18:25:53 -07:00
Matt Clay
7b0c4845d9 Remove PyYAML warning filter in import test.
The filter is obsolete now that PyYAML imports go through our compat layer.
2021-05-10 16:57:45 -07:00
Matt Clay
bdffb59978
Update Python versions used to run network tests. (#74647) 2021-05-10 15:06:09 -07:00
Matt Clay
d85809d592 Update Python versions used to run Windows tests. 2021-05-10 10:30:41 -07:00
Brian Coca
7f7d3067e3
adhoc clarify help (#74616)
also added comments to code
2021-05-10 13:28:59 -04:00
Sloane Hertel
ee725846f0
ansible-galaxy - increase page size and add retry decorator for throttling (#74240)
* Get available collection versions with page_size=100 for v2 and limit=100 for v3

* Update unit tests for larger page sizes

* Add a generic retry decorator in module_utils/api.py that accepts an Iterable of delays and a callable to determine if an exception inheriting from Exception should be retried

* Use the new decorator to handle Galaxy API rate limiting

* Add unit tests for new retry decorator

* Preserve the decorated function's metadata with functools.wraps

Co-authored-by: Matt Martz <matt@sivel.net>
Co-authored-by: Sviatoslav Sydorenko <wk.cvs.github@sydorenko.org.ua>
2021-05-10 13:26:41 -04:00
Matt Clay
51fd05e76b Add support for testing with Python 3.10. 2021-05-10 08:23:15 -07:00
Matt Clay
bcb64054ed
Another unit test fix for Python 3.10. (#74628)
* Another unit test fix for Python 3.10.
* Add missing __init__.py file.
2021-05-07 17:26:41 -07:00
Matt Clay
d4413dac08 Fix unit tests on Python 3.10. 2021-05-07 16:56:30 -07:00
Ruediger Pluem
2f7e0b8489
user - consistently create user home directory on Linux (#71952)
Always use create_homedir when we are asked to create a home directory
in the User class. Don't use the -m and -k parameters from
useradd / luseradd as they behave differently with respect to
preexisting home directories. Instead always specify -M to ensure
that useradd / luseradd do not try to create the home directory.

This does not change potential different behaviours in child classes
of the User class.

Consider the new umask option from #73821 in create_homedir as well as
we do not let luseradd / useradd create the home directory any longer.
2021-05-07 17:00:10 -04:00
Matt Clay
2e97240c67 Ignore more Python 3.10 warnings in import test. 2021-05-07 11:19:22 -07:00
Sloane Hertel
69f3447b6b
Remove 'default:' from config settings (#74607) 2021-05-07 10:31:32 -04:00
René Moser
403a5d147d
modules: get_url: Fix checksum binary validation (#74502)
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.
2021-05-07 10:29:22 -04:00
Abhijeet Kasurde
4d7dc15d4e
service - compare version without LooseVersion (#74508)
The distutils module is not shipped with SUNWPython on Solaris.
It's in the SUNWPython-devel package. Do not use LooseVersion.

Fixes: #74488

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2021-05-07 10:22:00 -04:00
Jordan Borean
a277644301
Add python 3.10 constraint for pyspnego (#74612) 2021-05-06 23:53:50 -07:00