Commit graph

51609 commits

Author SHA1 Message Date
Matt Clay
e6d7aecbe4
Reorganize more ansible-test code. (#74611)
* Split out shell command.
* Relocate ansible-test integration code.
2021-05-06 17:59:07 -07:00
Matt Clay
065fc3ca17 Remove check for legacy core and extras dirs. 2021-05-06 17:58:25 -07:00
Matt Clay
5487e9e4fd Update runtime-metadata sanity test for Python 3.10. 2021-05-06 15:12:06 -07:00
Brian Coca
8cccabf1eb
cron: removal of deprecations and minor fix (#73591)
* removal of deprecations and minor fix

  name or cron_file is required.
  reboot was removed.
  updated docs to clarify usage.
  now using cron_file=/etc/crontab is an error

  fixes #37355
2021-05-06 18:05:06 -04:00
Matt Clay
cbac26e500 Update import sanity test for Python 3.10. 2021-05-06 14:55:41 -07:00
Matt Clay
2c3a3bdd9c Update pylint sanity test to work on Python 3.10. 2021-05-06 14:46:12 -07:00
Matt Clay
c2e15f45a6 Update ansible-test compile sanity test.
The test has been rewritten to improve error handling and add support for Python 3.10.
2021-05-06 13:51:45 -07:00
Brian Coca
35ff4ea95b
warn on walking through pathing issues (#74514)
* warn show pathing issues when wallking through provided paths

  moved issues from msg to actual warnings AND a specific return field

  fixes #25314

Co-authored-by: Sam Doran <sdoran@redhat.com>
2021-05-06 16:14:33 -04:00
Andrew Klychkov
5463cbb841
Docs: communication.rst - add ansible-community to the IRC channel list (#74570) 2021-05-06 15:10:53 -04:00
Sam Doran
55b401a3e7
pause - ensure control characters are always set appropriately (#74568)
* pause - ensure control characters are always set appropriately

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
2021-05-06 15:09:26 -04:00
Felix Fontein
a6cc508822
Update the module lifecycle document to also cover plugins and collections (#74413)
Co-authored-by: Abhijeet Kasurde <akasurde@redhat.com>
2021-05-06 10:16:43 -04:00
Baptiste Mille-Mathias
74647a1314
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>
2021-05-06 09:49:42 +05:30
Joseph Jacobs
dcb807dea7
Update cli_parsing.rst (#74555)
Bad indent in an example
2021-05-06 09:34:07 +05:30
Matt Clay
07fb6f7547 Fix imports for the previous commit.
Also add a changelog entry.
2021-05-05 18:56:29 -07:00
Matt Clay
92c40f6365 Relocate change classification files. 2021-05-05 18:56:29 -07:00
Matt Clay
5dfc7ee078 Remove Shippable CI provider from ansible-test. 2021-05-05 17:42:13 -07:00
Matt Clay
8bd599d048 Change Shippable refs in docs to Azure Pipelines. 2021-05-05 17:21:48 -07:00
Matt Clay
c48f80d062 Rename hacking/shippable to hacking/azp.
References to Shippable were changed to Azure Pipelines.

Also remove rebalance.py as it does not work with Azure Pipelines due to the required data not being present.
2021-05-05 17:21:14 -07:00
Matt Clay
df2ae06d46 Fix ansible-test imports and paths after refactor.
Also include a changelog entry covering this commit and the previous.
2021-05-05 16:20:15 -07:00
Matt Clay
bb3904d299 Reorganize command implementations.
This commit only renames existing files.

Changes to adapt imports will occur in a follow-up commit.
2021-05-05 16:20:15 -07:00
Sloane Hertel
aea0c4dd1b
Fix inventory cache prefix typos (#74523)
* Fix section for inventory cache prefix

* Redirect general config inventory cache options to inventory plugin documentation

* Update the template to fix the docs-build error

* removes 'default' entries for config settings with default: ''

* single backticks => italics, double backticks => code

* use 'Default: ~' to match other entries that have no default setting

Co-authored-by: Alicia Cozine <acozine@users.noreply.github.com>
2021-05-05 13:27:40 -04:00
Abhijeet Kasurde
38dd49eb00
ansible-inventory: Handle exception in toml parsing (#74486)
Handle stacktrace raise while parsing inventory in toml format

Fixes: #74404

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2021-05-05 14:12:52 +05:30
Matt Clay
68e9e1c999
Switch incidental OS X tests to macOS. (#74564)
* Switch incidental OS X tests to macOS.
* Rename incidental osx.sh to macos.sh.
2021-05-04 11:46:46 -07:00
Miro Hrončok
728b52a6ff
Use /usr/bin/python3 on rhelish 9+ (#74547)
The /usr/libexec/platform-python symbolic link is just a backwards compatibility shim there.

See ce226d00fa
2021-05-04 12:48:16 -04:00
Abhijeet Kasurde
4627c30b2e
interpreter_discovery: Hide warning in auto_silent (#74509)
Hide warning "No python interpreters" in auto_silent mode.

Fixes: #74274

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2021-05-04 12:01:49 -04:00
Rick Elrod
b0389c7f11
[cli] remove superfluous trailing space from help (#74551)
Change:
- After we output the newline in help text, we also added a space. This
  caused either a space to show up before the shell prompt (in shells
  like bash), or " %" and a newline before the next prompt on shells
  like zsh that automatically force commands to end with a newline.
- This change removes the extra space, so that peace can be restored in
  the minds of many.
- This only showed up when running commands with no arguments or invalid
  arguments.

Test Plan:
- Ran `ansible`, `ansible -h`, `ansible-playbook`, `ansible-galaxy`, and
  `ansible-galaxy -h`.

Tickets:
- Introduced in #69458

Signed-off-by: Rick Elrod <rick@elrod.me>
2021-05-04 11:42:17 -04:00
David Shrewsbury
c6fda9fc1a
[coverage] improve test coverage for together lookup (#74549) 2021-05-04 11:41:22 -04:00
David Shrewsbury
4f0a9488bb
[coverage] improve test coverage for indexed_items lookup (#74548) 2021-05-04 11:41:02 -04:00
David Shrewsbury
244bf9c640
[coverage] improve test coverage for vars lookup (#74546) 2021-05-04 11:39:04 -04:00
Brian Coca
30912b6a47
dont specify default for port, allow ssh/config (#74526)
* dont specify default for port, allow ssh/config

 also added general note on how defaults work.

Co-authored-by: Abhijeet Kasurde <akasurde@redhat.com>
Co-authored-by: Sam Doran <sdoran@redhat.com>
2021-05-04 11:09:05 -04:00
Ruairidh MacLeod
d101009688
facts - set correct OS family for Rocky Linux (#74530) 2021-05-04 10:14:13 -04:00
Louis Abel
2d41e5f99a
hostname - add Rocky Linux support (#74545) 2021-05-04 09:11:44 -04:00
Sam Doran
728e43bc59 callback_default test - Reduce sleep time to correct CI failures
For unknown reasons, these tests started failing recently because the results
from testhost11 are being returned before testhost10, but only when coverage is
enabled.

Setting the initial host sleep time to 0 fixes this failure.

ci_coverage
2021-05-03 17:55:10 -07:00
Matt Clay
fb0d5609cb
Code cleanup in ansible-test. (#74529)
* Fix get_available_python_versions calls.
* Make run_playbook vars optional.
* Use ansible_pipelining in inventory.
* Fix type hint.
* Fix order of conditional evaluation.
* Remove unused ibmi platform.
* Add changelog fragment.
2021-04-30 18:50:00 -07:00
Matt Clay
ca507ff477 Integration test fixes. 2021-04-30 17:59:28 -07:00
Maxim Masiutin
daecb30ac9
The apt_key module did not properly handle GnuPG errors for certain actions (#74478)
* Not all GnuPG return codes were analyzed (rc != 0) and not all relevant GnuPG error information was returned by the 'ansible.builtin.apt_key' module (https://github.com/ansible/ansible/issues/74477)

* Update changelogs/fragments/74478-apt_key-gpg-error-check.yaml

Co-authored-by: Brian Coca <bcoca@users.noreply.github.com>
Co-authored-by: Sam Doran <sdoran@redhat.com>
2021-04-30 16:53:41 -04:00
Rick Elrod
38fb05102c
Makefile: Allow one to specify python version (#74517)
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>
2021-04-30 16:23:41 -04:00
Harm Geerts
9bd70045c9
Fix BaseFileCacheModule#keys to respect prefix (#72789)
* Fix BaseFileCacheModule#keys to respect prefix

Change:
- Previously BaseFileCacheModule#keys would return keys with the cache
  prefix. These keys are impossible to retrieve from the cache without
  removing the prefix or using the cache without a prefix.
  Now it removes the prefix from the key and only returns keys that
  share the same prefix as the cache.

Test Plan:
- New unit tests

* Add explicit BaseFileCacheModule#keys test

Test that files that do not match the cache prefix are ignored.
Test that the prefix is removed from the cache key.
2021-04-30 15:28:28 -04:00
Rick Elrod
d8c20a73a4
[ansible-test] Add Fedora 34, update Fedora 33 (#74506)
Change:
- Added Fedora 34 container image to docker.txt
- Dropped Fedora 32 from CI
- Added Fedora 34 to CI
- Updated Fedora 32 and 33 containers for ssh-related fixes
- Move cron fix from 698eae3f3d into
  cron_setup and make it more generic; it can affect modern distros too.

Test Plan:
- ci_complete

Signed-off-by: Rick Elrod <rick@elrod.me>
2021-04-30 11:35:12 -05:00
Maxim Masiutin
6ea81b84ed
apt_key - correct error message about the failure to import a 'gpg' (#74476) 2021-04-30 12:06:38 -04:00
Alicia Cozine
b765d3799b
update backporting instructions to reflect new latest stable branch, some edits (#74512)
Co-authored-by: Alicia Cozine <acozine@users.noreply.github.com>
2021-04-30 11:42:03 -04:00
Maxim Masiutin
d147c1ef1f
apt_key test - Change the URL of the GPG key to S3 and remove it from the repo (#74483) 2021-04-30 10:44:50 -04:00
Matt Clay
a30c55f68a Remove deprecated common.removed module_util.
Tests have been updated to reflect its removal as well.
2021-04-29 16:07:56 -07:00
Abhijeet Kasurde
1a7923e318
pip: Idempotency tests (#74473)
Co-authored-by: Abhijeet Kasurde <akasurde@redhat.com>
Co-authored-by: David Moreau Simard <dmsimard@redhat.com>
2021-04-29 15:14:18 -04:00
David Shrewsbury
f1a5c411d9
Fix sequence lookup message and add tests (#74472)
* add test for bad kv arg value
* add simple form parsing tests and make error messages the same
* add changelog
2021-04-29 15:12:23 -04:00
Sam Doran
74b2add460
paramiko_ssh - mark connection as connected when successful (#74459)
* Remove unused import from test
2021-04-29 15:11:02 -04:00
David Shrewsbury
98495ae99d
Remove unused FileLock import (#74449) 2021-04-29 15:04:34 -04:00
Brian Coca
8a2fc854f4
Add plugin config lists (#49627)
* add plugin config lists
* and dump config for plugins
*  also list configs under PLUGINS for 'all' list
2021-04-29 15:01:05 -04:00
Sam Doran
aa12af1d34
Use our own copy of the Codecov uploader (#74460)
Due to the recent security incident, use our own copy hosted in S3
to mitigate future risk from running an arbitrary script downloaded from a
remote and untrtusted server.
2021-04-29 10:26:23 -04:00
Toshio Kuratomi
112b175f17
Update the porting guide for a new ansible version (#74490) 2021-04-29 10:03:21 -04:00