Commit graph

47238 commits

Author SHA1 Message Date
Matt Clay
d9d8d55861 [stable-2.9] 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.
(cherry picked from commit a7bc11c)

Co-authored-by: Matt Clay <matt@mystile.com>
2019-09-11 12:06:45 -07:00
Matt Clay
c2387536ab [stable-2.9] Properly exclude tests/output/ from code coverage.
(cherry picked from commit 983f0ad)

Co-authored-by: Matt Clay <matt@mystile.com>
2019-09-11 12:05:58 -07:00
Matt Clay
4f51852b5e [stable-2.9] 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.
(cherry picked from commit f110abb)

Co-authored-by: Matt Clay <matt@mystile.com>
2019-09-11 12:05:35 -07:00
Andrey Klychkov
307c8c6a49 Fix mysql.py logic related to 53326 (#61832)
(cherry picked from commit e4d4e49388)
2019-09-11 10:55:26 -07:00
Sumit Jaiswal
df4f0e4ec2 To fix IOSXR L3 Interfaces idempotency failures (#61860)
* fix zuul idemptency failures

* adding eol

(cherry picked from commit 1425d23513)
Signed-off-by: Sumit Jaiswal <sjaiswal@redhat.com>
Signed-off-by: Paul Belanger <pabelanger@redhat.com>
2019-09-10 14:12:30 -07:00
Matt Clay
b3fbc3c156 [stable-2.9] 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.
(cherry picked from commit c77ab11051)

Co-authored-by: Matt Clay <matt@mystile.com>
2019-09-09 20:35:16 -07:00
Jordan Borean
427da1d213 win_become - don't dispose logon token until end (#61905)
(cherry picked from commit 6e8d430872)
2019-09-09 15:30:53 -07:00
Matt Davis
e628c87b29 allow external collections under the ansible NS (#61908)
* fixes #59988

(cherry picked from commit 7f4328ad12)
2019-09-09 14:04:08 -07:00
Gonéri Le Bouder
071201bf4f ansible-test: vcenter+Worldstream: hide password
Hide the temporary password when `ansible-test` is called with the
`--redact` parameter.

(cherry picked from commit 8e22a60f97)
2019-09-09 13:48:04 -07:00
Chris Trufan
1cb40e1aed 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

(cherry picked from commit 943888b955)
2019-09-09 13:44:16 -07:00
Nathaniel Case
94f8f320ed [stable-2.9] Add missed eos modules to porting guide (#61994)
(cherry picked from commit 646a0b9)

Co-authored-by: Nathaniel Case <ncase@redhat.com>
2019-09-09 13:41:47 -07:00
Satoru SATOH
fce737b3bb Allow junos_config changes the candidate configuration only (#61969)
This allows junos_config to changes the candidate configuration only and
does not commit it as the active configuration at once w/ the
'check_commit' option.

(cherry picked from commit 483e76ee58)
2019-09-09 13:40:38 -07:00
Ganesh Nalawade
0de5620b65 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

(cherry picked from commit 4f29b5a76b)
2019-09-09 13:36:20 -07:00
Matt Martz
60d68268ec [stable-2.9] 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
(cherry picked from commit 8331c8f)

Co-authored-by: Matt Martz <matt@sivel.net>
2019-09-09 13:31:56 -07:00
Gonéri Le Bouder
1e32aa4354 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
(cherry picked from commit 3ea8e0a144)
2019-09-09 13:26:35 -07:00
Scott Luther
9902888a21 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

(cherry picked from commit 0c73e47a42)
2019-09-09 13:22:34 -07:00
Felix Fontein
55e7efcd8f docker_container: improve port range parsing error behavior (#61740)
* Improve port range parsing.

* Add changelog.

(cherry picked from commit d40ba28fb4)
2019-09-09 13:20:05 -07:00
Simon Dodsley
93e8f4cef0 Fix failure due to API version check
(cherry picked from commit dfe02d1ff4b9a6f84e66881fb99619b29338389a)
2019-09-09 13:17:36 -07:00
Sam Doran
97100bbea2 [stable-2.9] User - correct group removal description in docs (#61936)
(cherry picked from commit 61efffcbe1)

Co-authored-by: Sam Doran <sdoran@redhat.com>
2019-09-06 13:35:26 -07:00
Fabian von Feilitzsch
fb9502c922 Fix bug preventing wait_condition from being respected when using apply (#61493)
(cherry picked from commit f406b8b4c4)
2019-09-06 13:32:07 -07:00
Toshio Kuratomi
fb0bc0eb6b [stable-2.9] Fix rpm dependencies for ansible-test
Needs to require ansible = version rather than ansible-version
(cherry picked from commit 59afffa)

Co-authored-by: Toshio Kuratomi <a.badger@gmail.com>
2019-09-05 18:35:29 -07:00
Toshio Kuratomi
7910f0f152 Update Ansible release version to v2.9.0b1.post0. 2019-09-05 14:44:49 -07:00
Toshio Kuratomi
b108c59b89 New release v2.9.0b1 2019-09-05 11:46:29 -07:00
Sumit Jaiswal
d2b5a08eb8 To fix and rename checkpoint to check_point due to legal reasons (#61872)
* Rename checkpoint to check_point due to legal reasons, fix #61145 (#61172)

* Fix #61145

* Fix type keyword

* Removed file fragment

(cherry picked from commit 9744ce1e1d)

* add changelogs

* adding eol

Signed-off-by: Sumit Jaiswal <sjaiswal@redhat.com>
2019-09-05 10:47:04 -07:00
Gonéri Le Bouder
124036337e azure_rm_iothub: disable the functional test (#61854)
The test fails with: Operation failed with status: 'Unauthorized'
This commit disable the test until the situation is resolved.

See: https://github.com/ansible/ansible/issues/61852
(cherry picked from commit 08e01380e6)
2019-09-05 08:59:49 -07:00
Sam Doran
622f5a248d [stable-2.9] Rebalance Azure tests groups
(cherry picked from commit 173d47d1f4)

Co-authored-by: Sam Doran <sdoran@redhat.com>
2019-09-05 08:59:27 -07:00
Gonéri Le Bouder
ec48f1d35b [stable-2.9] test: disable the docker swarm tests (#61816)
`docker_swarm` tests tend to hang during the creation of the Swarn
cluster.

See: https://github.com/ansible/ansible/issues/61815
(cherry picked from commit 7132466327)

Co-authored-by: Gonéri Le Bouder <goneri@lebouder.net>
2019-09-05 08:57:54 -07:00
Felix Fontein
ac61dc60aa 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.

(cherry picked from commit e06dbe6e4f)
2019-09-05 08:48:31 -07:00
ndclt
ec7803387e documentation: modify the link to the docker.txt listing all images (#61838) (#61846)
The file was moved.

(cherry picked from commit aadb192846)
2019-09-05 10:06:17 -05:00
Jordan Borean
3bf9f57f43 ansible-galaxy fix --server option for roles (#61820)
(cherry picked from commit 3a7b77a94c)
2019-09-04 19:55:46 -07:00
Matt Martz
ab6efcd6cc [stable-2.9] Don't truncate the last character from galaxy urls. Fixes #61624 (#61775)
(cherry picked from commit 8214d18)

Co-authored-by: Matt Martz <matt@sivel.net>
2019-09-04 18:01:46 -07:00
Sam Doran
23a79ecc77 [stable-2.9] aws_s3 - wait for the bucket before setting ACLs (#61735) (#61768)
* [stable-2.9] aws_s3 - wait for the bucket before setting ACLs (#61735)

* Wait for the bucket to become available if possible before setting ACLs
(cherry picked from commit 91ccb03552)

Co-authored-by: Sloane Hertel <shertel@redhat.com>

* s3 - improve waiting for the bucket (#61802)

(cherry picked from commit ff05991265)
2019-09-04 14:01:24 -07:00
Mark Chesney
9ff8d8d898 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 12:10:00 -07:00
kucharskim
4cc9ee950f [stable-2.9] 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.
(cherry picked from commit 1dea661ce8)

Co-authored-by: kucharskim <mikolaj@kucharski.name>
2019-09-04 12:09:04 -07:00
Strahinja Kustudic
3558d38b17 [stable-2.9] Fix systemd start state with deactivating service state
(cherry picked from commit ee4b3b8854)

Co-authored-by: Strahinja Kustudic <kustodian@gmail.com>
2019-09-04 12:08:03 -07:00
Sumit Jaiswal
8141aa9a55 To fix iosxr_l3_interfaces module zuul tests (#61592)
* fix 61540

* fix utils

(cherry picked from commit 24ad1dffc9)
2019-09-04 12:07:39 -07:00
Sumit Jaiswal
58fda1632f Fixes IOS L3 intermittent zuul failure (#61682)
* fix ios l3 intermittent failure

* fix self

* dict to ordered dict

* fix diff_again fn

Signed-off-by: Sumit Jaiswal <sjaiswal@redhat.com>

* remove orderdict as its expensive

Signed-off-by: Sumit Jaiswal <sjaiswal@redhat.com>

* update verify fn

Signed-off-by: Sumit Jaiswal <sjaiswal@redhat.com>
(cherry picked from commit 2672dc9694)
2019-09-04 12:06:58 -07:00
Miguel Angel Muñoz González
fa3d52729c Backport/2.9/61691 (#61759)
* Fix Decode Bug in Py3

(cherry picked from commit 87642ac93e3cd9d85147f205a0cfdf2d7f42b400)

* Update fortios.py

(cherry picked from commit 416bc3c0409e6098e701a9f944af5060e691f887)

* Remove special char from name

* Ensure full compatibility when ansible is install from Py2

* Update lib/ansible/plugins/httpapi/fortios.py

Co-Authored-By: Nathaniel Case <this.is@nathanielca.se>
(cherry picked from commit 7601b7fa0defeade4cad2b8e0edd73afcde8b395)

* Update lib/ansible/module_utils/network/fortios/fortios.py

Co-Authored-By: Nathaniel Case <this.is@nathanielca.se>
(cherry picked from commit e4f6a19cb4ddab65a2950ae9ea4371ea5045441a)

* Update lib/ansible/module_utils/network/fortios/fortios.py

Co-Authored-By: Nathaniel Case <this.is@nathanielca.se>
(cherry picked from commit ba1c2e4ea05a1541baab0549cd8643f617eaabde)

* Suggested changes by Qalthos

(cherry picked from commit ae4bde8500f2439f926cd05f83ba27b57792c30d)

* Suggested changes by Qalthos

(cherry picked from commit 63bea8e2a6c2c5c2ec659e21e1fb44e02002f466)

* Retriggerting due to shippable failure
2019-09-04 12:04:33 -07:00
Sam Doran
187f85f4d2 [stable-2.9] aws_codebuild tests - add retries and delay instead of a pause task (#61731) (#61771)
* [stable-2.9] aws_codebuild tests - add retries and delay instead of a pause task (#61731)

- Add retries instead of a pause task
- Shorten the IAM role name length
- Put the IAM role name in defaults/main.yml instead
- Fix the aws_codepipeline tests too
(cherry picked from commit 9ee0deea24)

Co-authored-by: Sloane Hertel <shertel@redhat.com>

* codebuild/codepipeline - fix regex for shippable resource_prefix (#61783)

* Fix bad assumption about shippable resource_prefix for codebuild and codepipeline tests
* Update test/integration/targets/aws_codepipeline/defaults/main.yml

(cherry picked from commit d5c8d325e4)
2019-09-04 10:38:35 -07:00
Jordan Borean
682c3674b8 Set win_pagefile as unstable as thats what it is (#61732)
(cherry picked from commit 00add5b668)
2019-09-04 10:30:04 -07:00
Gonéri Le Bouder
e14ccbf2c0 [stable-2.9] debian: prepare the ansible-test package
- Generate an extra package for `ansible-test`.
- Manually install the files because CDBS get confused by our two
  Python packages
- Refresh the package descriptions to match what is done with the RPM
(cherry picked from commit 3f9316b)

Co-authored-by: Gonéri Le Bouder <goneri@lebouder.net>
2019-09-03 23:52:33 -07:00
Toshio Kuratomi
0f55c2c04b [stable-2.9] Update the rpm spec file to include ansible-test
* Include ansible-test in a subpackage
* Sync with the ansible engine spec file
* Addresses https://github.com/ansible/ansible/issues/60380 to the
  extent that we're likely to fix that.
(cherry picked from commit 9be8a98)

Co-authored-by: Toshio Kuratomi <a.badger@gmail.com>
2019-09-03 21:59:29 -07:00
Wojciech Sciesinski
365acd0daa Correct indentation of the code in the example (#61622) (#61725) 2019-09-03 13:47:28 -05:00
Sam Doran
23ea477734 [stable-2.9] Increase unit test timeout to account for long image download times (#61717)
(cherry picked from commit c9e7a2122d)

Co-authored-by: Sam Doran <sdoran@redhat.com>
2019-09-03 10:11:38 -07:00
Sam Doran
53db5020b6 Update Fedora 29 test image
(cherry picked from commit 3d78dad84b)
2019-09-03 09:53:13 -07:00
Nathaniel Case
06220179e5 [stable-2.9] Avoid infinite recursion on login (#61617)
(cherry picked from commit d20d10b)

Co-authored-by: Nathaniel Case <ncase@redhat.com>
2019-09-03 09:48:27 -07:00
Felix Fontein
e9e8d2b5d6 Make sure postgresql tests are run for all postgres_* modules (#61647)
(cherry picked from commit 4d057e0331)
2019-09-03 09:44:37 -07:00
René Moser
bbf268c451 [stable-2.9] apt: honor cache_update=false on auto-install deps (#56549)
* apt: honor cache_update=false on auto-install deps
* add porting guide
(cherry picked from commit fd4ff54580)

Co-authored-by: Rene Moser <mail@renemoser.net>
2019-09-03 09:43:46 -07:00
Andrey Klychkov
a1715ee1b2 postgresql modules: explicit defaults for bool params (#61538) (#61679)
(cherry picked from commit a6d9401c88)
2019-09-03 11:38:10 -05:00
Sam Doran
dc5f369245 [stable-2.9] ansible-test - Continue if the git command returns an error (#61605)
* ansible-test - Contiune if the git command returns an error

* Just return stdout

* Use to_text() when displaying exception

* Add a message property to SubprocessError
(cherry picked from commit e218c98)

Co-authored-by: Sam Doran <sdoran@redhat.com>
2019-08-30 13:23:26 -07:00