Commit graph

47216 commits

Author SHA1 Message Date
Matt Clay
77c2139f7e [stable-2.9] Fix ansible-test pytest plugin loading. (#62119) (#62120)
* [stable-2.9] Fix ansible-test pytest plugin loading. (#62119)

* Avoid assertion rewriting in pytest plugins.

Adding PYTEST_DONT_REWRITE to the ansible-test pytest plugin docstrings disables assertion rewriting in pytest for those plugins.

This avoids warnings during test execution if the plugins are loaded multiple times (such as being imported within tests).

* Run ansible-test pytest plugins early.

The ansible-test pytest plugins need to load and run earlier than conftest modules.

To facilitate this, the pytest_configure function is run during loading, which works since they are loaded (but not always run) before conftest modules are loaded.

A check has also been added to the pytest_configure functions to prevent them from running multiple times in the same process.

* Load pytest plugins using an env var.

The -p command line option loads plugins before conftest, but only during collection.
The PYTEST_PLUGINS environment variable loads plugins before confest, both during collection and test execution.
(cherry picked from commit aaa6d2e)

Co-authored-by: Matt Clay <matt@mystile.com>

* Add missing changelog entry for ansible-test fix.

PR https://github.com/ansible/ansible/pull/62119 was missing a changelog entry.

(cherry picked from commit 6c78f02121)
2019-09-11 14:40:59 -07:00
Gonéri Le Bouder
e616ce1091 [stable-2.9] bump hcloud version to 1.4.1 (#62097)
* bump hcloud version to 1.4.1

`hcloud`<=1.4.0 has requirement `requests==2.20.0`. This prevents the
installation of the Vcenter Automation SDK which depends on `requests>=2.22.0`.

`hcloud` 1.4.1 does not have the problem: 8bff356efb
Bumping the dependency will resolve the issue.
(cherry picked from commit 0f52b18)

Co-authored-by: Gonéri Le Bouder <goneri@lebouder.net>
2019-09-11 14:25:14 -07:00
Ganesh Nalawade
6ecf17ee4d Return commands key instead of xml in result for junos rm (#62041)
Fixes https://github.com/ansible/ansible/issues/61773

*  Change `xml` key name to `commands` key to be in sync with
   other platform resource modules.

(cherry picked from commit ff53ca76b8)
2019-09-11 14:21:11 -07:00
Sandra McCann
6966f7ebe0 Minify ansible (#61792)
* make all comments special to survive minify
* minified css

(cherry picked from commit 7efaad711e)
2019-09-11 14:02:29 -07:00
Sandra McCann
507e9df69b Minify theme (#61734)
* moved most ansible edits out of theme.css
* remove unnecessary edit to theme.css
* replace with upstream minified theme.css for 0.4.3

(cherry picked from commit de826b437d)
2019-09-11 14:02:29 -07:00
Sandra McCann
631d07b8d5 fix width (#61619)
(cherry picked from commit 1d40d2b572)
2019-09-11 14:02:29 -07:00
chashtag
25905fc91a Update ovirt_vm.py (#62072)
Typo fix: "IDE" is not an acceptable choice for disk type, "ide" is a valid choice
(cherry picked from commit a3e9d14702)
2019-09-11 14:02:29 -07:00
createchange
d99025fe8e Update playbooks_prompts.rst (#62003)
Fixed typo: "wierd" > "weird"
(cherry picked from commit e3ea89801b)
2019-09-11 14:02:29 -07:00
Kevin Breit
10d5286bc2 meraki_organization - Add warning about organization deletion (#61886)
* meraki_organization - Add warning about organization deletion
The documentation is now more explicit about the ramifications of using `state: absent` in a task.
(cherry picked from commit 7d303e54f6)
2019-09-11 14:02:29 -07:00
Sebastián Estrella
2538bd83f4 Update unit tests requirements/units.txt path (#61656)
(cherry picked from commit 615f9949c0)
2019-09-11 14:02:29 -07:00
Christopher Engelhard
35109ed67e Add caution about handlers & import to Pitfalls (#61060)
* Add caution about handlers & import to Pitfalls on the playbooks_reuse page.
The fact that handlers lose their name: when using import_tasks:, while logical, is not intuitive and should be noted.
Co-Authored-By: Sandra McCann <samccann@redhat.com>

(cherry picked from commit 375eb9723a)
2019-09-11 14:02:29 -07:00
Yannis Ansermoz
8d5ded4cec Typo 'state:' net_lldp (#61543)
'state:' should be "absent" not "lldp"
(cherry picked from commit ce8af1c8c5)
2019-09-11 14:02:29 -07:00
Jordan Borean
f93068e49b Fix galaxy server reference in the docs (#61823)
(cherry picked from commit 2fbe4ca102)
2019-09-11 14:02:29 -07:00
Gabriel Suarez
321606b731 Add example of "parent_group" usage in aws_ec2.py (#60430)
##### SUMMARY
Looks like the "parent_group" option in "keyed_groups" is a very recent feature that is not being documented.
This pull request just adds a simple example of the usage of this useful feature.

##### ISSUE TYPE
- Docs Pull Request

+label: docsite_pr
(cherry picked from commit 411b208147)
2019-09-11 14:02:29 -07:00
Tahir Akhtar
0d02c8eb7a Clarity on mutual exclusion of Username and Token (#61668)
##### SUMMARY
Although there is an example showing that username is not required with personal access token, it will be nice to more clearly state in options description.
##### ISSUE TYPE
- Docs Pull Request

+label: docsite_pr
(cherry picked from commit 58acc8d082)
2019-09-11 14:01:52 -07:00
Yannis Ansermoz
d39cea4448 net_user documentation typo configured_password (#61556)
password -> configured_password in the last example
(cherry picked from commit bcbcac3bd8)
2019-09-11 14:01:52 -07:00
jotai73
b915a0c396 Update homebrew_cask example docs (#61637)
Changed homebrew_cask module flag from "allow_external_apps" to "accept_external_apps" in example section

(cherry picked from commit 447c7d9ff0)
2019-09-11 14:01:52 -07:00
Kevin Breit
6040b9f399 Docs - Add Meraki to platform option list (#61651)
(cherry picked from commit 54906a68fe)
2019-09-11 14:01:52 -07:00
Theo Ouzhinski
706558d66b grafana_plugin: update documentation (#60600)
(cherry picked from commit 9c1dc0ea7f)
2019-09-11 14:01:52 -07:00
Orion Poplawski
726dafac3d osx_defaults - doc tweaks (#60881)
* [osx_default] We are looking for the "defaults" executable, not "osx_defaults"

* [osx_default] Add example for setting system wide default

(cherry picked from commit a09b89f567)
2019-09-11 14:01:52 -07:00
Jeff Geerling
a8a7cc0e58 Fix documentation to reflect CLI usage for collections-path (#60164)
(cherry picked from commit f1180f3d3f)
2019-09-11 14:01:52 -07:00
Wojciech Sciesinski
d80de9d095 Remove unnecessary information (#61657)
(cherry picked from commit 4b9b5d3745)
2019-09-11 14:01:52 -07:00
Cristian Dascalu
ceec818314 Ecs taskdefinition secrets (#60112)
* adding specific examples for using environment and secrets in the container definition
(cherry picked from commit 47b9c5bf04)
2019-09-11 14:01:52 -07:00
Simon Legner
fba6fbb4b9 Fix typesetting of "GitLab" (#61702)
(cherry picked from commit 7dbd6116d8)
2019-09-11 14:01:52 -07:00
anshulbehl
cb4479d882 adding a collection local try section (#61626)
(cherry picked from commit bfaa29303b)
2019-09-11 14:01:52 -07:00
Andrey Klychkov
73f4acbd9f mysql_info: fix typo (#62067)
(cherry picked from commit e589e22b7e)
2019-09-11 12:33:50 -07:00
Andrey Klychkov
b109538a0f postgresql: fix typos in modules (#62065)
(cherry picked from commit 8b24fe1f0a)
2019-09-11 12:33:13 -07:00
Jordan Borean
886843807f Fix ansible-test coverage --all (#62115)
(cherry picked from commit 6fb1d56fdc)
2019-09-11 12:07:47 -07:00
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