Commit graph

51348 commits

Author SHA1 Message Date
abikouo 29aea9ff34
constructed - Add keyed_groups suboptions 'default_value' and 'trailing_separator' (#74005)
* Support omitting the trailing separator when a dictionary key's value is an empty string

* Support a default value when the value used in the group name is an empty string

* Add tests

* change log
2021-04-13 11:59:50 -04:00
Brian Coca 270f109bb3
fix see_also formatting (#74252) 2021-04-13 11:51:39 -04:00
David Shrewsbury 5e55af2f02
[test coverage] Add tests for set_stats (#74243)
* satisfy the all-knowing, ever present God of Sanity and use 'grep -c' vs. 'wc -l'
2021-04-13 11:43:53 -04:00
David Shrewsbury 93fdba7013
[bugfix][coverage] find module should consider file size with file_type=any (#74241)
* add changelog
* fix cl text
* Update changelogs/fragments/74241-find-checks-size-with-any.yml

Co-authored-by: Rick Elrod <rick@elrod.me>
2021-04-13 11:41:44 -04:00
Rick Elrod fa0bccf6a1
[module_utils.distro] Fall back to bundled (#74229)
Change:
- When a "distro" package exists in PYTHONPATH but isn't what we expect,
  fall back to our own vendored one and use it. This prevents a
  traceback if someone has some random thing that provides "distro" but
  isn't actually the "distro" library we need.

Test Plan:
- new tests

Tickets:
- Fixes #74228

Signed-off-by: Rick Elrod <rick@elrod.me>

* nuke playbook test file

Signed-off-by: Rick Elrod <rick@elrod.me>

* test fixes

Signed-off-by: Rick Elrod <rick@elrod.me>
2021-04-13 11:27:52 -04:00
Rick Elrod aae5bc5b9e
[advanced_host_list] 100% coverage + fix a bug (#74227)
Change:
- Tests for advanced_host_list; it is now at 100% coverage.
- There was a typo (host vs hostnames) where when the host pattern
  failed to parse, instead of treating the name as a literal as
  intended, it would trigger UnboundLocalError. This didn't fatal
  as there's a global "Exception" handler below, but it did lead to
  an ugly error and incorrect behavior.

Test Plan:
- New tests
- Local experimenting

Signed-off-by: Rick Elrod <rick@elrod.me>

* changelog

Signed-off-by: Rick Elrod <rick@elrod.me>

* fix tests

Signed-off-by: Rick Elrod <rick@elrod.me>
2021-04-13 11:26:29 -04:00
Rick Elrod bd1acb74c8
[playbook/play.py] Increase error test coverage (#74217)
Change:
- Mostly increase error coverage for various conditions in play.py
- Also fix a string in an error, where get_name() was called before
  self.name was read in, so get_name() was always ''.

Test Plan:
- new tests

Signed-off-by: Rick Elrod <rick@elrod.me>

* Fix regex for py2 and py3

Signed-off-by: Rick Elrod <rick@elrod.me>

* py2 hates me

Signed-off-by: Rick Elrod <rick@elrod.me>
2021-04-13 11:22:02 -04:00
Rick Elrod 19aeb4706d
[conditional] Remove support for bare variables (#74208)
Change:
- Variables used in ``when`` conditionals are no longer parsed and
  attempted to be converted to booleans. All non-empty strings are
  considered true (empty strings, false).

Test Plan:
- Updated existing tests
- Added a bunch of new tests with various kinds of truthy/falsy
  values.

Tickets:
- Fixes #74134

Signed-off-by: Rick Elrod <rick@elrod.me>
2021-04-13 11:12:10 -04:00
Sloane Hertel ce96591313
Remove deprecated cache interfaces (#74198)
* update unit test
* Remove FactCache 'update' method
2021-04-13 11:08:20 -04:00
Brian Coca 39bd8b99ec
async_wrapper more info on end (#74199)
be consistent on information returned
 normalize 'return functions'
 fix unit test
 add a bit more context on some failures
2021-04-13 10:30:13 -04:00
Sviatoslav Sydorenko 8502c23028 Fix links to the collections org in doc & FR forms 2021-04-13 16:23:26 +02:00
Sviatoslav Sydorenko 9f002d9f60
📝 Make issue forms verbose and helpful (#74185)
Co-authored-by: John R Barker <john@johnrbarker.com>
Co-authored-by: Sloane Hertel <shertel@redhat.com>
2021-04-13 15:52:03 +02:00
Brian Coca 3a244c5533
config lookup can now handle collection plugins (#74250)
use load_name of valid plugin to find config, will handle the renamed loaded plugin that collections do:
`ansible_collection.<ns>.<collname>.plugins.<type>.<name>`
2021-04-13 00:00:43 -04:00
Rick Elrod f38d03f6fb [ansible-test] nuke virtualenv-isolated.sh
Change:
- This isn't used in our tests, so the suggestion was to just remove
  it.

Signed-off-by: Rick Elrod <rick@elrod.me>
2021-04-12 15:09:18 -07:00
Sandra McCann 481c036632 update intersphinx links for Ansible 3 2021-04-12 14:53:11 -07:00
Alicia Cozine d7f826c987
Change look and feel of the ansible-core docs (#74200) 2021-04-12 16:39:13 -04:00
Matt Clay b752d07163 Overhaul ansible-test container management.
This brings ansible-test closer to being able to support split controller/remote testing.
2021-04-12 12:40:36 -07:00
Brian Coca 9f856a4964
config lookup can query plugin settings (#74186)
* config lookup can query plugin settings
2021-04-12 15:30:25 -04:00
Brian Coca bb7b17fded
added apt lock_timeout (#74095)
* added apt lock_timeout

should help control issues with apt db being locked out
also cleanup imports
2021-04-12 14:10:50 -04:00
Matthew Cengia c7473828c7
Docs: Remove duplicate word (#74223)
The word "to" was erroneously used twice consecutively.

Signed-off-by: Matthew Cengia <mattcen@mattcen.com>
2021-04-11 05:50:36 -05:00
Ikko Ashimine b70a42f693
fix typo in _collection_finder.py (#74218) 2021-04-10 05:13:50 -05:00
Rick Elrod 3504f4c45f
[yum] report upgraded multiarch packages (#73548)
Change:
- Previously when the same package name was installed twice under
  different architectures, we only reported it once in changes.updated.
- This was the result of using a dict internally and keying on package
  name alone.
- This change still keys on package name but turns the values into lists
  which can contain multiple packages per name.

Test Plan:
- Added a lot of tests around multi-arch support
- Added some tests around virtual provides as well

Tickets:
- Fixes #73284

Signed-off-by: Rick Elrod <rick@elrod.me>
2021-04-10 02:36:20 -05:00
Rick Elrod 8c413749fc
[test/support/docker_swarm] remove deprecation (#74203)
Change:
- Remove deprecation block from support test code

Tickets:
- Fixes #74146

Signed-off-by: Rick Elrod <rick@elrod.me>
2021-04-09 22:38:33 -05:00
Guillermo Adrián Molina 9c506031fa
Solaris: Correct version check in svcadm_supports_sync API (#73860)
Co-authored-by: Abhijeet Kasurde <akasurde@redhat.com>
2021-04-10 08:02:58 +05:30
Rick Elrod ef554d0378
[playbook] error on empty, error on 'include' (remove two deprecations) (#74172)
Change:
- Remove two deprecated features
- We now error if a playbook is an empty list instead of just skipping
- We now error if using 'include' instead of 'import_playbook'

Test Plan:
- Added new tests for new errors

Tickets:
- Fixes #74133

Signed-off-by: Rick Elrod <rick@elrod.me>

* sanity & changelog

Signed-off-by: Rick Elrod <rick@elrod.me>
2021-04-09 10:28:24 -04:00
Matt Clay becf941673 Add PyPI proxy container for tests on Python 2.6. 2021-04-08 15:47:23 -07:00
Rick Elrod d7df8a4484
[cron] Remove deprecated features (#74197)
Change:
- Require name always
- Drop 'reboot' parameter in favor of 'special_time: reboot'

Test Plan:
- CI

Tickets:
- fixes #74132

Signed-off-by: Rick Elrod <rick@elrod.me>
2021-04-08 15:50:27 -04:00
David Shrewsbury d5ce6e6bed
Increase test coverage for command module (#74183) 2021-04-08 15:24:01 -04:00
Brian Coca b07a78b4ba
remove deprecated connection password functions (#74155)
* they were moved from connecitons to become plugins
* fixed clog, removed sanity ignore
* fixed tests to use become functions
2021-04-08 15:11:06 -04:00
Brian Coca 45ab6fddf3
removed task parameters (#74154)
* fixed clog
* removed ignore
* fix typose
* removed ignore
2021-04-08 15:09:45 -04:00
Sandra McCann 7443e9d659
pin docutils to 0.16 until theme problem is fixed (#74193) 2021-04-08 13:37:00 -05:00
Sam Doran 4df9ea86c2 ansible-test - change diff mathching regexp so prefixes are optional
The `a/` and `b/` prefixes can be disabled in the `git diff` output by setting
`diff.noprefix` to `true`. The output is still a valid diff, but `ansible-test` would
raise an exception since without the prefixes, it thought the diff line was invalid.
2021-04-07 12:50:39 -07:00
Sam Doran 7b79b69369
ansible-test - ensure trailing separator is added for connection unit test target (#74176)
For connection units tests, if the `__init__.py` file is modified, the trailing separator was
not added, making the target invalid.
2021-04-07 13:27:09 -04:00
Matt Clay 459ea5a4a4
Update test containers in ansible-test. (#74166)
* Update distro test containers to version 2.0.2.

* Update the default test containers.
2021-04-06 15:52:56 -07:00
Matt Martz 09c8faca9f
Add 2.12 roadmap (#74000) 2021-04-06 12:43:38 -05:00
Deric Crago 653a96dcea
renamed: ansible-base.{dirs,install} -> ansible-core.{dirs,install} (#74159) 2021-04-06 11:51:52 -05:00
Martin Krizek 96f94c0fef
Use a file-like obj for stdout/stderr for deadlock workaround (#74156)
Fixes #74149
2021-04-06 11:26:52 -05:00
David Shrewsbury d1842afd59
ansible-inventory - add coverage tests (#74130) 2021-04-06 12:14:54 -04:00
David Shrewsbury 1cacf933b7
lineinfile - improve test coverage (#74122) 2021-04-06 12:11:10 -04:00
Sviatoslav Sydorenko ecd69ed36e Use render for code blocks in issue forms 2021-04-06 18:02:41 +02:00
Alicia Cozine 05662fd2ab
Docs: clarify role docs - vars vs params, dependencies (#74104) 2021-04-06 11:24:28 -04:00
Sviatoslav Sydorenko 282dd1bbc7 Drop deprecated issue_body from issue forms
This change removes the deprecated attribute and also adds an explicit
textarea at the end of the docs report form to replace it.
2021-04-06 17:06:05 +02:00
Sviatoslav Sydorenko 0dd2327bca Add CoC checkboxes to the issue forms 2021-04-06 16:47:04 +02:00
Rick Elrod 3a74f7ea22
prep for 2.12 version bump (#74126)
* prep for 2.12
* Add 2.12 deprecations and sort ignore.txt list.

Signed-off-by: Rick Elrod <rick@elrod.me>
2021-04-05 16:56:53 -05:00
Matt Clay f436058fad Add ansible-test constraint for decorator. 2021-04-05 11:56:38 -07:00
Rick Elrod 1c1734d32c
Fix 2.11 changelog ancestor, missed at 2.10 branching (#74123)
Signed-off-by: Rick Elrod <rick@elrod.me>
2021-04-05 11:37:57 -05:00
Matt Martz 33185c29ab
Implement workaround for stdout deadlock in multiprocessing shutdown (#74099) 2021-04-05 08:51:12 -05:00
Matt Clay 4e2da0f894 Add ansible-test six constraint for Python 2.6. 2021-04-01 14:02:46 -07:00
Hunter Lannon c0a8ed1e35
Fixed link to win_package module (#74090) 2021-04-01 14:07:25 -05:00
Brian Coca f9f839fa08
Fix debug factsetter (#74067)
* prevent debug from setting namespaced facts as tlv
* also added tests
2021-03-31 09:30:09 -04:00