Commit graph

1481 commits

Author SHA1 Message Date
Sam Doran
b7897e3a8d cron - Only run get_bin_path() once (#62554) 2019-09-18 19:04:26 -04:00
Jordan Borean
064e443ea5
psexec - Fix kerb and interactive support (#62556) 2019-09-19 08:41:02 +10:00
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
2019-09-18 14:39:59 -07:00
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
2019-09-19 06:53:56 +10:00
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.
2019-09-18 15:35:06 -04:00
Jordan Borean
2e1c6a7839 Add fix for specifying current dir in collections_paths (#62478) 2019-09-18 08:04:22 -07:00
Sloane Hertel
66e5427ffb
cloudformation_info - fix KeyError (#62290)
* cloudformation_info - fix KeyError

* changelog
2019-09-18 09:58:58 -04:00
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.
2019-09-17 17:33:58 -07:00
Matt Clay
9f7b124a6f Mark ansible-test cloud credentials as sensitive. 2019-09-17 13:08:14 -07:00
Sam Doran
ea6e96985a Remove leading space in warning messages (#62002)
ci_complete
2019-09-17 10:16:00 -05:00
Matt Clay
0631e057e9 Redact sensitive values by default in ansible-test 2019-09-17 08:09:17 -07:00
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
2019-09-17 13:34:07 +01:00
Xu Yuandong
037401b6e0 fix plugins/netconf/ce.py for netconf/capability/exchange (#60569) 2019-09-17 08:00:55 +02:00
AlanCoding
a8dddff5ec Use to_native for error messages, fix docs typo 2019-09-16 12:11:41 -07:00
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
2019-09-15 22:45:44 -04:00
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
2019-09-15 22:27:18 -04:00
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
2019-09-15 20:02:05 -04:00
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
2019-09-15 19:04:59 -04:00
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.
2019-09-13 22:24:14 -07:00
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
2019-09-13 13:14:35 -05:00
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
2019-09-13 13:24:15 -04:00
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
2019-09-13 09:35:50 -04:00
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>
2019-09-13 09:57:04 +05:30
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
2019-09-13 11:06:18 +10:00
Sam Doran
b010acfb27 nxos_bfd_global - add missing import of re (#62226) 2019-09-13 07:37:30 +10:00
Abhijeet Kasurde
a2e61f67d5 core: Handle empty extra vars in cli (#61831)
Fixes: #61497

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2019-09-12 15:43:41 -04:00
Jeff Geerling
a6ec6c3175 Fixes #56832: Remove warning when falling back to apt-get if aptitude is missing. (#61782) 2019-09-12 15:29:36 -04:00
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
2019-09-12 21:05:23 +02:00
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.
2019-09-12 02:13:57 -07:00
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.
2019-09-12 02:00:33 -07:00
Matt Clay
6c78f02121 Add missing changelog entry for ansible-test fix.
PR https://github.com/ansible/ansible/pull/62119 was missing a changelog entry.
2019-09-11 13:03:36 -07:00
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>
2019-09-11 20:45:33 +02:00
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.
2019-09-11 20:29:05 +02:00
Alan Rominger
a999f07010 Allow tower inventory plugin to accept integer inventory_id (#61338) 2019-09-11 11:48:38 -04:00
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.
2019-09-11 08:23:27 +02:00
Jordan Borean
6fb1d56fdc
Fix ansible-test coverage --all (#62115) 2019-09-11 15:12:38 +10:00
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>
2019-09-11 10:27:17 +05:30
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.
2019-09-10 19:27:12 -07:00
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
2019-09-10 19:25:36 -04:00
Matt Clay
983f0ad5a0 Properly exclude tests/output/ from code coverage. 2019-09-10 15:50:22 -07:00
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.
2019-09-10 15:49:40 -07:00
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.
2019-09-10 00:29:34 -07:00
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.
2019-09-10 06:44:04 +02:00
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.
2019-09-09 18:32:29 -07:00
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
2019-09-09 16:59:20 -04:00
Jordan Borean
6e8d430872
win_become - don't dispose logon token until end (#61905) 2019-09-10 06:37:07 +10:00
Mario Lenz
900a51b283 VMware: Fix issue with order of changes in vmware_vcenter_statistics 2019-09-09 16:01:54 -04:00
Gonéri Le Bouder
3ea8e0a144 VMware: not ssl.SSLContext if validate_certs false (#57185)
Python < 2.7.9 does not have the ssl.SSLContext attribute.
ssl.SSLContext is only required when we want to validate the SSL
connection. If `validate_certs` is false, we don't initialize the
`ssl_context` variable.

Add unit-test coverage and a little refactoring:

- avoid the use of `mocker`, when we can push `monkeypatch` which is
  `pytest`'s default.
- use `mock.Mocker()` when possible

closes: #57072
2019-09-09 21:41:46 +05:30
Mark Chappell
1f38a12057 Fix behaviour of module_utils/ec2 compare_policies when dealing with bare bools and ints. (#61115)
* module_utils/ec2: (unit tests) Move unit tests for module_utils/ec2.py into test/units/module_utils

- compare_policies was refactored from s3_bucket
- "ec2_utils" doesn't seem to have ever existed

* module_utils/ec2: (unit tests) Add unit test for comparing quoted and unquoted bools and numbers within policies

As per https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_grammar.html

"Values are enclosed in quotation marks. Quotation marks are optional for numeric
and Boolean values."

* module_utils/ec2: Explicitly convert bools and ints to strings when comparing policies

See also: https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_grammar.html
2019-09-09 12:08:25 -04:00
Abhijeet Kasurde
3703c3bb1a
atomic_image: Fix absent state (#61827)
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2019-09-09 14:38:32 +05:30
Simon Dodsley
df49a9e58c purefa_info: Fix failure due to API version check (#61925) 2019-09-09 09:14:46 +02:00
Felix Fontein
d40ba28fb4
docker_container: improve port range parsing error behavior (#61740)
* Improve port range parsing.

* Add changelog.
2019-09-08 20:30:18 +02:00
Chris Trufan
943888b955 Fixes to ecs_certificate cert chain for #61738 (#61858)
* Fixes to ecs_certificate cert chain for #61738

* Added changelog fragment

* Fixes to ecs_certificate for cleaner join, and better integration test

* Fix integration test formatting

* End cert chain with a \n

* Update changelogs/fragments/61738-ecs-certificate-invalid-chain.yaml

Co-Authored-By: Felix Fontein <felix@fontein.de>

* Update main.yml
2019-09-07 07:58:25 +02:00
Andreas Calminder
cac93cbd1f os_port allowed_address_pairs and extra_dhcp_opts list of dicts comparison fix (#56577)
* compare list of dicts

* update example for dhcp_server_opts to include ip_version which is automatically added by openstack

* add note about dhcp_server_opts

* add changelog fragment

* fix forgotten exception+pass

* no need to excplicitly check for None

* fix oops

* fix import error

* missed missing_required_lib

* changelog fragment formatting and grammar fixes

* update requirements in documentation and fix spelling
2019-09-06 22:44:25 +02:00
Mark Chappell
b8650c0a50 aws_asg: Fix idempotency when using tags and metrics (#61284)
* Update AWS hacking policy to enable ASG Tagging management

* aws_asg: Add tests for ASG Tagging (including idempotency)

* aws_asg: ignore sort order when comparing tags on the ASG (fix idempotency)

* ec2_asg: (integration tests) test for idempotency when managing metrics collection

* ec2_asg: sort list of enabled metrics to ensure clean comparisons.
2019-09-06 12:48:40 -07:00
Matt Martz
8331c8fdc3
Properly hide limit and list-hosts args from ansible-inventory (#61618)
* Properly hide limit and list-hosts args from ansible-inventory. Fixes #61604

* Add changelog fragment

* Consolidate limit

* Fix positional argument with --graph

* Properly error for hidden arguments

* linting issue

* host pattern changelog
2019-09-06 11:43:50 -05:00
Sam Doran
61efffcbe1
User - correct group removal description in docs (#61936) 2019-09-06 12:16:33 -04:00
Ganesh Nalawade
4f29b5a76b
Fix ansible-connection persist after playbook run complete issue (#61591)
* Fix ansible-connection persist after playbook run issue

*  PR https://github.com/ansible/ansible/pull/59153 to add support
   for delaying the ansible-connection added an old issue of
   ansible-connection persisting even after playbook run is finished
   till either command timeout or connect timeout is triggered.
   ansible-connection persist after playbook execution is done
   and also delays the connection initilization untill a method
   in invoked from module side on the connection object.

* Add chanegelog
2019-09-06 14:23:18 +05:30
Matt Davis
7f4328ad12
allow external collections under the ansible NS (#61908)
* fixes #59988
2019-09-05 18:50:22 -07:00
Felix Fontein
e06dbe6e4f
Azure _info modules: fix returned ansible_facts when called as _info (#61805)
* Fix Azure _info modules which still returned ansible_facts.

* Adjust PR #.

* Fix wrong assignment.

* Reorganize code for clarity.
2019-09-05 11:51:56 +02:00
Bill Dodd
2a932ad7cf Fix power command ResetType mapping logic (#59927)
* fix power command ResetType mapping logic

* add changelog fragment
2019-09-05 05:39:21 -04:00
Jordan Borean
3a7b77a94c
ansible-galaxy fix --server option for roles (#61820) 2019-09-05 11:46:44 +10:00
Matt Martz
8214d188cf Don't truncate the last character from galaxy urls. Fixes #61624 (#61775) 2019-09-05 07:06:42 +10:00
Scott Luther
0c73e47a42 fix erroneous failures in docker_compose due to deprecation warnings … (#61650)
* fix erroneous failures in docker_compose due to deprecation warnings from docker (#60961)

* Update error handling to work with new method of capturing output

Co-Authored-By: Felix Fontein <felix@fontein.de>

* update error handling

* fix syntax error

* fix indentation

* fix indentation (again)

* remove erroneous line
2019-09-04 19:34:05 +02:00
kucharskim
1dea661ce8 Allow 13 asterisk characters in password field without warning (#54893)
On OpenBSD, 13 asterisk characters as a password hash, marks the
account as disabled. Otherwise daily(8) script which executes
security(8) will email operator about not properly locked accounts.

Before the diff, we see following warning:

> [WARNING]: The input password appears not to have been hashed. The 'password' argument must be encrypted for this module to work properly.

After the diff, warning is gone.
2019-09-04 11:49:16 -04:00
Sloane Hertel
91ccb03552 aws_s3 - wait for the bucket before setting ACLs (#61735)
* Wait for the bucket to become available if possible before setting ACLs
2019-09-04 09:42:28 -04:00
Mark Chesney
01f4081b66 Fix creation of DigitalOcean droplets using digital_ocean_droplet module (#61655)
* Omit disallowed 'id' attribute in request body to create a droplet

* Add changelog fragment for PR #61655
2019-09-04 02:28:56 -04:00
Bill Dodd
088d821f75 Fix KeyError exceptions in GetLogs command (#59877)
* fix KeyError exceptions in GetLogs command

* add changelog fragment

* refine the list of LogEntry properties to collect
2019-09-03 21:44:07 -04:00
Alexandre Mulatinho
e4d72dd981 luks_device.py: Allow manipulate LUKS containers with label or UUID (#61603)
* luks_device.py: Allow manipulate LUKS containers with label or UUID

- Allow create a LUKS2 container format with label support
- Allow manipulate (open, close, modify) an LUKS container based on
  both label (LUKS2 format) or UUID instead of using devices only.

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

* test_luks_device.py: organizing tests to support labels

- Add label on some tests and fix errors reported by Shippable

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

* luks_device.py: adjusting versions and messages

- Modifying version_added from 2.9 to 2.10
- Fixing some messages
- Created a changelog fragment
- Moving blkid from scope

Fixes #58973
Signed-off-by: Alexandre Mulatinho <alex@mulatinho.net>
2019-09-03 05:40:09 +02:00
Maxim Babushkin
f1a1b72f07 os_server - add "tag" to instance nics (#61119)
A custom "tag" could be passed to the instance metadata with the nics.
Add support for the "tag" to the module.
2019-09-02 05:07:53 -04:00
Guillaume Leroy
21b101f8e1 add option to define keysize at luks partition creation (#61522)
* add option to define keysize at luks partition creation

* Bump version_added.

* Extend tests.
2019-08-31 19:32:41 +02:00
René Moser
1ff20e9804 apt_repository: implement update cache retrying (#57266)
* use exponential backoff
* make cache update retries and max delay in between configurable
2019-08-30 16:14:15 -04:00
René Moser
fd4ff54580 apt: honor cache_update=false on auto-install deps (#56549)
* apt: honor cache_update=false on auto-install deps
* add porting guide
2019-08-30 15:57:58 -04:00
René Moser
01ae6991bd apt: use exponential backoff for apt update cache retries (#60527)
* make retries and max delay configurable
2019-08-30 15:55:38 -04:00
Mark Chappell
35359959de aws_codecommit: Fix integration tests and Add support for updating the description (#61263)
* Update DevOps AWS policy
- Fix typos in permission names
- While AWS claims you can use 'arn:aws:codecommit:*' it errors unless you use '*'

* aws_codecommit: (integration tests) Migrate to module_defaults

* aws_codecommit: (integration tests) Fix integration tests

* aws_codecommit: (integration tests) Add tests for updating the description

* aws_codecommit: Add support for updating the description and rename "comment" option to "description"
2019-08-30 11:25:37 -07:00
Toshio Kuratomi
8f6dbb732a
[WIP] Cleanups and version bumping for 2.10 (#61572)
* Cleanups and version bumping for 2.10

* Fix changelog url now that stable has been branched

* Fix the lenth of the porting guide title now that the version is two digits
2019-08-30 09:54:12 -07:00
Jordan Borean
951dac7691
Azure fix _info/_facts return values for some modules (#61584)
* Azure fix _info/_facts return values for some modules

* Further test fixes

* securitygroup fixes after the move to _info module
2019-08-30 16:00:47 +10:00
Simon Dodsley
cd24d57636 Add IOPs bandwidth support to volumes (#61577) 2019-08-30 01:12:39 -04:00
Matt Clay
4063d58339 Use relative submodule status in ansible-test.
The `git submodule status` command is relative to the current git repository by default.
When running from a repository subdirectory paths can be returned above the current directory.
Specifying the current directory with `git submodule status` avoids listing submodules above that directory.

This will fix issues when testing a collection that is rooted below the repository root when that repository uses submodules.
2019-08-29 20:29:38 -07:00
Felix Fontein
0c592c8225
CloudStack modules: rename _facts -> _info (#61090)
* Rename cloudstack _facts -> _info

* Add changelog.

* Fix errors due to overloaded get_result having different parameter names.

* Fix examples.

* Change debug tasks.

* Remove unneeded code.

* Change from rename -> deprecate+new module.

* Make cs_zone_info return a list.

* Make cs_instance_info return a list.

* Fix return value docs.

* Fix typo.

* Improve tests.

* Fix cs_zone_info.

* Linting.

* Fix alias/option switch.

* Fix version numbers.

* Extend docs.
2019-08-29 16:14:51 +02:00
René Moser
3bfeae9040 vultr: add changelog and update porting guide (#61520) 2019-08-29 11:49:00 +02:00
Matt Davis
d81ae27a4a
Collection role relative deps (#61517)
* default collection support

* playbooks run from inside a registered collection will set that collection as the first item in the search order (as will all non-collection roles)
* this allows easy migration of runme.sh style playbook/role integration tests to collections without the playbooks/roles needing to know the name of their enclosing collection

* disable default collection test under Windows

* enable collection search for role dependencies

* unqualified role deps in collection-hosted roles will first search the containing collection
* if the calling role has specified a collections search list in metadata, it will be appended to the search order for unqualified role deps

* disable cycle detection unit test

* failing on 3.7+, needs proper cycle detection
* see #61527
2019-08-29 02:25:44 -07:00
James Cammarata
51b33b79c0
T woerner max concurrent (#60702)
* play, block, task: New attribute forks

With this it is possible to limit the number of concurrent task runs.
forks can now be used in play, block and task. If forks is set in different
levels in the chain, then the smallest value will be used for the task.

The attribute has been added to the Base class as a list to easily provide
all the values that have been set in the different levels of the chain.

A warning has been added because of the conflict with run_once. forks will
be ignored in this case.

The forks limitation in StrategyBase._queue_task is not used for the free
strategy.

Signed-off-by: Thomas Woerner <twoerner@redhat.com>

* Handle forks in free strategy

The forks attribute for the free strategy is handled in run in the free
StrategyModule. This is dony by counting the amount of tasks where the uuid
is the same as the current task, that should be queued next. If this amount
is bigger or equal to the forks attribute from the chain (task, block,
play), then it will be skipped to the next host. Like it is also done with
blocked_hosts.

Signed-off-by: Thomas Woerner <twoerner@redhat.com>

* Test cases for forks with linear and free strategy

With ansible_python_interpreter defined in inventory file using
ansible_playbook_python.

Signed-off-by: Thomas Woerner <twoerner@redhat.com>

* Changing forks keyword to throttle and adding some more docs
2019-08-28 18:47:39 -05:00
Matt Davis
7d1a981b61
default collection support (#61415)
* default collection support

* playbooks run from inside a registered collection will set that collection as the first item in the search order (as will all non-collection roles)
* this allows easy migration of runme.sh style playbook/role integration tests to collections without the playbooks/roles needing to know the name of their enclosing collection

* ignore bogus sanity error

* filed #61460

* fixed task unit test failure

* don't append an empty collections list to the ds

* ignore leftover local_action in mod_args ds action parsing

* fix async_extra_data test to not require ssh and bogus locale

* disable default collection test under Windows

* ensure collection location FS code is always bytes

* add changelog
2019-08-28 16:31:40 -07:00
robertchung
caa5abdfc9 Fix TypeError in ec2_group.py for Python3 when sorting dictionary list (#59844)
* Fix TypeError in ec2_group.py for Python3 when sorting dictionary list

* Using json.loads() and dumps() to replace sorting

* Bug fixes for ec2_group.py

* Dictionaries cannot be compared/sorted in Python3

* Diff will occur when the IpPermissions have the same IpRanges but have different ordering

* 'before' will be sorted by 'Type' with high priority than 'IP', but 'boto3.describe_security_groups()' function cannot get 'Type' from Amazon

* Add some basic diff mode testing to exercise the rule-sorting code
2019-08-28 16:28:42 -07:00
Sam Doran
73248bf27d validate-modules - Use error codes instead of numbers (#60711) 2019-08-28 14:12:56 -07:00
Felix Fontein
59ab4d9307
oVirt: rename _facts -> _info (#61299)
* Rename oVirt _facts -> _info

* Adjust PR #.

* Forgot update BOTMETA / ignore.txt for doc fragment.

* Compatibility for 3rd-party modules using module_utils or info doc fragment.

* Update note.

* Fix/improve docs.

* Update lib/ansible/modules/cloud/ovirt/ovirt_event_info.py

Co-Authored-By: Sloane Hertel <shertel@redhat.com>

* Fix variable.

* Fix return value documentation for ovirt_external_provider_info.
2019-08-28 21:01:46 +02:00
smile37773
161c1ce17e Rename Azure modules: "facts"->"info" (#61417)
* rename

* add symlink

* add the log

* fix the ignore file

* fix

* fix
2019-08-28 19:01:10 +08:00
Matt Clay
f510d59943
Support relative imports in AnsiballZ. (#61196) 2019-08-27 18:11:21 -07:00
Jordan Borean
66f52b74b1 Change collection PS util import pattern (#61307)
* Change collection PS util import pattern

* Add changes for py2 compat

* fix up regex and doc errors

* fix up import analysis

* Sanity fix for 2.6 CI workers

* Get collection util path for coverage collection
2019-08-27 16:02:27 -07:00
Simon Dodsley
21f0c0f42f Change references to ansible_facts (#61353) 2019-08-27 18:00:25 -04:00
Simon Dodsley
948023176e Changes references to ansible_facts (FA_RA) (#61355) 2019-08-27 18:00:12 -04:00
Simon Dodsley
05afc28d08 Changes references to ansible_facts (FB_S3USER) (#61356) 2019-08-27 18:00:01 -04:00
Felix Fontein
c9a9bd9d64
OneView: rename _facts -> _info (#61208)
* Rename OneView _facts modules -> _info

* Adjust PR #.

* Forgot to update test names.

* Remove superfluous blank line.

* Some more things from review.
2019-08-27 23:21:40 +02:00
smile37773
5438013191 Rename Azure modules: facts -> info (#60987) 2019-08-28 04:44:57 +08:00
Felix Fontein
2db4e044ab smartos_image_facts: rename to smartos_image_info (#60915)
* Rename smartos_image_facts -> smartos_image_info

* Add changelog.
2019-08-27 16:43:10 -04:00
Felix Fontein
e176023c6b Scaleway: rename _facts -> _info (#61095)
* Rename scaleway _facts -> _info

* Add changelog.

* Improve docs.
2019-08-27 16:39:24 -04:00
Felix Fontein
185a1fcb07 Online: rename _facts -> _info (#61091)
* Rename online _facts -> _info

* Add changelog.
2019-08-27 16:36:55 -04:00
Kevin Breit
489156378c Meraki - Enable API call rate limiting for requests (#54827)
* Initial commit for rate limiting
- Detects if error code is 429
- Pauses for random time between .5 and 5 seconds before retrying
- If it fails 10 times, give up and tell user

* Redo structure of request() to support rate limiting

* Hold down timer is now a sliding scale
- 3 * number of retries
- Fails after the 30 second wait

* Whitespace fixes

* Redo implementation using decorators
- Errors aren't tested but code works for regular calls

* Unit tests work for error handling

* Add integration tests for successful retries

* Add condition for 502 errors and retry

* Move _error_report out of the class

* PEP8 fixes

* Add changelog entry
2019-08-27 16:32:09 -04:00
Felix Fontein
1906c05348
vertica_facts: rename to vertica_info (#60916)
* Rename vertica_facts -> vertica_info

* Add changelog.

* Fix porting guide.
2019-08-27 21:28:36 +02:00