Commit Graph

1435 Commits (85eba9d86084f083b70a808e2c5a4fc28427ab17)

Author SHA1 Message Date
John Mahowald 4116d263c4 Add missing gcp modules to gcp module defaults group (#57779)
* Add missing gcp modules to gcp module defaults group

Fixes #56324

* Add changelog fragment for #57779
5 years ago
Sloane Hertel 4cc4c44dd0
Add a representer for AnsibleUnsafeBytes (#62598)
* Add a representer for AnsibleUnsafeBytes

* changelog

* Add unit tests

Remove native string test until we have time to evaluate how this the function should work
Add non-ASCII characters to test cases

* Compare to the string on Python 2

Add a comment in the test about this behavior
5 years ago
Will Thames a684bb9f5b Ensure k8s apply works with check mode (#60572)
* Ensure k8s apply works with check mode

Update the new predicted object with fields from the previous object
before applying in check mode

Don't log output of `file` with `state: absent` on huge virtualenvs!

Fixes #60510

* Use openshift client fix to improve apply for check mode

Use new apply_object method to get a better approximation
of the expected object in check mode.

Requires released upgrade to openshift

* Add changelog fragment for k8s apply check mode fix

* Update changelogs/fragments/60510-k8s-apply-check-mode.yml

Co-Authored-By: Felix Fontein <felix@fontein.de>
5 years ago
Matt Clay 1c64dba3c9 Fix plugin names for collection plugins. (#60317)
* Fix plugin names for collection plugins.

Add an integration test to verify plugin __name__ is correct for collection plugins.

* Fix collection loader PEP 302 compliance.

The `find_module` function now returns `None` if the module cannot be found. Previously it would return `self` for modules which did not exist.

Returning a loader from `find_module` which cannot find the module will result in import errors on Python 2.x when using implicit relative imports.

* add changelog

* sanity/units/merge fixes
5 years ago
Sam Doran b7897e3a8d cron - Only run get_bin_path() once (#62554) 5 years ago
Jordan Borean 064e443ea5
psexec - Fix kerb and interactive support (#62556) 5 years ago
Matt Davis d0c7b42e58
fix collection jinja2 cache issue (#62543)
* prevents premature lookup (and potential KeyError) of Jinja filter/test function cache that's not fully populated
5 years ago
Jordan Borean bad338aca6
win_exec_wrapper - Be more defensive when trying to get output errors (#62376)
* win_exec_wrapper - Be more defensive when trying to get output errors

* Fix up property search
5 years ago
Jean-Frédéric 951a80c8b0 cron - Use the default crontab executable in cron and cronvar modules (#59765)
In some remote environments, the `crontab` executable is
overloaded with a custom executable, which typically does
some pre/post processing before forwarding to crontab.

Instead of using the hardcoded `/usr/bin/crontab`, this uses
the `get_bin_path` utility to locate the default crontab executable.
5 years ago
Jordan Borean 2e1c6a7839 Add fix for specifying current dir in collections_paths (#62478) 5 years ago
Sloane Hertel 66e5427ffb
cloudformation_info - fix KeyError (#62290)
* cloudformation_info - fix KeyError

* changelog
5 years ago
Matt Clay acd459f909
Add missing changelog fragments. (#62471)
* Add missing default-test-container 1.9.2 fragment.
* Add missing default-test-container 1.9.3 fragment.
5 years ago
Matt Clay 9f7b124a6f Mark ansible-test cloud credentials as sensitive. 5 years ago
Sam Doran ea6e96985a Remove leading space in warning messages (#62002)
ci_complete
5 years ago
Matt Clay 0631e057e9 Redact sensitive values by default in ansible-test 5 years ago
Andrey Klychkov c1126afbfb ce_bgp_neighbor_af: fix a typo in module's parameter (#62403)
* ce_bgp_neighbor_af: fix a typo in module's parameter

* ce_bgp_neighbor_af: fix a typo in module's parameter, add version_added and changelog

* ce_bgp_neighbor_af: fix a typo in module's parameter, add aliase
5 years ago
Xu Yuandong 037401b6e0 fix plugins/netconf/ce.py for netconf/capability/exchange (#60569) 5 years ago
AlanCoding a8dddff5ec Use to_native for error messages, fix docs typo 5 years ago
Shachaf92 74a3eec1d9 win_format - Idem not working if file exist but same fs (#59819)
* win_format - Idem not working if file exist but same fs

* Test fix

* Fix test assertion syntax

* Update tests.yml
5 years ago
jn-bedag c7662d8b2f correct behaviour of win_iis_webapplication when no applicationpool is specified (#61227)
* correct behaviour of win_iis_webapplication when no applicationpool is specified

* documentation for win_iis_webapplication apppool change
5 years ago
Shachaf92 99796dfa87 win_find - Fix deduped files mistaken for directories (#58680)
* win_find - Fix deduped files mistaken for directories

* Update win_find.ps1

* Update win_find.py

* Update win_find.ps1
5 years ago
joshinryz 8def67939d Support large folder size comparisons for win_find (#58466)
* Support large folder size comparisons for win_find

Changed [int] to [int64] to support larger folders. Otherwise module fails as soon as a large folder is encountered.

* Create 58466-FIX_win_find-Bug-Get-FileStat_fails_on_large_files.yml
5 years ago
Matt Clay 32d965e2c6 Fix display of sanity test doc links.
The documentation links are now displayed when running from an install.

Previously the links were only displayed when running from source.
This was due to ansible-test checking for the presence of documentation files locally, which are only present when running from source.
The check is no longer necessary since there is a sanity test in place to enforce the presence of documentation for all sanity tests.
5 years ago
Matt Martz 5be0668fb0
Ensure we don't erase unsafe context in TaskExecutor.run on bytes (#62287)
* Ensure we don't erase unsafe context in TaskExecutor.run on bytes. Fixes #62237

* Remove unused import

* Add missing import

* use args splatting for to_unsafe_text/bytes

* Add security issue to changelog

* fix yaml linting issue
5 years ago
Matt Martz 7d51cac330 Don't treat no checksum as a checksum match (#62146)
Fixes #61978
* moar tests for get_url fetch behavior with existing file
* add changelog fragment
5 years ago
Nathaniel Case 7917d4def7
Standardize eos resource modules (#61736)
* Fix eos_l3_interfaces case sensitivity

* Unify EOS module notes

* Add normalize_interfaces to eos_l2_interfaces

* Pull normalize_interface into eos_interfaces

* Add normalize_interface to lag_interfaces

* Add normalize_interface to lldp_interfaces

* Add normalize_interface to lacp_interfaces

* more module cleanup

* Add changelog
5 years ago
Abhijeet Kasurde 1c3effe92e
VMware: Change return key `results` from VMware modules (#62161)
Following module used internal results key as part of return json, this commit
changes this to appropriate values -
* vmware_datastore_maintenancemode.py
* vmware_host_kernel_manager.py
* vmware_host_ntp.py
* vmware_host_service_manager.py
* vmware_tag.py

Fixes: #62083

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
5 years ago
Jordan Borean 46ffcd6c44
ansible-galaxy - add config to control the display wheel (#61902)
* ansible-galaxy - add config to control the display wheel

* Fix changelog and make test more stable

* Don't use display thread at all if progress wheel isn't being shown
5 years ago
Sam Doran b010acfb27 nxos_bfd_global - add missing import of re (#62226) 5 years ago
Abhijeet Kasurde a2e61f67d5 core: Handle empty extra vars in cli (#61831)
Fixes: #61497

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
5 years ago
Jeff Geerling a6ec6c3175 Fixes #56832: Remove warning when falling back to apt-get if aptitude is missing. (#61782) 5 years ago
Chris Trufan 606e13919e Always specify header of connection keep-alive regardless of python v… (#62218)
* Always specify header of connection keep-alive regardless of python version.

* Add chgangelog fragment

* Fixes to changelog fragment
5 years ago
Matt Clay cd4882e229 Fix ansible-test vcenter test filtering.
The default behavior of the ansible-test vcenter plugin is to use the govcsim container to run tests.

However, unless the govcsim mode was specified using the VMWARE_TEST_PLATFORM environment variable, the filter code would skip the tests unless the tests ran on Shippable or the user had an ansible-core-ci key.

Now the filter correctly recognizes that govcsim is the default.
5 years ago
Matt Clay cdc4926340
Fix ansible-test collections requirements installation. (#62181)
* Fix location of unit test requirements.

* Preserve ansible-test unit test requirements.

* Remove redundant unit test requirements.

* Fix location of network test requirements.

* Preserve ansible-test network test requirements.

* Remove redundant network test requirements.

* Add missing ordereddict requirements.

* Load collection requirements correctly.

* Add changelog fragment.
5 years ago
Matt Clay 6c78f02121 Add missing changelog entry for ansible-test fix.
PR https://github.com/ansible/ansible/pull/62119 was missing a changelog entry.
5 years ago
Alexandre Mulatinho 5b3526535c luks_device.py: allows user explicity define luks format version (#61812)
* luks_device.py: allow the user create LUKS based on specific versions

- Allow user pass an option 'type' that explicits define the version of LUKS
  container that will be created. It should be 'luks1' or 'luks2' format.
- If 'label' option is defined the 'type' option will be 'luks2' independently
  of the option 'type' informed by user. (labels NEED luks2 format)

Fixes: #58973
Signed-off-by: Alexandre Mulatinho <alex@mulatinho.net>

* added the changelog fragment

Signed-off-by: Alexandre Mulatinho <alex@mulatinho.net>

* luks_device.py: make it fail in certain conditions

- Not allow user especify luks1 type and label at the same playbook

Signed-off-by: Alexandre Mulatinho <alex@mulatinho.net>
5 years ago
John Imison 1b2fd2cb5f rabbitmq_publish fix for incorrectly stating message was not published to the queue (#61960)
* Pika v1.0.0 and above were causing issues for publish_message.  Updated
to ensure publish_message works with pika 0.13.1 and 1.0.0 and above.

* Adding changelog fragment for rabbitmq_publish fix.

* Updating return value.
5 years ago
Alan Rominger a999f07010 Allow tower inventory plugin to accept integer inventory_id (#61338) 5 years ago
John Imison 9b149917a6 lookup_rabbitmq pika > 1.0.0 is_closing bug fix (#61959)
* In pika v1.0.0 BlockingChannel.is_closing was removed.  Updating
plugin accordingly.

Ref: https://github.com/pika/pika/pull/1034

* Adding change fragment for is_closing bug.

* Updated change fragment description.
5 years ago
Jordan Borean 6fb1d56fdc
Fix ansible-test coverage --all (#62115) 5 years ago
Abhijeet Kasurde 53aa258d78
hostname: Use hostnamectl for Systemd strategy (#59974)
Use hostnamectl command to get current hostname for host while using
systemd strategy.

Fixes: #59438

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
5 years ago
Matt Clay a7bc11ce67
Work around virtualenv/venv issue in ansible-test. (#62111)
Creating a virtual environment using `venv` when running in a virtual environment created by `virtualenv` results in a copy of the original virtual environment instead of creation of a new one.

To work around this, `ansible-test` now identifies when it is running in a `virtualenv` created virtual environment and uses the real Python interpreter to create the `venv` virtual environment.
5 years ago
Jill R 414d844ed2 AWS ec2_vpc_net: Enable ipv6 CIDR assignment (#60983)
* AWS ec2_vpc_net: Enable ipv6 CIDR assignment

Enable IPv6 CIDRs in ec2_vpc_net, and fix ec2_vpc_subnet tests that
were depending on the aws cli for CIDR assignment.

Related to: #27800
5 years ago
Matt Clay 983f0ad5a0 Properly exclude tests/output/ from code coverage. 5 years ago
Matt Clay f110abb806
Fix ansible-test to ignore `tests/output/`. (#62084)
The `test/results/` directory for Ansible test output was already ignored when not using git.

When Ansible Collections were switched to `tests/output/` the ignore entry was previously overlooked.
5 years ago
Matt Clay 064e8e1ef4
Fix ansible-doc traceback and sanity test. (#62040)
* Fix ansible-doc traceback for removed modules.

This avoids tracebacks with errors like the following when a module has been removed:

module module_name missing documentation (or could not parse documentation): 'NoneType' object does not support item assignment

* Fix ansible-doc sanity test warning handling.

Warnings about removed modules/plugins on stderr are now properly ignored.

Previously an ansible-doc error could result in unrelated errors going undetected because tests were stopped early and the underlying error was ignored.
5 years ago
Felix Fontein c19cea9b03
openssh_keypair: make sure public key has same permissions as private key (#61658)
* Make sure public key has same permissions as private key.

* Add changelog.

* Text, not binary.
5 years ago
Matt Clay c77ab11051
Fix issues with ansible-test --venv option. (#62033)
* Fix ansible-test venv activation.

When using the ansible-test --venv option, an execv wrapper for each python interpreter is now used instead of a symbolic link.

* Fix ansible-test execv wrapper generation.

Use the currently running Python interpreter for the shebang in the execv wrapper instead of the selected interpreter.

This allows the wrapper to work when the selected interpreter is a script instead of a binary.

* Fix ansible-test sanity requirements install.

When running sanity tests on multiple Python versions, install requirements for all versions used instead of only the default version.

* Fix ansible-test --venv when installed.

When running ansible-test from an install, the --venv delegation option needs to make sure the ansible-test code is available in the created virtual environment.

Exposing system site packages does not work because the virtual environment may be for a different Python version than the one on which ansible-test is installed.
5 years ago
Nathaniel Case 50e09be14f
Allow the use of _paramiko_conn even if the connection hasn't been started. (#61570)
* Allow the use of _paramiko_conn even if the connection hasn't been started.

I'm not sure what the benefit is of Noneing paramiko_conn on close, but will keep for now

* Fix test

* Try to fix up net_put & net_get

* Add changelog
5 years ago
Jordan Borean 6e8d430872
win_become - don't dispose logon token until end (#61905) 5 years ago