Compare commits

...

1257 Commits

Author SHA1 Message Date
7db0dbee51 New release v2.9.25 2021-08-16 13:17:06 -04:00
d9a205f56e add known-good requirements for docs (#75459) 2021-08-11 09:05:13 -05:00
044279a28f Update Ansible release version to v2.9.25rc1.post0. 2021-08-10 11:44:25 -05:00
8e84e8dcb2 New release v2.9.25rc1 2021-08-10 09:35:22 -05:00
081a93caa3 [2.9] Fix dnf package matching (#75411) (#75416)
* Fix dnf package matching (#75411)

* Fix a bug with the dnf module not using all components of a package name when filtering to determine if it's installed

* changelog

* Simplify splitting on the last '.'

* Update lib/ansible/modules/dnf.py

(cherry picked from commit b541a148d5)

* Fix dnf test assertion

(cherry picked from commit 91a26ddcef)
2021-08-06 13:56:41 -07:00
e9bc474208 Allow to ignore rstcheck errors. (#75405)
(cherry picked from commit 46819a65fa)
2021-08-05 10:19:15 -07:00
cab637a733 [stable-2.9] allow env to override unspecified unsafe_writes (#73282) (#75397)
* [stable-2.9] allow env to override unspecified unsafe_writes (#73282)

* allow env var for fallback value for unspecified unsafe_writes.
(cherry picked from commit c7d4acc12f)

Co-authored-by: Brian Coca <bcoca@users.noreply.github.com>

* ensure unsafe writes fallback (#70722)

* Ensure we actually fallback to unsafe_writes when set to true

 add integration test
 add fix for get_url not passing the parameter from args

(cherry picked from commit 932ba36160)

* Added clog missing for issue 70722 (#73175)

(cherry picked from commit d6670da1d7)

Co-authored-by: Brian Coca <bcoca@users.noreply.github.com>
2021-08-04 15:37:49 -05:00
ae758749df restores delegated vars that were not passed (#74371) (#75347)
* restores delegatd vars that were not passed

   this will restore delegate display on callbacks using the vars
   also moves to use delegate_to directly on the default callback

* clog

(cherry picked from commit cbc83545582d8d7a718140263c465129e0e535d9)
(cherry picked from commit ed456f25f6)
2021-08-04 14:59:36 -05:00
626a8a29af Backport 2.9: Setup virtualization_facts - add RHV and oVirt type (#73903)
* Setup virtualization_facts - add RHV and oVirt type

* initialize sys_vendor only once

* add changelog

* Update 72876-setup-facts-add-redhat-vendor.yml

* Update linux.py

* Change only RHV virtualization_type

* Update 72876-setup-facts-add-redhat-vendor.yml
2021-08-04 14:47:13 -05:00
b2c1e26d4c Update Ansible release version to v2.9.24.post0. 2021-07-19 20:36:38 -05:00
d4c25c0f5b New release v2.9.24 2021-07-19 16:49:55 -05:00
c2abd9bbae Update Ansible release version to v2.9.24rc1.post0. 2021-07-13 03:07:10 -05:00
6d40655255 New release v2.9.24rc1 2021-07-13 00:30:47 -05:00
4e4f2a37f8 ansible-test: exposes tiny_prefix variable (#75130)
ansible-test aws provider now creates and exposes a new tiny_prefix
variable to provide a shorter prefix for the AWS tests.

(cherry picked from commit 5b8fb4dcd3)
2021-07-12 00:33:42 -05:00
9b20405210 [stable-2.9] Prevent ansible_failed_task from further templating (#74290) (#75220)
* Prevent ansible_failed_task from further templating
Fixes #74036
* Add changelog.
(cherry picked from commit 664531d7d6)

Co-authored-by: Martin Krizek <martin.krizek@gmail.com>
2021-07-09 10:48:30 -05:00
7a5c66fe14 [stable-2.9] Restrict packaging to < 21.0 for Python < 3.6. (#75186).
(cherry picked from commit 67bc49e001)

Co-authored-by: Felix Fontein <felix@fontein.de>
2021-07-07 12:47:36 -07:00
332ca6e298 [stable-2.9] Skip docker_container test when running in a container 2021-07-07 12:26:05 -07:00
b3fd2b5012 Skip broken test on OS X 2021-07-07 12:09:43 -07:00
60c03e8af4 Add constraints for new ruamel release (#75134)
Newer releases of ruamel.yaml and ruamel.yaml.clib require newer Python versions.
2021-06-28 14:25:52 -07:00
39cae91b02 collections_using.rst: add note that manual upgrade is required when installing collections from Galaxy (#75024) (#75027)
(cherry picked from commit 5df82415b5)
2021-06-24 13:37:59 -05:00
a4e9291f86 remove reference to container ML (#75014) (#75030)
(cherry picked from commit 2387ce311f)
2021-06-23 16:06:56 -05:00
0c895b2e22 Due to the takeover of freenode we're moving to a different irc network. (#74775) (#75007)
* Update channel references to point at the same channel name on libera.chat
* Update generic links to https://libera.chat
* In general, use irc.libera.net for link names/text and https://libera.chat for link targets.
  The irc service is hosted on irc.libera.chat but the project web server is hosted on
  libera.chat.
* Removed http://irc.freenode.net from the linkcheck exceptions.
* Add a link to where contributors should get support
for developing groups of modules to docs/docsite/rst/dev_guide/developing_modules_in_groups.rst

Co-authored-by: John R Barker <john@johnrbarker.com>
Co-authored-by: Felix Fontein <felix@fontein.de>
(cherry picked from commit 80e7e1a17c)

Co-authored-by: Toshio Kuratomi <a.badger@gmail.com>
2021-06-23 16:04:41 -05:00
6cb039a402 Update Ansible release version to v2.9.23.post0. 2021-06-22 02:52:36 -05:00
8016c034da New release v2.9.23 2021-06-22 00:19:11 -05:00
ba66bebcda Update Ansible release version to v2.9.23rc1.post0. 2021-06-14 22:15:31 -05:00
e26c8e3134 New release v2.9.23rc1 2021-06-14 17:45:33 -05:00
4acad228f0 [bp-2.9] firewalld: Ensure idempotency (#74992)
Fixes: https://github.com/ansible-collections/ansible.posix/issues/179

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2021-06-14 05:04:19 -05:00
8b17e5b922 fix unsafe preservation across newlines (#74960) (#74976)
CVE-2021-3583
  ensure we always have unsafe

Co-authored-by: Rick Elrod <rick@elrod.me>
(cherry picked from commit 4c8c40fd3d)
2021-06-11 16:43:30 -05:00
c49092fd29 Backport to fix missing initializing changed in net_get (#74805)
* Fixes #74802

Signed-off-by: Hideki Saito <saito@fgrep.org>
2021-06-11 11:33:16 -05:00
88eb0f1dfb Skip task for CentOS 8 as well (#74913)
Something change in the packages that was failing on RHEL
a few weeks ago. Now it is failing in CentOS 8 as well
2021-06-07 13:02:15 -05:00
0691475caf Workaround bug in jinja2-3.0.0 and 3.0.1 (#74795)
Jinja2-3.0.0 and 3.0.1 has a bug where undefined values cannot be
checked to see if they contain a value: https://github.com/pallets/jinja/issues/1448#issuecomment-846029509

We workaround this in two ways, either of which would be sufficient:
* Normalize the data so that choices is an empty iterable when it isn't
  specified in the documentation.  This is what antsibull-docs (and thus
  documentation builds on 2.10+) do.
* Change the logic in the template to check whether choices exists
  before checking containment.  This better expresses the logic at that
  point in the template (if there is a default value but there is not a
  list of choices, then display the default in its own string) so it's
  a good change to make as well.
2021-06-03 15:13:43 -05:00
d53fb60af3 Update Ansible release version to v2.9.22.post0. 2021-05-24 17:50:11 -05:00
dc9726fe6c New release v2.9.22 2021-05-24 14:38:26 -05:00
4f0e584ea4 [2.9] [tests] add websocket-client constraint, python 2 (#74750)
Change:
- websocket-client >= 1 requires python 3, so add constraint for python
  2.

Test Plan:
- ci_complete

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

* avoid a mysql_variables check on rhel 8

Signed-off-by: Rick Elrod <rick@elrod.me>
2021-05-21 13:13:04 -05:00
d1db5366a2 Update Ansible release version to v2.9.22rc1.post0. 2021-05-17 18:47:20 -05:00
a9518f8809 New release v2.9.22rc1 2021-05-17 17:00:51 -05:00
a2fabbe38b [stable-2.9] Use our own copy of the Codecov uploader (#74460) (#74493)
Due to the recent security incident, use our own copy hosted in S3
to mitigate future risk from running an arbitrary script downloaded from a
remote and untrtusted server.
(cherry picked from commit aa12af1d34)

Co-authored-by: Sam Doran <sdoran@redhat.com>
2021-05-16 21:48:10 -05:00
6fe7640fa5 [stable-2.9] Disable rabbitmq integration tests 2021-05-14 11:50:19 -07:00
c310830553 [stable-2.9] CI and compat fixes for Jinja2 >= 3.0 (#74666) (#74672)
* [stable-2.9] CI and compat fixes for Jinja2 >= 3.0 (#74666)

* Add constraint for MarkupSafe

MarkupSafe >= 2.0.0 requires Python >= 3.6.0. Add a constraint for older Python versions
and fix the `groupby_filter` test.

* Fix template_jinja2_latest test.

* patch filter decorators on newer Jinja2

* Jinja2 >= 3.0 renames several filter decorators used by Ansible itself, as well as by filters in collections. This patch ensures that the old names are usable within Ansible and by collections without warnings or errors.

* Ignore docs-build issues.

* Remove unnecessary ignore.

* Disable failing nuage_vspk test.

* Fix inventory_aws_conformance integration test.

(cherry picked from commit f99d024851)

Co-authored-by: Matt Clay <matt@mystile.com>
Co-authored-by: Matt Davis <mrd@redhat.com>.
Co-authored-by: Sam Doran <sdoran@redhat.com>
2021-05-12 12:50:12 -07:00
d8d20a2ff9 [stable-2.9] Fix ansible-test AZP build lookup.
(cherry picked from commit 877e5b3dfe)

Co-authored-by: Matt Clay <matt@mystile.com>
2021-05-04 10:13:37 -07:00
6afac6878c [stable-2.9] Remove obsolete Shippable specific scripts.
Also remove some other unncessary code from CI scripts..
(cherry picked from commit be7de9844e)

Co-authored-by: Matt Clay <matt@mystile.com>
2021-05-04 10:13:15 -07:00
93e2a52ce7 Product-related updates. (#74463) 2021-05-03 22:10:20 -05:00
44f24bce36 Update Ansible release version to v2.9.21.post0. 2021-05-03 22:03:14 -05:00
fb177b3878 shift a few CI groups [2.9] (#74553)
ci_complete

Signed-off-by: Rick Elrod <rick@elrod.me>
2021-05-03 20:20:03 -05:00
89f2208f40 New release v2.9.21 2021-05-03 14:29:20 -05:00
9380d74c02 [stable-2.9] incidental_setup_rabbitmq test - Use official repo for rabbitmq-erlang (#74453)
Previously it was hosted on bintray, but that service is shutting down on May 1. Using the new
repository also required using a newer version of RabbitMQ..
(cherry picked from commit 62cba4a6ad)

Co-authored-by: Sam Doran <sdoran@redhat.com>
2021-05-03 13:30:45 -05:00
1c641dd83d Update Ansible release version to v2.9.21rc1.post0. 2021-04-27 11:46:30 -05:00
2ce8dc65f3 New release v2.9.21rc1 2021-04-27 09:18:33 -05:00
14036d154d [stable-2.9] Fix pypi-test-container port conflict.
(cherry picked from commit cb7f4f1971)

Co-authored-by: Matt Clay <matt@mystile.com>
2021-04-26 23:00:29 -07:00
d4a3d6cd0a [ansible-test] Sync opensuse containers with 2.10 (#74436)
* [ansible-test] Sync opensuse containers with 2.10

Change:
- OpenSuSE 15.1 is now EOL
- Switch containers to use what 2.10 uses, which has 15.2.

Test Plan:
- ci_complete

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

* docker version

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

* needs p7zip-full, otherwise we only get 7zr

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

* Make sure py2 stays py2

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

* no wildcard?

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

* -x instead of --xml

Signed-off-by: Rick Elrod <rick@elrod.me>
2021-04-26 22:16:36 -07:00
e8c1c1d636 Actually run blocks/finalized_task test (#74291) (#74310)
(cherry picked from commit 7fecb7ccc3)
2021-04-26 10:08:05 -05:00
dfe3a4d345 [stable-2.9] Fix ansible-test docker container IP detection. (#74390)
(cherry picked from commit 14ff5e213c)

Co-authored-by: Matt Clay <matt@mystile.com>
2021-04-26 10:07:35 -05:00
4b23ac77e1 Disable failing hcloud_server test 2021-04-23 14:09:52 -07:00
473608521f Fix "canonical" typo in win_host examples (#74161) 2021-04-20 12:18:12 -05:00
f3087255ee Backports list of available versions to 2.9 for Ansible 3 (#74265) (#74321)
* updates list of available versions for Ansible 3 (#74265)

(cherry picked from commit 126e9244c2)

* oops, also need to update pointer to latest

Co-authored-by: Alicia Cozine <acozine@users.noreply.github.com>
2021-04-16 16:05:16 -05:00
a13f181fd1 [stable-2.9] Bump azure-pipelines-test-container to version 1.9.0
(cherry picked from commit 4819e9301b)

Co-authored-by: Alexander Sowitzki <asowitzk@redhat.com>
2021-04-13 11:21:47 -07:00
225709ca20 [stable-2.9] Switch to hashlib.sha256() for ansible-test (#72411) (#74170)
When FIPs mode is enable on centos-8, we are not able to load md5
functions.

Signed-off-by: Paul Belanger <pabelanger@redhat.com>
(cherry picked from commit a95213d2f5)

Co-authored-by: Paul Belanger <pabelanger@redhat.com>

Co-authored-by: Paul Belanger <pabelanger@redhat.com>
2021-04-12 20:57:02 -05:00
f4ec55b2d8 [stable-2.9] validate_modules: fails with .id attribute not found (#73322) (#74179)
* validate_modules: fails with .id attribute not found

This patch addresses a problem in the `found_try_except_import` test.

This module tries to identify lines like:

`HAS_FOO = True`

In this case, the target (`HAS_FOO`) is of type `ast.Name` and has a
`id` attribute which provide the name.

In my case, I've a line that set a module attribute`. In this case, the
target (`module.var`) has the type `ast.Attribute` and no `id`
attribute. The code trigger an `AttributeError` exception.

This patch ensures we compare a `ast.Name`.

* Update test/lib/ansible_test/_data/sanity/validate-modules/validate_modules/main.py

(cherry picked from commit 7cf80f50d1)
2021-04-12 20:56:50 -05:00
cc97479f9d [stable-2.9] ansible-test - ensure trailing separator is added for connection unit test target (#74176) (#74182)
For connection units tests, if the `__init__.py` file is modified, the trailing separator was
not added, making the target invalid.
(cherry picked from commit 7b79b69369)

Co-authored-by: Sam Doran <sdoran@redhat.com>
2021-04-12 20:56:12 -05:00
3155c8c26c [stable-2.9] Add PyPI proxy container for tests on Python 2.6.. (#74206)
(cherry picked from commit becf941673)

Co-authored-by: Matt Clay <matt@mystile.com>
2021-04-12 20:55:36 -05:00
a0cfde08cf Update Ansible release version to v2.9.20.post0. 2021-04-12 20:53:35 -05:00
d5f2ef4489 New release v2.9.20 2021-04-12 17:20:59 -05:00
910f4b79cc Update Ansible release version to v2.9.20rc1.post0. 2021-04-05 23:04:19 -05:00
470b3f59d2 New release v2.9.20rc1 2021-04-05 19:58:31 -05:00
fab9bf11b4 New AWS module mod_defaults - rds_option_group (_info) modules (#74098)
* * Add rds_option_group and rds_option_group_info to module_defaults

Signed-off-by: Alina Buzachis <abuzachis@redhat.com>

* changelog

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

Co-authored-by: Rick Elrod <rick@elrod.me>
2021-04-05 19:54:25 -05:00
6c471c4ce8 New AWS module mod_defaults - wafv2 modules (#73975)
* New AWS module mod_defaults - wafv2 modules

* changelog

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

Co-authored-by: Rick Elrod <rick@elrod.me>
2021-04-05 19:31:37 -05:00
042d8ef500 [stable-2.9] Fix: nmcli bridge-slave fails with error (#74125)
This commit fixes the error for adding bridge
slaves: nmcli bridge-slave returns "Error: invalid or not allowed setting 'bridge-port'

This fix is related to #42460, #54617, and #68065

* changelog
2021-04-05 18:08:34 -05:00
7b048c49a8 [backport/2.9] module_defaults: Add rds_snapshot (#74113)
* module_defaults: Add rds_snapshot

* changelog
2021-04-05 09:42:37 -05:00
0d668b6046 [stable-2.9] find - set proper default based on use_regex (#73961) (#73966)
When using "use_regex: yes" and setting an excludes: without
specifying a pattern: the existing code passes the file-glob '*' to
the regex matcher.  This results in an internal invalid-regex
exception being thrown.

This maintains the old semantics of a default match-all for pattern:
but switches the default to '.*' when use_regex is specified.

The code made sense as-is before excludes: was added (2.5).  In that
case, it made no sense to set use_regex but *not* set a pattern.
However, with excludes: it now makes sense to only want to exclude a
given regex but not specify a specific matching pattern.

Closes: #50067

* moved change to new location
added changelog

* Update lib/ansible/modules/find.py

Co-authored-by: Ian Wienand <iwienand@redhat.com>.
(cherry picked from commit 089d0a0508)

Co-authored-by: Brian Coca <bcoca@users.noreply.github.com>

* Update fix_find_default.yml

Co-authored-by: Rick Elrod <rick@elrod.me>
2021-04-05 00:09:42 -05:00
f8caa43dc7 add optional module_utils import support (#73832) (#73916)
Treat  core and collections module_utils imports nested within any Python block statement (eg, `try`, `if`) as optional. This allows Ansible modules to implement runtime fallback behavior for missing module_utils (eg from a newer version of ansible-core), where previously, the module payload builder would always fail when unable to locate a module_util (regardless of any runtime behavior the module may implement).

* sanity test fixes

ci_complete

(cherry-picked from 3e1f6484d7)
2021-04-04 21:16:27 -05:00
1592c8b0fd [stable-2.9] Ensure task from the worker is finalized/squashed (#73881) (#73929)
* Ensure task from the worker is finalized/squashed. Fixes #57399. Fixes #49942
(cherry picked from commit 832631b)

Co-authored-by: Matt Martz <matt@sivel.net>
2021-04-04 21:13:39 -05:00
f2d4f7344f Fix wrong backup directory var name in apt module (#73840) (#74003)
(cherry picked from commit 2bff120db6)
2021-04-04 21:04:24 -05:00
9052b0e7f2 [security] Add more missing no_logs (#74115)
Change:
- Add missing no_log on fields and subfields which should have it.
- Update several changelogs with CVE id.

Signed-off-by: Rick Elrod <rick@elrod.me>
2021-04-04 19:01:28 -05:00
aee69d714c Backport of https://github.com/ansible-collections/community.network/pull/223. (#73909) 2021-04-03 09:56:49 -05:00
de3c5561d8 Partial backport of community.aws/471 - no_log=True for aws_secret (#73874) 2021-04-03 09:55:35 -05:00
4fb24327a3 Backport of https://github.com/ansible-collections/community.general/pull/2018. (#73893) 2021-04-03 09:54:50 -05:00
7b7c219b3e Backport of https://github.com/ansible-collections/community.aws/pull/475. (#73894) 2021-04-03 09:54:21 -05:00
67281188b8 Backport of https://github.com/ansible-collections/community.docker/pull/103. (#73890) 2021-04-03 09:52:40 -05:00
7fa32b9b44 [stable-2.9] Fix ansible-test coverage exporting.
(cherry picked from commit b75844af45)
2021-03-30 18:19:57 -07:00
84e61b32f8 Ensure unit test paths for connection and inventory plugins are based on the context (#73877) 2021-03-19 08:44:27 -07:00
21eac8aba4 Move file needed by cs_volume test to S3
There is a bad mirror missing the file and it is causing tests to fail.
2021-03-17 13:35:32 -07:00
33a28f678d Update Ansible release version to v2.9.19.post0. 2021-03-15 19:54:13 -05:00
98cb6fe4eb New release v2.9.19 2021-03-15 17:37:20 -05:00
fb0a2b328e Update Ansible release version to v2.9.19rc1.post0. 2021-03-09 00:10:12 -06:00
49384aecdd New release v2.9.19rc1 2021-03-08 21:48:30 -06:00
08538ef0b1 New AWS module mod_defaults - iam_saml_federation (#73669) 2021-03-08 05:15:03 -06:00
a90e731cea New AWS module mod_defaults - ec2_vpc_endpoint_service_info (#73670) 2021-03-08 05:14:25 -06:00
d0703a8c7d Update mongodb replicaset check_compatibility function (#72299)
* Update check_compatibility function
2021-03-08 03:13:09 -06:00
fc1f44e794 Backport of https://github.com/ansible-collections/community.crypto/pull/180 to stable-2.9. (#73815) 2021-03-08 03:10:46 -06:00
68f32e43c1 Backport of https://github.com/ansible-collections/community.docker/pull/88 to stable-1. (#73816) 2021-03-08 03:07:46 -06:00
5855df4f0f Backport of bugfix parts of https://github.com/ansible-collections/community.docker/pull/87/ to stable-2.9. (#73817) 2021-03-08 03:05:08 -06:00
35c3b3d42d [stable-2.9] Add AlmaLinux to the family of Red Hat-like operating systems (#73541) (#73544)
* Add changelog and fixtures for AlmaLinux support

Co-authored-by: Christoph Schug <com+github@schug.net>.
(cherry picked from commit 2f5c83dfb1)

Co-authored-by: Sam Doran <sdoran@redhat.com>
2021-03-08 00:45:43 -06:00
4c503fe3b1 [stable-2.9] Don't treat host_pinned as lockstep (#73484) (#73513)
* [stable-2.9] Don't treat host_pinned as lockstep (#73484)

* Don't treat host_pinned as lockstep. Fixes #73364

* Add intg tests.
(cherry picked from commit d3f3784b86)

Co-authored-by: Matt Martz <matt@sivel.net>

* Make non-lockstep callback tests more deterministic (#73511)

(cherry picked from commit 125c220343)
2021-03-08 00:44:33 -06:00
fc4c154a8e Backport of 8702713ac3 (#73638) 2021-03-08 00:17:59 -06:00
58524e4096 [stable-2.9] Bump azure-pipelines-test-container to version 1.8.0 (#73550)
(cherry picked from commit c3e2bdd3a8)

Co-authored-by: Alexander Sowitzki <asowitzk@redhat.com>
2021-03-07 23:49:09 -06:00
cf53554cf5 [ansible-test] attempt to work around podman (#72096) (#73570)
Change:
- podman > 2 && < 2.2 does not support "images --format {{json .}}"
- podman also now outputs images JSON differently than docker
- Work around both of the above.

Test Plan:
- Tested with podman 2.0.6 in Fedora 31.

Signed-off-by: Rick Elrod <rick@elrod.me>
Co-authored-by: Sviatoslav Sydorenko <wk.cvs.github@sydorenko.org.ua>
(cherry picked from commit 0332046699)
2021-03-07 22:41:43 -06:00
462edf003e ansible-test: yamllint, check the assigment (#73584)
Ensure `yamllint`'s `check_assignment()` correctly ignore the
attribute assignment. Those don't have any `.id` attribute and will
trigger an `AttributeError` exception.

See: https://github.com/ansible/ansible/pull/73322
(cherry picked from commit 0a8d5c0983)
2021-03-07 22:38:05 -06:00
8493662b89 [stable-2.9] hostname - add Almalinux support (#73619) (#73649)
(cherry picked from commit ac0dedda72)

Co-authored-by: Aaron Guise <guisea@users.noreply.github.com>
2021-03-07 22:13:23 -06:00
0d20c829a2 [stable-2.9] Normalize ConfigParser between Python2 and Python3 (#73715) (#73724)
* [stable-2.9] Normalize ConfigParser between Python2 and Python3 (#73715)

* Normalize config parser between py2 and py3

* Add tests and changelog

* Use different config entry, since we supply certain env vars.
(cherry picked from commit 950ab74758)

Co-authored-by: Matt Martz <matt@sivel.net>
2021-03-07 22:12:17 -06:00
d3376f1b20 terraform: Remove line that is suppressing output being shown (#66322) (#73803)
* remove the line that is suppressing the output being shown when running
terraform from ansible
* Address #56934 and #57044
* added changelog for bug fix for missing terraform output

Co-authored-by: Ric de France <41117503+ric-man@users.noreply.github.com>
Co-authored-by: Adam <adam.lemanski@gmail.com>
2021-03-07 21:12:00 -06:00
5a9f4f7bb3 Move win_uri to a group that does not reboot the test instance
Another test in group3 reboots the test instance, killing the ssh connections
needed for access to the httptest container.

ci_complete
2021-03-01 13:35:41 -08:00
733704f97e Rebalance Windows test groups to avoid timeouts 2021-02-24 11:33:51 -08:00
55a3f2e1eb Update signing key used in incidental_setup_flatpak_remote tests
The original key was created using the default expiration time of two years.
Signed the repo again using a key that expires in twenty years.
2021-02-22 12:30:33 -08:00
67e0d9a481 [stable-2.9]:Fix IOSXR integration test (#73607)
* Fix integration testcase in netconf_config for iosxr
2021-02-22 09:58:18 -06:00
0d83804e8b Update Ansible release version to v2.9.18.post0. 2021-02-18 18:33:27 -06:00
4455e60166 New release v2.9.18 2021-02-18 15:02:47 -06:00
83fc193cb6 [mongodb tests] Wait for ports in TIME_WAIT (#73655)
Change:
- The latest mongodb we install causes processes to not die correctly
  (they end up as zombies), and this causes the ports they listen on to
  be held in TIME_WAIT. We need to wait for them to fall out of
  TIME_WAIT before we can continue and use them again.

Test Plan:
- CI
- Local playing in containers

Signed-off-by: Rick Elrod <rick@elrod.me>
2021-02-18 14:55:40 -06:00
b20547af70 Fix cryptography install in ansible-test.
This fix is based on https://github.com/ansible/ansible/pull/73530/
2021-02-18 11:44:48 -08:00
f5d61a4a0a New release v2.9.18 2021-02-17 16:14:40 -06:00
7a7f5a7006 Update Ansible release version to v2.9.18rc1.post0. 2021-02-08 23:06:27 -06:00
16ba79b5ac New release v2.9.18rc1 2021-02-08 19:05:25 -06:00
069311bff3 postgresql_query: fix datetime.timedelta type handling (#73520) 2021-02-07 00:09:26 -06:00
49ebd509df no_log mask suboption fallback values and defaults CVE-2021-20228 (#73487) (#73493)
(cherry picked from commit 0cdc410dce)
2021-02-07 00:07:56 -06:00
e9838486bd bugfix: use to_text(stdout) in psrp.Connection.put_file method (#73491) - 2.9 (#73495)
* bugfix: use to_text(stdout) in psrp.Connection.put_file method (#73491)

Co-authored-by: jakegatsby <jakegatsby@example.com>
(cherry picked from commit f271d02a9f)
2021-02-05 15:53:44 -06:00
d268891703 [setup_rpm_repo test] Ensure rpm-build is present (#73516) (#73515)
Change:
- Other targets might remove rpm-build as they clean up after
  themselves. Ensure that it's present in setup_rpm_repo because
  rpmfluff needs it.

Test Plan:
- Local experimentation with yum_repository and mysql_db (the latter of
  which depends on a handler which was removing rpm-build) on
  stable-2.9.

Signed-off-by: Rick Elrod <rick@elrod.me>
(cherry picked from commit aca5b0e43b)
2021-02-05 15:37:36 -06:00
10d81272b7 [bp-2.9] snmp_facts: Hide user sensitive information in console (#73188)
**SECURITY** - CVE-2021-20178

Hide user sensitive information like `privkey` and `authkey`
while logging in console.

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2021-02-05 14:51:11 -06:00
e3c08d001d [stable-2.9] pause - adjust warning when run in background (#73182) (#73230)
When the pause module is run in the background and seconds parameter is provided,
do not warn.

* Add tests
* Fix existing tests
  The test wasn't failing when it should have.
(cherry picked from commit 0e6c334115)

Co-authored-by: Sam Doran <sdoran@redhat.com>
2021-02-05 14:50:33 -06:00
3361517fa9 [stable-2.9] facts - properly report virtualization facts for Linux guests on bhyve (#73204). (#73234)
(cherry picked from commit df451636e7)

Co-authored-by: Sam Doran <sdoran@redhat.com>
2021-02-05 14:49:59 -06:00
4290d704b1 [bp-2.9] bitbucket_pipeline_variable: Hide secured values in console log (#73243)
**SECURITY** - CVE-2021-20180

Hide user sensitive information which is marked as ``secured``
while logging in console.

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2021-02-05 14:48:57 -06:00
2282325334 mysql_user: Add missed privileges support (#73271)
Co-authored-by: Andrew Klychkov <andrew.klychkov@gmail.com>
2021-02-05 14:47:09 -06:00
98973468da postgresql_ping, postgresql_info: fix crash related to PgSQL version parsing (#73285)
Co-authored-by: Andrew Klychkov <andrew.klychkov@gmail.com>
2021-02-05 13:22:02 -06:00
2b217c9c9b postgresql_set: Return a message when a passed parameter has not been found (#73286)
Co-authored-by: Andrew Klychkov <andrew.klychkov@gmail.com>
2021-02-05 12:48:21 -06:00
0435079477 [stable-2.9] Fix YAML error message when error is at the end of the file (#73241) (#73297)
If a YAML file fails to load due to a syntax error in a file, or there is an error in the last line of a
file, PyYAML reports the last line number of the file as the index where the error occurred.

When reading the file lines, we use that index to the get the relevant line.  If the index value is out
of range, the relevant line is lost for error reporting.

Subtract one from the index value to avoid the IndexError in this specific scenario. It is possible
to still get an IndexError, which will be handled as it is currently.

* Update existing tests and add new tests
(cherry picked from commit e8d4b62b41)

Co-authored-by: Sam Doran <sdoran@redhat.com>
2021-02-05 12:46:53 -06:00
65fdc41fb1 Local vars should have highest precedence in AnsibleJ2Vars (#72830) (#73369)
Ability to add local variables into AnsibleJ2Vars was added in
18a9eff11f to fix #6653. Local variables
are added using ``AnsibleJ2Vars.add_locals()`` method when creating a
new context - typically when including/importing a template with
context. For that use case local template variables created using
``set`` should override variables from higher contexts - either from the
play or any parent template, or both; Jinja behaves the same way.

Also removes AnsibleJ2Vars.extras instance variable which is not used.

Also adds missing test for #6653.

Fixes #72262
Fixes #72615

ci_complete

(cherry picked from commit a2af8432f3)
2021-02-05 12:43:16 -06:00
8e5aab4d76 Support large folder size comparisons for win_find (#58466) (#73382)
Changed [int] to [int64] to support larger folders. Otherwise module fails as soon as a large folder is encountered.

(cherry picked from commit 8def67939d)

Co-authored-by: joshinryz <josh.robinett@gmail.com>
2021-02-05 12:40:41 -06:00
6f4ea2f19e postgresql_query: fix decimal handling (#73414)
Co-authored-by: Andrew Klychkov <andrew.klychkov@gmail.com>
2021-02-05 11:39:15 -06:00
d8a82154d4 [2.9] Fix warning for nonexistent inventory cache (#72840) (#73444)
* Fix inventory cache warning by checking if the key exists before loading it

(cherry picked from commit 840bdc1e10)
2021-02-05 11:37:40 -06:00
96f8456680 no_log keycloak_client's registration_access_token (#73502)
Change:
- Address missing no_log change from #73489.

Tickets:
- Refs #73489

Signed-off-by: Rick Elrod <rick@elrod.me>
2021-02-05 11:31:32 -06:00
d74a1b1d13 [security] Add no_log to several module args (CVE-2021-20191) [2.9] (#73489)
Change:
- A number of modules were missing no_log=True where they should have
  had it.

Test Plan:
- Lots of grepping.

Tickets:
- Refs https://github.com/ansible-collections/community.general/pull/1725

Signed-off-by: Rick Elrod <rick@elrod.me>
2021-02-04 18:06:56 -06:00
474044b10d [stable-2.9] Make yum_repository test more reliable (#73467)
* Improve setup_rpm_repo

- add handlers to remove repos
- add variable to control whethere or not repos are created

* Use local repo for all distros
* Change repo creation script to module.
(cherry picked from commit 997b2d2a19)

Co-authored-by: Sam Doran <sdoran@redhat.com>
2021-02-03 23:01:21 -08:00
2d89114535 postgresql_user: add clarification about no_password_changes option (#73287)
Co-authored-by: Andrew Klychkov <andrew.klychkov@gmail.com>
2021-02-03 10:22:28 -06:00
d8ab39fbaa [stable-2.9] Use a versioned pip bootstrapper in ansible-test. (#73360)
(cherry picked from commit fc590aeb21)

Co-authored-by: Matt Clay <matt@mystile.com>
2021-01-25 15:37:51 -06:00
8d31c4426b [stable-2.9] Update ansible-test pylint Python support. (#72972) (#73355)
* [stable-2.9] Update ansible-test pylint Python support. (#72972)

* Update ansible-test pylint Python support.
* Python 3.8 is now officially supported.

(cherry picked from commit 37d09f2488)
2021-01-25 12:37:25 -08:00
7339b9d9cf [stable-2.9] Handle get-pip.py breaking change on Python 2.7.
(cherry picked from commit 484e4af4d0)

Co-authored-by: Matt Clay <matt@mystile.com>
2021-01-23 12:49:19 -08:00
b235ab4c71 Update Ansible release version to v2.9.17.post0. 2021-01-18 18:19:17 -06:00
5a34349348 New release v2.9.17 2021-01-18 14:26:14 -06:00
34043cff09 Revert "[2.9]update the docs requirements versions (#73108) (#73252)" (#73261)
This reverts commit 6ae2146d02.

Co-authored-by: Alicia Cozine <acozine@users.noreply.github.com>
2021-01-15 17:02:46 -06:00
6ae2146d02 [2.9]update the docs requirements versions (#73108) (#73252)
* update the docs requirements versions (#73108)

(cherry picked from commit 0936623901)

* remove antsibull
2021-01-15 13:10:29 -06:00
0eddabb3f5 Update Ansible release version to v2.9.17rc1.post0. 2021-01-11 21:28:11 -06:00
4f15b61c83 New release v2.9.17rc1 2021-01-11 17:37:31 -06:00
6065dfb291 [2.9] Pass the top level dictionaries to combine_vars (#72979) (#73147)
combine_vars uses dict.update() to replace keys

(cherry picked from commit 5e03e322de)

* Add tests for merging and replacing vars from inventory sources (#73181)

(cherry picked from commit 9de2da8a7e)
2021-01-11 17:26:21 -06:00
d65fa6878f Ensure that data within a tuple is marked as unsafe (#65918) (#73044)
* Use is_sequence, and Mapping throughout, add support for tuples. Fixes #65722
* Address tests
* Remove unused import
* Add changelog
* Add docstring for clarity

(cherry picked from commit f8654de851)
Co-authored-by: Matt Martz <matt@sivel.net>
2021-01-11 14:55:36 -06:00
65367b9721 [stable-2.9] user - properly handle password and password lock when used together (#73016) (#73178)
Do the right thing on Linux when password lock and a password hash are provided by writing
out the password hash prepended by the appropriate lock string rather than using -U and -L.
This is the correct way to set and lock the account in one command.

On BSD, run separate commands as appropriate since locking and setting the password cannot
be done in a single action.

FreeBSD requires running several commands to get the account in the desired state. As a result,
the rc, output, and error from all commands need to be combined and evaluated so an accurate
and complete summary can be given at the end of module execution.

* Improve integration tests to cover this scenario.
* Break up user integration tests into smaller files
* Properly lock account when creating a new account and password is supplied

* Simplify rc collection in FreeBSD class
  Since the _handle_lock() method was added, the rc would be set to None, which could make
  task change reporting incorrect. My first attempt to solve this used a set and was a bit too
  complicated. Simplify it my comparing the rc from _handle_lock() and the current value of rc.

* Improve the Linux password hash and locking behavior
  If password lock and hash are provided, set the hash and lock the account by using a password
  hash since -L cannot be used with -p.

* Ensure -U and -L are not combined with -p since they are mutually exclusive to usermod.

* Clarify password_lock behavior..
(cherry picked from commit 264e08f21a)

Co-authored-by: Sam Doran <sdoran@redhat.com>
2021-01-11 13:12:07 -06:00
7eb1703740 backport support for python-kubernetes v12 to ansible 2.9 (#72792)
Support for using python-kubernetes v12 has been added to the
new upstream repo:
https://github.com/ansible-collections/community.kubernetes/blob/main/plugins/module_utils/common.py#L256-L261
This PR backports that support to ansible 2.9
2021-01-10 16:32:04 -06:00
5a92beb575 Fix freeform actions with FQCN. (#72958) 2021-01-10 16:28:47 -06:00
11566eb131 [stable-2.9] Fix bigiq_device_info (#72943)
* fix iteration error with _transform_name_attribute function
* add information on BIG-IQ 7.x support
2021-01-10 16:27:12 -06:00
c73de6f0b3 [stable-2.9] Fix docker_image tests (#72953)
* Backport of https://github.com/ansible-collections/community.docker/pull/47 to stable-2.9.

* Also fix old-options.
2021-01-10 16:20:47 -06:00
77ae0819f9 Backport of 5eef093e99 (#73067) 2021-01-10 16:12:25 -06:00
f7ac5ea8d6 [stable-2.9] systemd - do not overwrite unit name when searching (#72985) (#73014)
* systemd - do not overwrite unit name when searching

PR #72702 introduced a bug that changed the unit name when splitting it up for the purpose
of searching for the unit. This only happens on unit file templates on systems that have a 5.8
or newer kernel and a version of systemd that does not contain a bugfix that causes systmed
to fail to parse dbus.

* Use facts rather than a manual probe to determine if systmed is present

* Remove unnecessary block

* Use vars files instead of set_fact

* Add tests for using a templated unit file

* Update changelog fragment

* Use template to get correct path to sleep binary

(cherry picked from commit 48803604cd)
2021-01-10 14:04:45 -06:00
98eb810f7d [stable-2.9] Remove exit code from traps in tests (#72969)
Having the trap exit with a specific code will override
the exit code that caused the trap to run, which could
mask errors
(cherry picked from commit 5157a92139)

Co-authored-by: Sam Doran <sdoran@redhat.com>
2021-01-10 13:58:25 -06:00
ead63f2021 [stable-2.9] Fix reset_connection paramiko, winrm, psrp (#72688) (#72926)
* Ensure we only reset the connection when one has been previously established. Fixes #65812

* Ensure psrp doesn't trace

* winrm too

(cherry picked from commit a3b6485073)

Co-authored-by: Matt Martz <matt@sivel.net>
2021-01-10 12:16:09 -06:00
c32371db56 [stable-2.9] Fix async interpreter parsing (#72636) (#72924)
* Fix async interpreter parsing. Fixes #70690
* Target localhost instead of remote host
* Don't forget inventory
* Address shellcheck issue
(cherry picked from commit 83764ad)

Co-authored-by: Matt Martz <matt@sivel.net>
2021-01-10 12:13:30 -06:00
cdcd2ed49a Support venv in ansible-test virtualenv scripts (#73164)
* ansible-test - prefer venv over virtualenv on Python 3 (#73000)

Also pin virtualenv to 16.7.10 for older Mac OS X systems. This was the version being installed
anway with the previous constraint (<20).

On systems with Python 3, now prefer venv over virtualenv. Test to see if venv is functional since
some systems have a non-functional venv installation (such as Debian).

(cherry picked from commit 850a77f639)
(cherry picked from commit a48b3d2089)

* Make the new ansible-test venv behavior opt-in

Co-authored-by: Sam Doooran <sdoran@redhat.com>
2021-01-08 16:31:04 -06:00
0f65b901f7 docker_image: always push, also when tagging is not necessary
Backport of 117f132213 (#73066)
2021-01-08 14:32:48 -06:00
95f65b9249 [stable-2.9] Fix string/bytestring comparsion in m_u.basic (#70439) (#73130)
Change:
- module_utils.basic.is_special_selinux_path() used a string ==
  bytestring comparison which returned False and made Ansible think that
  certain filesystems aren't, in fact, special-cased, when they should
  be. Ensure both sides of the == are bytestrings.

Test Plan:
- Added `copy` integration tests for this case.

Tickets:
- Fixes #70244

Signed-off-by: Rick Elrod <rick@elrod.me>.
(cherry picked from commit 688cd8657b)

Co-authored-by: Rick Elrod <rick@elrod.me>
2021-01-08 14:20:52 -06:00
b1f732d9f1 [stable-2.9] Update azure pipelines container
(cherry picked from commit 0eb1e22cd9)

Co-authored-by: Sam Doran <sdoran@redhat.com>
2021-01-08 09:41:40 -08:00
bb7c0326d8 [stable-2.9] Constrain pexpect and ptyprocess (#73109)
The recent update of ptyprocess to 0.7.0 is incompatible with Python 2.6 and
is causing test failures.

* Add setup_pexpect role to expect test
(cherry picked from commit 003a9e890d)

Co-authored-by: Sam Doooran <sdoran@redhat.com>
2021-01-04 13:55:07 -08:00
17effffad6 [stable-2.9] Add coverage exporting to ansible-test (#72982)
* Add `--venv-system-site-packages` to ansible-test.

(cherry picked from commit 934d6b235b)

Backport of https://github.com/ansible/ansible/pull/65615

* [stable-2.9] Add coverage exporting to ansible-test

A new `--export` option for `ansible-test coverage combine` allows multi-step aggregation of code coverage for CI pipelines..

(cherry picked from commit fa2be89cd4)

Backport of https://github.com/ansible/ansible/pull/72563
2020-12-15 22:32:33 -08:00
ee181545da [stable-2.9] Update Azure Pipelines scripts and config. (#72986)
* Increase fetch depth to reduce the frequency of full test runs for out-of-date PRs.
* Update scripts to match those which will be used in collections.
(cherry picked from commit 3274e02fd8)

Co-authored-by: Matt Clay <mclay@redhat.com>
2020-12-15 17:05:22 -08:00
8815b638ed Update Ansible release version to v2.9.16.post0. 2020-12-14 20:27:05 -06:00
10cb8d8788 New release v2.9.16 2020-12-14 14:59:38 -06:00
0b13ccacb6 Update Ansible release version to v2.9.16rc1.post0. 2020-12-08 09:22:54 -06:00
f9b89d9627 New release v2.9.16rc1 2020-12-07 19:20:56 -06:00
c4844e992c make collection callbacks follow normal flow (#59932) (#72228)
* make collection callbacks follow normal flow (#59932)

make collections whitelist follow normal flow

* fixes missing set_options call and adhoc and stdout processing rules
* avoid dupes
* fixed to handle redirects
* also updated tests with new and more accurate skip message
* fix callback tests for envs with cowsay installed
* lots MOAR comments on why the code is as it is, some todos to refactor in future

Co-authored-by: Matt Davis <nitzmahone@users.noreply.github.com>
(cherry picked from commit 5ec53f9db8)

* fixed bad merge

* hack in redirected names

* ensure we run additional calblacks
2020-12-07 17:28:27 -06:00
c2ca8317b7 Fix AIX networks facts when nestat is either missing or has incorrect permissions (#72516) (#72714)
* Added check for none on netstat_path variable

* Added changelog

(cherry picked from commit e879f12fb9)
2020-12-07 17:28:03 -06:00
ce52e6738c remove redundant remote_user for local setting (#72508)
* remove redundant remote_user for local setting

  local action plugin already does and this also should fix
  fork/thread issue by removing use of pwd library

  fixes #59642

(cherry picked from commit 488b9d6c35)

* ensure local exposes correct user (#72543)

* ensure local exposes correct user

  avoid corner case in which delegation relied on
  playcontext fallback which was removed

  fixes #72541

(cherry picked from commit aa4d53ccdf)
2020-12-07 17:24:32 -06:00
ff364b6541 Disable win_rds* tests in CI (#72890) 2020-12-07 16:44:20 -06:00
7c8b05b221 [stable-2.9] Remove shippable.yml. (#72883)
(cherry picked from commit 711064a073)

Co-authored-by: Matt Clay <matt@mystile.com>
2020-12-07 16:43:21 -06:00
ceea695163 [stable-2.9] Escalate priv before setting terminal (#72673)
* Try to escalate before on_open_shell to work around ios (#63571)

(cherry picked from commit 0cd2ad5880)

Add changelog

Signed-off-by: NilashishC <nilashishchakraborty8@gmail.com>
Co-authored-by: Nathaniel Case <ncase@redhat.com>
2020-12-07 16:32:07 -06:00
1706b71141 Fix virt module to support list_vms with a status of paused (#72056)
The docs state to use paused but the check_choice module only
accepts pause which doesn't list paused vm's.
2020-12-07 16:22:25 -06:00
8eaa7423d4 [2.9] [cloud_init_data_facts tests] fix for centos8 (#72886)
Change:
- `udev` is provided by `systemd-udev`, which our `state=present` check
  doesn't match. For now, work around this so we don't end up trying to
  upgrade all of systemd.
- In the future, we should discuss if the `yum` module does the right
  thing here.

Test Plan:
- Locally in docker
- CI

Signed-off-by: Rick Elrod <rick@elrod.me>
2020-12-07 15:50:53 -06:00
48d61848e9 cherry pick for issue ansible-collections/azure#161 from ansible-collections/azure for v2.9 (#71756) 2020-12-07 12:42:43 -06:00
10cc55c908 [stable-2.9] systemd - fix issue with capbpf and newer kernel (#72337) (#72348)
A bug existed in systemd 245 that did not properly handle unknown kernel
capabilities gracefully. This resulted in incomplete output when querying
for the service status. It is possible to get service status by other means.
This PR works around this issue by getting service status using other commands
in the event of a failure due to this bug.
(cherry picked from commit db84e2c989)

Co-authored-by: Sam Doran <sdoran@redhat.com>

* [stable-2.9] systemd - use list-unit-files rather than list-units (#72363)

list-unit-files will return all files on the system. list-units omits those
that are disabled.

Co-authored-by: Ken Dreyer <ktdreyer@ktdreyer.com>
(cherry picked from commit d6115887fa)

* systemd - account for templated unit files when searching for service (#72702)

Related to issue #71528 and PR #72337

Co-authored-by: Martin Polden <mpolden@mpolden.no>
(cherry picked from commit a788ea0132)
2020-12-07 11:49:47 -06:00
cc47d9cb41 [stable-2.9] wait_for - ignore psutil related errors (#72401) (#72407)
When enumerating connections with psutil, catch and ignore errors to avoid returning a stack trace.

Co-authored-by:  Matt Martz <matt@sivel.net>
(cherry picked from commit fb09fd2a23)
2020-12-07 11:40:28 -06:00
d12e82b94c [stable-2.9] ansible-test - skip installing PowerShell sanity test reqs if they are already installed (#72423) (#72425)
(cherry picked from commit 809d5fc398)

Co-authored-by: Jordan Borean <jborean93@gmail.com>
2020-12-07 11:36:53 -06:00
67108d8679 [stable-2.9] iptables: Reorder comment postition (#71496) (#72551) 2020-12-07 11:15:31 -06:00
23e6e7db85 lvol: Fix idempotency when size uses %VG or %PVS (#72569)
Change the behavior when using %VG or %PVS to make the `size_requested` an even
modulus of the VG's physical extents by rounding down.

This makes the usage of %VG or %PVS idempotent when the calculated
`size_requested` does not end on a physical extent boundary.

Co-authored-by: Felix Fontein <felix@fontein.de>
Co-authored-by: JuddTracy-DAS <38507478+JuddTracy-DAS@users.noreply.github.com>
2020-12-07 11:12:04 -06:00
1e228e157a ansible-galaxy - source deps from all servers and not just parent - 2.9 (#72683)
(cherry picked from commit fb092a82a1)

* Slight tweak to galaxy source selection (#72685)
(cherry picked from commit 18e5628b19)
2020-12-07 11:08:47 -06:00
2cd72a98de Backport amazon.aws/211 - use fail_json_aws instead of fail_json (already trying to pass exception) (#72772) 2020-12-07 11:04:09 -06:00
aa471096de [2.9] Fix missing ansible.builtin FQCNs in hardcoded action names (#72458)
* Fix missing ansible.builtin FQCNs in hardcoded action names (#71824)

* Make sure hard-coded action names also check for FQCN.
* Use _add_internal_fqcn() to avoid hardcoded lists and typoes.

(cherry picked from commit da60525610)

ci_complete

* Replace some more FQCNs.

(cherry picked from commit 72302dd611)

* Fix another case which was already fixed in stable-2.10.
2020-12-07 09:59:04 -06:00
f67b4e7695 ansible-doc: export has_action when --json is used (#72359) (#72416)
* ansible-doc: export has_action when --json is used.
* Remove docuri and now_data, which were not used resp. ignored in format_plugin_doc and the functions it calls anyway.
* Add function _combine_plugin_doc.

(cherry picked from commit 4fb336cef1)
2020-12-07 09:45:10 -06:00
74ec5ab6b5 [stable-2.9] pause - do not hang if run in the background (#72065) (#72606)
* Consolidate logic for determining whether or not session is interactive
  into a single function, is_interactive()
* Increase test coverage

I wasn't able to find a good way of simulating running a backgrounded test with CI since the
whole test is essentially run not in a TTY, which is similar enough to cause the new is_interactive()
function to always return false.
(cherry picked from commit 4b8cb6582b)

Co-authored-by: Sam Doran <sdoran@redhat.com>
2020-12-04 16:24:36 -06:00
ddf44ddd46 [stable-2.9] AnsibleModule.set_mode_if_different: handle symlink is in a sticky directory (#45198) (#72862)
* file: add symlink is in a sticky directory tests
* file: handle symlink in a sticky directory

The builtins import was removed since it was unused, but it is now needed.
(cherry picked from commit b464d18fd1)

Co-authored-by: Pilou <pierre-louis.bonicoli@libregerbil.fr>
Co-Authored-By: Sviatoslav Sydorenko <wk.cvs.github@sydorenko.org.ua>
2020-12-04 16:13:01 -06:00
9ba34dec35 ansible-test sanity: fix UnicodeDecodeError for --python 2.7 --docker (#72623) (#72866)
* Store target paths as unicode.

* Add changelog fragment.

(cherry picked from commit f94ba68d8f)
2020-12-04 16:10:57 -06:00
a4ba6ace01 Update ssh connection play_context alongside network_cli's (#72185)
Backport of https://github.com/ansible-collections/ansible.netcommon/pull/135

* Fix iosxr tests
2020-12-04 15:37:55 -06:00
903f2e267b Improve ansible-test classifications for collections (#72353)
(cherry picked from commit 64a809d2b6)
2020-12-03 17:27:44 -08:00
2c66c6297c [stable-2.9] Use AZP config for integration-aliases test.
No changelog entry since this test is limited to the ansible/ansible repo.

Backport of https://github.com/ansible/ansible/pull/72842
2020-12-03 16:17:25 -08:00
0b54f3e1ba [stable-2.9] Fix Azure Pipelines change detection. (#72824)
(cherry picked from commit 08842cd6bb)

Co-authored-by: Matt Clay <mclay@redhat.com>
2020-12-03 10:11:56 -08:00
82ba44871a fix resource name in aws_codepipeline too (#72825)
Signed-off-by: Rick Elrod <rick@elrod.me>
2020-12-03 02:13:17 -06:00
87662c5d59 Fix resource name. 2020-12-02 21:57:41 -08:00
fa3be76ff3 [stable-2.9] Fix CI schedule. 2020-12-02 20:49:16 -08:00
f328c0e259 Fix resource name length. 2020-12-02 20:18:43 -08:00
e10c0d11ff update build badge for AZP (#72807) (#72811)
(cherry picked from commit d567a553a9)
2020-12-02 17:27:55 -08:00
23cbd2a8f1 [stable-2.9] Azure Pipelines configuration. 2020-12-02 15:09:52 -08:00
d92820c2d5 [centos6] update container for EOL (#72797)
* [centos6] update container for EOL

Change:
- Reference:
  https://lists.centos.org/pipermail/centos-devel/2020-December/056208.html
- Bump centos6 container to 1.25.0

Test Plan:
- ci_complete

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

* update EPEL 6 too which is now archived

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

* bump to 1.26.0

Signed-off-by: Rick Elrod <rick@elrod.me>
2020-12-02 14:01:41 -08:00
0515895aa7 [stable-2.9] Pull images from Quay to avoid Docker Hub limits (#72698)
* Pull image from Quay to avoid Dockerhub limits

CI tests are failing in certain situations due to the new Docker Hub limits on anonymous pulls. Switch
to pulling an equivalent image from Quay.io.

* Use correct layer SHAs

* Use an image with enough older shas to do the test correctly

* Use images we control on Quay for testing

* Use correct SHA for new images

* Use images from a single repo in Quay but with tags

* Use correct nginx image

* Use correct tags in docker-registry test

* Fix incorrect image name in debug message

* Use our busybox image

* Little more alpine image cleanup
2020-12-01 17:05:24 -08:00
c90eea843b Add RHEL 7.9 (#72558) - 2.9 (#72567)
* Add RHEL 7.9 - ci_complete (#72558)

(cherry picked from commit d451433e5d)

* Added changelog for RHEL 7.9 (#72572)

(cherry picked from commit bdd0c48837)
2020-12-01 12:51:23 -08:00
a6f5060464 [zypper_repository test] Use repo that doesn't 404 (#72780)
Change:
- The repo we were testing with no longer seems to exist. Point to one
  that does.

Test Plan:
- local test in docker
- CI

Signed-off-by: Rick Elrod <rick@elrod.me>
2020-12-01 14:09:12 -06:00
f6635e3804 [stable-2.9] - ansible-test - add cryptography constraint for cffi (#72761)
The recently released version of cffi fails to install on systems with an older version of gcc. In
our case, this in the CentOS 6 test image. There is a fix but it has not yet been released.

https://foss.heptapod.net/pypy/cffi/-/issues/480
2020-12-01 10:32:09 -08:00
8a2f694715 Test pip fix (#72765)
(cherry picked from commit 2eb9795543)
2020-12-01 10:36:41 -06:00
4e0e0e5af0 Try to load action plugin from the same collection as the module (#66701) (#72409)
* Try to load network action plugin from the same collection as the module

* Alter tests to match

Just make sure the action plugin is as qualified as the module it is paired with

(cherry picked from commit 3dbc03d58a)

Co-authored-by: Nathaniel Case <ncase@redhat.com>
2020-11-30 14:13:34 -08:00
9816b141fe [stable-2.9] Fix super annoying Python 2.6 multiprocessing.Queue stack trace in CI (#72604) (#72609)
* Fix super annoying Python 2.6 multiprocessing.Queue stack trace in CI

A bug exists in Python 2.6 that sometimes raises an exception during interpreter shutdown. We
encounter this frequently in our CI since we run tests on CentOS 6 as the control node, which
has Python 2.6.6 with this bug.

This PR adds a very minor sleep only on Python 2.6 which gets around this issue. I did lot of testing
using a standalon script I found that easily duplicated the issue to find the minimum sleep value
needed to avoid this issue.

CPython issue: https://bugs.python.org/issue4106
Fix in CPython: https://hg.python.org/cpython/rev/d316315a8781

* Use correct attribute
(cherry picked from commit bbef250c2b)

Co-authored-by: Sam Doran <sdoran@redhat.com>
2020-11-20 13:10:41 -06:00
539e420b10 replace porting guides with stub pages - issue 71687 (#71988) (#72599)
(cherry picked from commit 5a3a2d1a39)
2020-11-13 14:35:54 -06:00
1837711d50 Improve config.rst formatting (#72354) (#72488)
* Indent Jinja2 directives.

* Show version_added and deprecations for ini settings and environment variables.

* Make default conditional, add choices. Copied from #55474.

* Add Ansible variables. Copied from #55474.

* Turn ini keys and environment variables into lists. Copied from #55474.

* Improve formatting. Copied from #55474.

(cherry picked from commit 569d937df8)
2020-11-13 14:32:21 -06:00
c73c5477e5 [stable-2.9] Fix container discovery for the acme test plugin.
(cherry picked from commit f022dedd0a)

Co-authored-by: Matt Clay <matt@mystile.com>
2020-11-09 15:30:15 -08:00
e78d9d97c8 [stable-2.9] [dnf] Some fixes around filtering (#72483) (#72501)
* [stable-2.9] [dnf] Some fixes around filtering (#72483)

Change:
- Docs: Add note that security/bugfix apply to dependencies too, like
  the dnf command.

- dnf: security/bugfix only makes sense for updates, so limit the
  package query sack to available updates.

- tests: Limit tests to our known-good test packages, so that RHEL
  packages marked security/bugfix without similarly marked dependencies
  don't fail our tests.

Test Plan:
- Tested with `dnf upgrade-minimal --bugfix` and reproduced the same
  error currently seen in CI, showing that we are consistent with what
  dnf does.

Tickets:
- Likely fixes #72316

Signed-off-by: Rick Elrod <rick@elrod.me>
(cherry picked from commit d8c637da37)

Co-authored-by: Rick Elrod <rick@elrod.me>

* Add changelog (#72502)

(cherry picked from commit b33d7e2e29)

Co-authored-by: Rick Elrod <rick@elrod.me>
2020-11-06 08:56:24 -06:00
d3db411c89 clarify upstream release status of 2.10 (#72269) (#72490)
* clarify upstream release status of 2.10

(cherry picked from commit d76f85208d)
2020-11-05 14:33:10 -06:00
6f29ab5203 [stable-2.9] Fix ansible-test tar format handling.
(cherry picked from commit 49d8d5ae33)

Co-authored-by: Matt Clay <matt@mystile.com>
2020-11-02 17:08:18 -08:00
69c3456865 Update Ansible release version to v2.9.15.post0. 2020-11-02 19:05:19 -06:00
9e58793835 New release v2.9.15 2020-11-02 15:23:54 -06:00
304f6b256c [stable-2.9] Update pip tests to omit install dev extras to avoid dep issues (#72436) (#72439)
(cherry picked from commit 2ee5af5)

Co-authored-by: Matt Martz <matt@sivel.net>
2020-11-02 11:05:56 -06:00
dea0bbc273 Update Ansible release version to v2.9.15rc1.post0. 2020-10-26 19:02:00 -05:00
f9bc656642 New release v2.9.15rc1 2020-10-26 14:22:29 -05:00
84aa943195 Remove ansible-galaxy login (#72288) (#72325)
* GitHub is removing the underlying API used to implement the `login` command. Since the general consensus seems to be that relatively nobody currently uses this command (in favor of explicit token passing), support was simply removed for interactive login. If a future need arises, this command should be reimplemented via OAuth Device Auth Grants.
* login or role login commands now produce a fatal error with a descriptive message
* updated 2.10 porting guide entry

* remove dead code/config, update messages and porting guides

(cherry picked from commit 83909bfa22)
2020-10-26 13:44:00 -05:00
7fe2a22f70 ansible-test ansible-doc sanity test: disable vars plugins for collections 2020-10-26 09:48:44 -07:00
04989ae052 Fix the reversed order of return values (#72088) (#72340)
AnsibleModule.run_command returns a tuple of return code, stdout and stderr.
The module main function of the user module expects user.create_user to
return a tuple of return code, stdout and stderr.
Fix the locations where stdout and stderr got reversed.

(cherry picked from commit e64ba97e8a)
2020-10-26 09:58:36 -05:00
b4eebe66d8 New AWS module mod_defaults (#72145)
To support this new module in CI, we need it to be in 2.9s mod_defaults
2020-10-23 15:59:05 -05:00
e7b2ba4ef6 postgresql_pg_hba: fix a crash when a new rule with an 'options' field replaces a rule without or vice versa (#72290) 2020-10-23 14:11:14 -05:00
2beeeb8a27 show installations/removals in check_mode (#70892)
Change:
- Previously, we only showed that something would have changed, not what
  would have changed. This allows us to show what will chang as well.

Test Plan:
- Local RHEL8 VM
- New integration tests

Tickets:
- Fixes #66132

Signed-off-by: Rick Elrod <rick@elrod.me>
2020-10-23 14:06:56 -05:00
49d5462f16 accumulate update filters (#71726)
Change:
- Previously when `security: true` and `bugfix: true` were both given,
  only security updates would get applied. Filters now accumulate so
  that both get applied in this case.

Test Plan:
- New integration tests for both check_mode and not. These tests make
  use of a contrived yum repository which is stored in S3.

Tickets:
- Fixes #70854

Signed-off-by: Rick Elrod <rick@elrod.me>
Co-authored-by: Matt Martz <matt@sivel.net>

Co-authored-by: Matt Martz <matt@sivel.net>
2020-10-23 14:06:56 -05:00
991272e53e Backport: ovirt_disk don't move disk when already in storage domain (#72194) 2020-10-23 14:05:05 -05:00
0eab1dcc00 Fix zfs snapshot handling on root zvols (#72254) 2020-10-23 13:59:19 -05:00
38baaee019 Fix race condition when creating async dir (#72069) (#72258)
* Fix race condition when creating async dir

* Simplify exception wrapper

* Remove var used for testing

(cherry picked from commit c9fa1d0e7e)
2020-10-23 13:57:45 -05:00
a33ae8b27f Fix issue with duplicate custom attribute names (#72058) 2020-10-23 13:52:24 -05:00
4ab20bdd76 [2.9] nmcli: Typecast parameter values to string as required (#72094)
Fixes: https://github.com/ansible-collections/community.general/issues/1023

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2020-10-23 13:49:19 -05:00
3d17393f61 user - allow local users with an expiry date to be created (#72022) (#72086)
The luseradd / lusermod commands do not support the -e option. Set
the expiry time in this case via lchage after the user was
created / modified.

Fixes: #71942

In Python3 math.floor returns an integer whereas Python2 returns a float.
Hence always convert the result of math.floor to an int to ensure that
lexpires is an integer.

Move local expires tests in a separate file and import the tasks to the
main.yml to keep main.yml smaller.

(cherry picked from commit a7170da851)
2020-10-23 13:01:24 -05:00
0cab929d2d [stable-2.9] Allow changed/failed mgmt on strategy actions (#70919) (#72118)
* Allow changed/failed mgmt on strategy actions.
(cherry picked from commit f9c3c6cba6)

Co-authored-by: Brian Coca <bcoca@users.noreply.github.com>
2020-10-23 12:59:56 -05:00
4a1555fb0a fix distribution fact for SLES4SAP (#71559) (#72029)
b6b238a fixed the SLES4SAP detection, which was at this time ok.
Sadly Suse changed with SLES 15 the /etc/os-release file, so the above
change will no longer work.

This commit updates the SLES4SAP detection regarding
https://www.suse.com/support/kb/doc/?id=000019341.

The symlink realpath is matched with endswith, because in SLES 12+ the
link target is SLES_SAP.prod, but in SLES 11 the link target is
SUSE_SLES_SAP.prod.

(cherry picked from commit ea119d3089)
2020-10-23 12:20:35 -05:00
30e735c4d8 [2.9] postgresql_privs: fix the module mistakes a procedure for a function (#72014)
* postgresql_privs: fix the module mistakes a procedure for a function

* Fix CI
2020-10-23 12:18:51 -05:00
7720cd239e powershell - remove env var (#72010) (#72011)
(cherry picked from commit 3c33618cf6)
2020-10-23 12:16:39 -05:00
8fc579061f [stable-2.9] [stable-2.10] Fix ansible-test handling of user-defined docker networks. (#72256)
* Fix ansible-test docker container detection.

* Attach test containers to the correct network.

* Do not assume `localhost` for accesing Docker.

* Look for containers on current network.

* Always map /var/run/docker.sock into containers.

This fixes issues when using a remote Docker host.

* Support container IP lookup from networks list.

* Fix container network attachment.

* Remove redundant container detection messages.

* Limit DOCKER_HOST parsing to TCP.

* Restore docker socket existence check.

The check is skipped if the docker hostname is not localhost.

* Correct changelog entry..
(cherry picked from commit 3c2e8b99be)

Co-authored-by: Matt Clay <mclay@redhat.com>.
(cherry picked from commit 6362232c30)

Co-authored-by: Matt Clay <mclay@redhat.com>
2020-10-22 21:40:48 -07:00
a02d29ea09 CI stability updates. (#72306)
* Avoid issues with user-defined docker networks.
* Increase CI timeout.
2020-10-22 16:56:41 -07:00
c54dc50bd7 [stable-2.9] Fix ansible-test Azure Pipelines container auth. (#72283)
(cherry picked from commit 2ef4b7e07e)

Co-authored-by: Matt Clay <matt@mystile.com>
2020-10-21 16:18:43 -05:00
7529d31ba9 [2.9] kubectl: Follow up fix in connection plugin (#72130)
PR #71535 broke, _build_exec_cmd API in kubectl connection
plugin.

Fixes: #72171

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2020-10-09 11:46:01 -05:00
b9fc07ef4e [stable-2.9] Support collection constraints in ansible-test. (#72158)
This allows collections to specify requirements and constraints for packages that ansible-test has requirements or constraints for..
(cherry picked from commit 5f76bd2af7)

Co-authored-by: Matt Clay <matt@mystile.com>
2020-10-08 16:17:19 -05:00
e9a98b6ca9 Update Ansible release version to v2.9.14.post0. 2020-10-05 18:55:29 -05:00
13c4090f97 New release v2.9.14 2020-10-05 15:56:02 -05:00
9a1ca02c8e [tests] Try re-enabling hcloud (#72033)
Change:
- See if they have fixed their issues yet.

Test Plan:
- CI

Signed-off-by: Rick Elrod <rick@elrod.me>
2020-10-01 12:52:43 -05:00
609667c7d4 [tests] --no-use-pep517 in kubevirt_conformance (#72015)
Change:
- This enables the inventory_kubevirt_conformance test to pass again on
  freebsd.
- This was due to a google-auth version bump. The dep chain looks like
  this: openshift -> kubernetes -> google-auth -> aiohttp -> multidict

Test Plan:
- ansible-test integration inventory_kubevirt_conformance --remote
  freebsd/12.0

Signed-off-by: Rick Elrod <rick@elrod.me>
2020-09-30 10:46:18 -05:00
7647d2fa89 Update Ansible release version to v2.9.14rc1.post0. 2020-09-28 14:51:16 -05:00
12ec871877 New release v2.9.14rc1 2020-09-28 12:15:15 -05:00
e68b222e40 add CVE ref to kubectl changelog fragment (#71986)
Signed-off-by: Rick Elrod <rick@elrod.me>
2020-09-28 12:12:29 -05:00
0dba2fe0dc [stable-2.9] CI provider fixes for ansible-test. (#71929) (#71933)
* Make Azure Pipelines resource_prefix lowercase.

* Make classification of CI files consistent.

* Update package-data sanity test for AZP.
(cherry picked from commit 92b66e3e31)

Co-authored-by: Matt Clay <mclay@redhat.com>
2020-09-28 11:20:35 -05:00
35333e127c Fix ansible-doc's plugin name retrieval for text output. (#71965) 2020-09-28 10:21:23 -05:00
3728530c9a [2.9] kubectl: redacted token and password from console log (#71535)
** SECURITY_FIX ** for CVE-2020-1753

kubectl connection plugin now redact kubectl_token and
kubectl_password from console log.

Fixes: ansible-collections/community.kubernetes#65

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2020-09-28 00:24:54 -05:00
f6ac5f1ce0 [2.9] cgroup_perf_recap: Check if user wants to write to files or not (#71527)
if user sets 'write_files' to False or does not set value, then
handle file write related operations.

Fixes: #64936

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
(cherry picked from commit e82b28a920)
2020-09-27 23:21:22 -05:00
d2b499eab1 [backport][2.9] vmware_guest: Add support for HW version 15 (vSphere 6.7U2) (#71565)
* vmware_guest: Add support for HW version 15 (vSphere 6.7U2)

* Update changelogs/fragments/71563-vmware_guest-support_hw_version_15.yml

Co-authored-by: Abhijeet Kasurde <akasurde@redhat.com>
2020-09-27 03:24:29 -05:00
7e8ecb2e58 psrp - fix hang when copying an empty file (#71649) (#71650)
(cherry picked from commit b615789fcc)
2020-09-27 03:23:30 -05:00
9d54f13ec1 Prevent templating unused variables for {%include%} (#68749)
Fixes #68699

(cherry picked from commit ff1ba39c8a)
2020-09-27 03:13:11 -05:00
a63baa3290 Provide more information in AnsibleUndefinedVariable (#71666) (#71877)
Fixes #55152

(cherry picked from commit 00b22ab55e)
2020-09-27 02:51:14 -05:00
3072e43909 Backport: ovirt_disk fix upload when direct upload fails (#71802)
ovirt_disk: fix upload when direct upload fails
2020-09-27 02:49:43 -05:00
f35fed441e interfaces_file: re.escape() old value
Backport of eb24b5707ee48c3186f771e3d5b1f04c9fba339f from community.general (https://github.com/ansible-collections/community.general/pull/873). (#71766)
2020-09-27 02:48:32 -05:00
5066ca696a runas - create new SYSTEM token on become (#71714) (#71750)
(cherry picked from commit fc08c1f3c5)
2020-09-27 02:40:42 -05:00
512f658335 postgresql_user: fix false positive warning for no_password_changes option (#71715) 2020-09-27 02:39:38 -05:00
c117af0df5 [tests] disable hcloud for now
Signed-off-by: Rick Elrod <rick@elrod.me>
2020-09-26 03:38:32 -05:00
a2548ccb6c [tests] Make setup_docker clean up better
Change:
- pip packages should get removed after, not try to add them again
- Try removing containerd.io package too
- Backport of #71949

Test Plan:
- CI
- ci_complete

Signed-off-by: Rick Elrod <rick@elrod.me>
2020-09-26 03:38:32 -05:00
34ec492da1 remove github link from plugins (#70951) (#71894)
(cherry picked from commit e28b20d729)
2020-09-25 09:44:22 -05:00
ace7f247f2 [docker_login] Fix changed status for newer docker
Change:
- Newer docker versions report the same message whether or not a logout
  actually happened.
- Determine change status from looking at the config instead if we can.
- This also allows us to restore check_mode in logout and re-enable that
  test.

Test Plan:
- CI, re-enabled tests

Tickets:
- Refs 6248f2fb6f

Signed-off-by: Rick Elrod <rick@elrod.me>
2020-09-24 13:13:35 -05:00
39fae9320c [incidental_setup_docker] changes to upstream repo (#71897)
Change:
- The docker-ce.repo file for centos does not work on RHEL since it uses
  $releasever and on RHEL that is, e.g., "7Server".
- Instead, set up the repo manually.
- Additionally, the docker centos8 repo no longer has old versions, so
  we use the (only) version in the repo instead.

Test Plan:
- CI

Signed-off-by: Rick Elrod <rick@elrod.me>
(cherry picked from commit 31ddca4c0d)
2020-09-24 13:13:35 -05:00
8b088b46dd update version switcher for 2.10 release (#71867)
(cherry picked from commit bf4e102d97)
2020-09-22 14:24:29 -05:00
61d383ef23 [stable-2.9] Fix attribute testing in file integration test. (#71843)
The file test will no longer attempt to test attributes if `lsattr -vd` does not work on the system under test.
(cherry picked from commit 17765cd4e8)

Co-authored-by: Matt Clay <mclay@redhat.com>
2020-09-21 15:06:31 -07:00
ef5f2c35ee [2.9] Redirect inventory script links (#71732) 2020-09-21 10:48:18 -05:00
582cf06501 [stable-2.9] openssl_privatekey test - Add pause for macOS (#71819)
The stat time granularity on macOS is one second. We recently upgrade
to faster macOS hosts, so some tests that run closely together to
see if something changed will have the same timestamp intermittently.
2020-09-18 15:18:13 -05:00
3e26c56edd [stable-2.9] incidental_setup_openssl - Pin version of Python packages (#71777)
A recent update to cffi that was yanked is still being installed on our
Mac OS X 10.11 test image since the version of pip there is very old and
does not ignore yanked packages.

Pin the version of pyOpenSSL and its dependencies to fix this and avoid
future spontaneous failures.
(cherry picked from commit 65cdb86c8a)

Co-authored-by: Sam Doran <sdoran@redhat.com>
2020-09-17 10:46:45 -05:00
ca6b9c4649 Backport documentation correction (#71632)
* Remove "mode: preserve" option from documentation #71486

(cherry picked from commit 7127d37466)
2020-09-09 11:46:53 -05:00
417e408f59 [stable-2.9] Backport ansible-test CI provider support. (#71614)
* Add encoding.py from devel to support backports.

* Add io.py from devel to support backports.

* Update ansible-test support for CI providers. (#69522)

Refactored CI provider code to simplify multiple provider support and addition of new providers.

(cherry picked from commit d8e0aadc0d)

* Add Shippable request signing to ansible-test. (#69526)

(cherry picked from commit e7c2eb519b)

* ansible-test local change detection: use --base-branch if specified (#69508)

(cherry picked from commit 43acd61901)

* Add Azure Pipelines support to ansible-test.

(cherry picked from commit 8ffaed00f8)

* Update ansible-test remote endpoint handling. (#71413)

* Request ansible-core-ci resources by provider.
* Remove obsolete us-east-2 CI endpoint.
* Add new --remote-endpoint option.
* Add warning for --remote-aws-region option.
* Update service endpoints.
* Allow non-standard remote stages.
* Add changelog fragment.

(cherry picked from commit d099591964)

* Fix ansible-test coverage traceback. (#71446)

* Add integration test for ansible-test coverage.

* Fix ansible-test coverage traceback.

* Fix coverage reporting on Python 2.6.

(cherry picked from commit f5b6df14ab)

* Use new endpoint for Parallels based instances.

(cherry picked from commit 98febab975)

* Add pause to avoid same mtime in test.

(cherry picked from commit 3d769f3a76)

Co-authored-by: Felix Fontein <felix@fontein.de>
2020-09-03 11:06:18 -05:00
4685fe5faa [docs] Fix up porting guides for CVE revert [2.9] (#71582)
Change:
- Fix up wording and do proper backports for porting guide entries.
- Remove original, non-backported version

Signed-off-by: Rick Elrod <rick@elrod.me>
(cherry picked from commit ed48a2dd62)
2020-09-01 19:02:56 -05:00
370ad5c7c6 Update Ansible release version to v2.9.13.post0. 2020-09-01 01:12:40 -05:00
acf1a7ba40 New release v2.9.13 2020-08-31 21:17:06 -05:00
15a77b4575 [tests] fix fallout from dnf gpg fix (#71551)
Change:
- Missed needed gpg ignores

Test Plan:
- CI
- ci_complete

Signed-off-by: Rick Elrod <rick@elrod.me>
2020-08-31 21:10:11 -05:00
7eec8e4d26 Re-add changelogs and add docs for CVE-2020-1736 reverts [2.9] (#71515)
Signed-off-by: Rick Elrod <rick@elrod.me>
2020-08-31 15:41:17 -05:00
dfaadf6f33 Fix inventory_kubevirt_conformance test (#71546) 2020-08-31 15:38:48 -05:00
1d043e082b [dnf] ensure packages are gpg-verified (#71540)
Change:
- By default the dnf API does not gpg-verify packages. This is a feature
  that is executed in its CLI code. It never made it into Ansible's
  usage of the API, so packages were previously not verified.
- This fixes CVE-2020-14365.

Test Plan:
- New integration tests

Signed-off-by: Rick Elrod <rick@elrod.me>
2020-08-31 10:05:38 -05:00
8e3b754710 powershell - fix nested CLIXML parser (#71412) - 2.9 (#71450)
* powershell - fix nested CLIXML parser (#71412)

(cherry picked from commit 8897d7e2ff)

* Remove test that shouldn't have been backported
2020-08-28 09:54:01 -07:00
ed57b0c565 psrp - use native copy mechanism - 2.9 (#71433)
* psrp - use native copy mechanism (#71409)

* psrp - use native copy mechanism

* Fix sanity issues

* Split the bugfix and deprecation into separate changelog fragments

(cherry picked from commit 985ba187b2)

* Remove deprecations for backport
2020-08-28 09:53:30 -07:00
fe72da80a4 powershell - fix quoting values (#71411) (#71448)
* powershell - fix quoting values

* Add ignore for smart quote skip

(cherry picked from commit 72a7cb4a2c)
2020-08-28 09:52:17 -07:00
084535470b Fix netconf validate capability check (#71195) (#71221)
*  Use ``:validate`` string to check if the netconf
   server supports validate capability as per netconf RFC

(cherry picked from commit 7635d23cee)
2020-08-27 12:20:16 -05:00
cb79d9c80d Update network integration auth timeout (#71057) (#71239)
* Update network integration auth timeout

* added changelog

Co-authored-by: Ganesh Nalawade <ganesh634@gmail.com>
2020-08-27 12:16:47 -05:00
f563365f8e Fix play stats when rescue block is a child block (#70922) (#71335)
* check run state of current block only

* Add changelog and test

* Add test for issue 29047

(cherry picked from commit f2f6c34632)
2020-08-27 12:14:47 -05:00
b6c7598a20 [2.9] Fix issue with MongoDB 4.0.20 (#71393)
Co-authored-by: Matt Davis <nitzmahone@users.noreply.github.com>
2020-08-27 12:13:41 -05:00
aa698ba9b6 Zabbix: Handle KeyError in zabbix_host module (#65392) (#71288)
Fixes: #65304
(cherry picked from commit 7b2cfdacd0)

Co-authored-by: sky-joker <sky.jokerxx@gmail.com>
2020-08-27 12:12:40 -05:00
36fbd2d9fd zabbix_proxy fix support for Zabbix 5.0 (#71290) 2020-08-27 12:11:27 -05:00
f42bd0ecdd [2.9] update example in known_hosts.py (#71418)
This addresses the issue reported in #71417
2020-08-27 11:51:15 -05:00
67fab726b9 Fix commit timeout failure issue for netconf modules (#71291)
Fixes https://github.com/ansible-collections/cisco.iosxr/issues/74

*  ncclient API expects commit timeout value in either unicode
   or bytes format, hence convert the timeout value explicitly
   to string type.
2020-08-27 11:10:46 -05:00
35d3ed5f10 [stable-2.9] Allow the TOML inventory to dump unsafe. Fixes #71307 (#71309) (#71318)
(cherry picked from commit 9da8801)

Co-authored-by: Matt Martz <matt@sivel.net>
2020-08-27 11:09:35 -05:00
48d99c0ff1 [stable-2.9] epoch can be a float with strftime filter. Fixes #71257 (#71314). (#71320)
(cherry picked from commit 6289570234)

Co-authored-by: Matt Martz <matt@sivel.net>
2020-08-27 11:09:05 -05:00
4a5aac0ac1 systemd - supports new systemctl output message for chroot (#71197) (#71329)
The message generated by systemctl has been updated in 9321e23c40, which requires a corresponding change in the systemd module.

In addition, this fixes the module when the SYSTEMD_OFFLINE environment variable is set.

(cherry picked from commit a1a50bb3cd)
2020-08-27 11:03:07 -05:00
8b269dbcce point all older release pages to devel (#71428) (#71470)
(cherry picked from commit 3be597419d)
2020-08-27 10:19:31 -05:00
d2d1b44d5c Partial backport of 60552 to fix ansible-collections/community.aws/198 (#71416) 2020-08-27 09:45:20 -05:00
d181bb0c8a Fix meta tasks used with --flush-cache (#71311) (#71359)
* Remove incorrect code

(cherry picked from commit 88bfc7977d)
2020-08-27 09:34:22 -05:00
553f28be01 setup - Add defensive null check in case bios date is null (#71452) 2020-08-27 09:17:27 -05:00
15f3426971 _check_failed_state: always use the current/nested state (#71347) (#71456)
Fixes #71306

(cherry picked from commit 9792d631b1)
2020-08-27 09:16:23 -05:00
6b4977e3f4 Backport cron module regression fix (#71244)
Change:
- Backport of #71207

Test Plan:
- CI

Tickets:
- Fixes #71213
- Fixes #71217
- Fixes #71216
- Fixes #71226
- Refs #71207

Signed-off-by: Rick Elrod <rick@elrod.me>
2020-08-27 09:12:27 -05:00
c87d3d6291 point all older release pages to devel (#71428) (#71430)
(cherry picked from commit 3be597419d)
2020-08-24 17:33:02 -05:00
7d61e47a0e [stable-2.9] tests: Use hg serve instead of bitbucket for hg (#71398)
* tests: Use `hg serve` instead of bitbucket for hg

Change:
- Uses `hg serve` instead of a bitbucket repo for hg tests
- bitbucket no longer serves hg

Test Plan:
- CI, fixed integration tests

Signed-off-by: Rick Elrod <rick@elrod.me>
2020-08-21 12:53:28 -05:00
7779137b71 [stable-2.9] disable mongodb_* tests, fix setup_mongodb (#71388)
* Disable mongodb_replicaset tests for now

Change:
- 4.0.20 breaks tests, disable for now

Test Plan:
- CI

Tickets:
- https://github.com/ansible-collections/community.mongodb/issues/136

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

* setup_mongodb: Nix RH package installation/removal

Change:
- Our RHEL and CentOS images make these unnecessary and they were
  broken.

Test Plan:
- CI

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

* Disable mongodb_shard tests for now

Change:
- 4.0.20 breaks tests, disable for now

Test Plan:
- CI

Tickets:
- https://github.com/ansible-collections/community.mongodb/issues/136

Signed-off-by: Rick Elrod <rick@elrod.me>
2020-08-21 04:53:24 -05:00
ca0f9b9e0f Add Fest banner (#71360) (#71362)
Adds Fest banner, with fixes; updates existing banners, adds links.

(cherry picked from commit 9be8d723da)
2020-08-19 16:08:06 -05:00
82182ee421 Adds fest link (#71241) (#71350)
* adds year-round link to AnsibleFest from the Ansible docs index page

Co-authored-by: Alicia Cozine <acozine@users.noreply.github.com>
(cherry picked from commit ae3b8eec12)
2020-08-19 10:20:05 -05:00
6123266c82 [stable-2.9] fix collection package root location under pytest >=6.0.0 (#70963).
(cherry picked from commit 86b6c4bbb6)

Co-authored-by: nitzmahone <nitzmahone@users.noreply.github.com>
2020-08-18 13:32:54 -07:00
a534d8dc74 [doc] Fix link to packet inventory files in 2.9 branch (#71206)
fixes #71203
2020-08-17 16:02:08 -05:00
ea8c219402 [stable-2.9] Revert "Change default file permissions so they are not world readable (#70221) (#70825)" (#71232)
This reverts commit 0199b1cf05.
2020-08-12 12:29:10 -05:00
0963154044 Update Ansible release version to v2.9.12.post0. 2020-08-10 22:55:08 -05:00
40091190b2 New release v2.9.12 2020-08-10 20:20:38 -05:00
a57e6172f7 Ensure -k is set to delegated hosts without a pass (#71136) - 2.9 (#71167)
* Ensure -k is set to delegated hosts without a pass (#71136)

* Ensure -k is set to delegated hosts without a pass

* Fix up some broken tests

* Update task_executor.py

one possible fix, the other is updating winrm to normalize on 'password' like the other connection plugins

* Add alias for winrm and fix incorrect assumption

* Make sure aliases are used for keyword options

* Conditionally run test if sshpass is present, fix sanity

Co-authored-by: Brian Coca <bcoca@users.noreply.github.com>
(cherry picked from commit 3f22f79e73)

* Backport subset of https://github.com/ansible/ansible/pull/69670
2020-08-10 20:17:09 -05:00
02be2a13db ansible-test: bump acme test container version to 2.0.0 (#71097) (#71166)
(cherry picked from commit 050841324c)
2020-08-10 19:31:41 -05:00
9cc782eebc [tests] pin docker to <4.3.0 (#71192)
Change:
- New python docker lib wants a newer docker than we have in CI.

Test Plan:
- CI

Signed-off-by: Rick Elrod <rick@elrod.me>
2020-08-10 18:21:10 -05:00
4a6a9acea8 dont clobber facts in loop (#71032) (#71096)
* dont clobber facts in loop

	fixes #71031

(cherry picked from commit f9af27c631)
2020-08-07 17:07:43 -05:00
6e8adc0526 reset logging to INFO (#70878) (#70882)
* reset logging to INFO (#70878)

- due to CVE-2019-14846
 - also added comments and test to avoid 'oportunistic' reversion

(cherry picked from commit 1223ce656a)

* Update keep_log_at_info.yml

Co-authored-by: Rick Elrod <rick@elrod.me>
2020-08-07 17:04:27 -05:00
44cca5426f [2.9] template connection variables accessed directly before using (#70657) (#70689)
* template connection variables accessed directly before using (#70657)

* template variables accessed directly when using them instead of FieldAttributes

(cherry picked from commit 8c213c9334)

* changelog
2020-08-07 15:49:17 -05:00
f8e4c103e9 Fix UnboundLocalError on net_put (#71086) 2020-08-07 15:38:18 -05:00
e859a2b4e5 ipa module utils can not handle HA FreeIPA with Python3 #71110 (#71112)
* BUGFIX 2.9 ipa module utils can not handle HA FreeIPA with Python3

* Resolve comments on other PR
2020-08-07 15:36:06 -05:00
aa58d8c9ed [2.9] hashi_vault: Handle equal sign in secret name value (#70169)
Fixes: ansible/ansible#55658

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2020-08-07 15:32:16 -05:00
bdcde11f9f 2.9: Detect failure in always block after rescue (#70094) (#70203)
* Detect failure in always block after rescue (#70094)

* Detect failure in always block after rescue

Fixes #70000

ci_complete

* Add more tests

(cherry picked from commit 0ed5b77377)

* add changelog

Co-authored-by: Matt Davis <mrd@redhat.com>
2020-08-07 15:30:41 -05:00
9ba99ead4f Update integration tests to support rpmfluff-0.6 (#71155) (#71160)
Co-authored-by: Matt Martz <matt@sivel.net>
2020-08-07 14:52:23 -05:00
90334b1ddd Backport: ovirt_vm fix cd attachment (#70932)
* Backport: ovirt_vm fix cd attachment

* add changelog

* fix formats

* Update changelogs/fragments/70932-ovirt_vm-fix-cd_iso-search.yml

Co-authored-by: Rick Elrod <rick@elrod.me>
2020-08-07 13:00:42 -05:00
c632d74487 mysql_user: fix overriding user passowrd to the same (#70833) 2020-08-07 13:00:26 -05:00
1b41129402 Allow hostvars delegation (#70331) (#70811)
* Allow hostvars delegation (#70331)

* ensure hostvars are available on delegation
* also inventory_hostname must point to current host and not delegated one
* fix get_connection since it was still mixing original host vars and delegated ones
* also return connection vars for delegation and non delegation alike
* add test to ensure we have expected usage when directly assigning for non delegated host

(cherry picked from commit 84adaba6f5)

* avoid returning more data

* remove unused return vars
2020-08-07 12:59:41 -05:00
66faa29b79 Add CVE reference to changelog for PR 70762 (#71151) (#71153)
Co-authored-by: David Shrewsbury <Shrews@users.noreply.github.com>
2020-08-07 11:12:56 -05:00
523d0f5665 [stable-2.9] cron - Allow non-ascii (UTF-8) chars in cron file paths and jobs (#70426) (#71134)
* Encode/Decode files in UTF-8
* Use helper function in ansible
* Add an integration test
* Use emoji in test data.
* add changelog
* Also support non-ascii chars in filepath and add tests about this.
* Also use non-ascii chars in replaced text and ensure not to break cron syntax.
* rename self.existing to self.n_existing
* rename crontab.existing to crontab.n_existing.
(cherry picked from commit 5ce47646ad)

Co-authored-by: psi / Ryo Hirafuji <ryo.hirafuji@link-u.co.jp>

* try removing name references for state=absent

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

Co-authored-by: psi / Ryo Hirafuji <ryo.hirafuji@link-u.co.jp>
Co-authored-by: Rick Elrod <rick@elrod.me>
2020-08-06 20:12:43 -05:00
0199b1cf05 [stable-2.9] Change default file permissions so they are not world readable (#70221) (#70825)
* [stable-2.9] Change default file permissions so they are not world readable (#70221)

* Change default file permissions so they are not world readable

CVE-2020-1736

Set the default permissions for files we create with atomic_move() to 0o0660. Track
which files we create that did not exist and warn if the module supports 'mode'
and it was not specified and the module did not call set_mode_if_different(). This allows the user to take action and specify a mode rather than using the defaults.

A code audit is needed to find all instances of modules that call atomic_move()
but do not call set_mode_if_different(). The findings need to be documented in
a changelog since we are not warning. Warning in those instances would be frustrating
to the user since they have no way to change the module code.

- use a set for storing list of created files
- just check the argument spac and params rather than using another property
- improve the warning message to include the default permissions.
(cherry picked from commit 5260527c4a)

Co-authored-by: Sam Doran <sdoran@redhat.com>

* Fix jboss test

* Fix lamdba_policy test

* Fix aws_lamdba test

* Fix warning for new default permissions when mode is not specified (#70976)

Follow up to #70221
Related to #67794
CVE-2020-1736

When set_mode_if_different() is called with mode of 'None', ensure we issue
a warning about the change in default permissions.

Add integration tests to ensure the warning works properly.

* Fix tests
- actually use custom module 🤦‍♂️
- verify file permission on created files
- use remote_tmp_dir so we're ready for split controller
- improve test module so we can skip the call to set_fs_attributes_if_different()
- fix tests for CentOS 6

(cherry-picked from commit dc79528cc6)

* Use new category in changelog fragments
2020-08-06 19:23:47 -05:00
6cae9a4b16 copy - redact 'content' from invocation in check mode (#71033) (#71068)
* sanitize copy module invocation secrets in check mode

(cherry picked from commit 991714b9d1)
2020-08-06 19:23:03 -05:00
59c9a1833e [2.9] api: time.clock compatible code (#70678)
time.clock is removed in Python 3.8. Add time.clock
compatible code.

Fixes: #70649

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
(cherry picked from commit 055871cbb8)
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2020-08-06 18:50:03 -05:00
bc378ae643 Warning banner should only show on /devel/ docs, not on pages with 'devel' in their titles (#70849) (#71076)
* banner should not be placed on pages with 'devel' in their titles

* Update docs/docsite/_themes/sphinx_rtd_theme/ansible_banner.html

* Only match paths at the beginning

Co-authored-by: Alicia Cozine <acozine@users.noreply.github.com>
Co-authored-by: Sviatoslav Sydorenko <webknjaz@redhat.com>
(cherry picked from commit 8313cc8fb1)
2020-08-06 18:48:36 -05:00
fba387fd64 [stable-2.9] Drop "rhui-" prefix from RHEL repositories in AMI (#71130) (#71132)
The repository names seem to have changed and no longer have the "rhui-" prefix.
(cherry picked from commit 6ac4439a6a)

Co-authored-by: Sam Doran <sdoran@redhat.com>
2020-08-06 17:07:49 -05:00
c3ac896c16 Update 70762 changelog to use security_fixes (#71124) (#71128)
(cherry picked from commit 6bf1dd428b)
2020-08-06 16:24:40 -05:00
84afa8e90c Fix missing quoting for remote_tmp in second mkdir of shell module. Issue #69577 (#69578) (#70758)
* Fix missing quoting for remote_tmp in second mkdir of shell module. Issue #69577

* adding changelog

* fixing typo in changelog entry

* adding test case

Adding test case written by bmillemayhias.

* using $HOME instead of ~

* fixing commit measage

* Update 69578-shell-remote_tmp-quoting.yaml

Co-authored-by: Brian Kohles <me@briankohles.com>
(cherry picked from commit 77d0effcc5)

Co-authored-by: Brian Kohles <briankohles@users.noreply.github.com>
2020-08-06 15:57:57 -05:00
76f591e64c [2.9] debconf: add a note about no_log usage (#70754)
debconf module exposes sensitive information to logs, console.
Add a note to user about using no_log=True to hide such
information from console.

Fixes: #32386

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
(cherry picked from commit 84b4387702)
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2020-08-06 15:54:40 -05:00
46a0e849ed [stable-2.9] Handle Slackware OS version strings containing a plus (“+”) (#68142) (#70718)
A couple of years ago Slackware -current began using a plus (“+”) at the end of the distribution version string to indicate a future version work-in-progress.

Rearrange distribution_files unit tests to easily support more tests
  - add conftest with common fixtures
  - use parametrize for testing multiple scenarios

* Add changelog
* Add unit tests for Slackware distribution parsing
* Use correct fixtures for Slackware
Data comes from /etc/slackware-version

Co-authored-by: Sam Doran <sdoran@redhat.com>
Co-authored-by: <Eduard Rozenberg <eduardr@pobox.com>>.
(cherry picked from commit 566c5e6ce1)

Co-authored-by: Eduard Rozenberg <2648417+edrozenberg@users.noreply.github.com>

Co-authored-by: Eduard Rozenberg <2648417+edrozenberg@users.noreply.github.com>
2020-08-06 15:42:55 -05:00
e5609db342 [backport][2.9][PR #70446] Refactor Python API examples and docs (#70851)
* Add boilerplate snippet into `examples/`

It is a partial backport of #70224

(partially cherry picked from commit 4816bb4f43)

* Refactor Python API examples and docs

PR #70446: it's a follow-up for #70445.

It includes a merge of `examples/scripts/uptime.py` and a similar
code snippet from `docs/docsite/rst/dev_guide/developing_api.rst`.

This patch also changes the docs RST file to include contents of
the example file instead of holding a copy of a similar code.

(cherry picked from commit 20bb915092)
2020-08-06 15:08:03 -05:00
e55565e951 Create home and parent directories only when requested (#70789)
The home user and the parents directories should only be created when
create_home == True

(cherry picked from commit f3dd8d3052)
2020-08-06 13:33:02 -05:00
7833053223 [2.9] basic: use PollSelector implementation (#70801)
Some platform such as ESXi does not implement EpollSelector,
which is selected by DefaultSelector. Use PollSelector which is
based upon 'Poll' implementation. This works perfectly with
a platform like VMware ESXi.

Fixes: #70238

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
(cherry picked from commit 8cccede0d4)
2020-08-06 13:13:10 -05:00
f7aff6b888 [stable-2.9] Document existing ansi_re sequences and add ESC[m (#70683) (#70808)
* Document existing ansi_re sequences and add `ESC[m`

* Add changelog
(cherry picked from commit 06a4fc2)

Co-authored-by: Nathaniel Case <ncase@redhat.com>
2020-08-06 13:00:43 -05:00
3fe5da947b Fix the internal Python API usage examples (#70842)
Previous version initialized the `TaskQueueManager` after calling
`Play.load()` while advertising a way to inject a custom library
location path. This caused the tasks loader not to find any custom
modules because it was triggered before the path was actually added
to the module loader.

This patch changes the order of the operations to ensure that the
customized `context.CLIARGS` actually influences things.

Resolves https://github.com/ansible/ansible/issues/69758.

(cherry picked from commit 8d97c8c222)
2020-08-06 12:50:04 -05:00
78592ffd68 profile_tasks: typecast result before slicing it (#70835)
Backport of https://github.com/ansible-collections/ansible.posix/pull/15

Fixes: #59059

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2020-08-06 12:47:04 -05:00
76815d3afc Sanitize URI module keys with no_log values (#70762) (#70821)
* Add sanitize_keys() to module_utils.

* More robust tests

* Revert 69653 change

* Allow list or dict

* fix pep8

* Sanitize lists within dict values

* words

* First pass at uri module

* Fix insane sanity tests

* fix integration tests

* Add changelog

* Remove unit test introduced in 69653

* Add ignore_keys param

* Sanitize all-the-things

* Ignore '_ansible*' keys

* cleanup

* Use module.no_log_values

* Avoid deep recursion issues by using deferred removal structure.

* Nit cleanups

* Add doc blurb

* spelling

* ci_complete

(cherry picked from commit bf98f031f3)
2020-08-06 12:39:52 -05:00
3735d71b5e Add ansible-releases@redhat.com to announce template (#70814)
Signed-off-by: Rick Elrod <rick@elrod.me>
2020-08-06 12:38:42 -05:00
2a38a6cca6 [stable-2.9] reboot - fix Void Linux (#70704) (#70917)
Add entry for appropriate commands for Void Linux
(cherry picked from commit 4cc4cebc97)

Co-authored-by: fosslinux <fosslinux@aussies.space>
2020-08-06 12:33:34 -05:00
8870ea5b8c fix error decoding Redfish response payloads on Python 3.5 (#70924) 2020-08-06 12:32:24 -05:00
435d0feae1 [stable-2.9] lineinfile - fix broken exception handling (#70846) (#70945)
* prevent (ExceptionType) is not subscriptable errors
* tweak error message and use text conversion
* add to_text import
(cherry picked from commit 45c2eb6c0a)

Co-authored-by: nitzmahone <nitzmahone@users.noreply.github.com>

Co-authored-by: Matt Davis <nitzmahone@users.noreply.github.com>
2020-08-06 12:27:35 -05:00
74d5391f73 ansible-galaxy - fix fallback for AH searches (#70957) (#70983)
(cherry picked from commit b1cb2553af)
2020-08-06 12:26:42 -05:00
c37acc7740 [stable-2.9] Fix ansible-test relative import analysis. (#70994)
(cherry picked from commit 2e0097ada3)

Co-authored-by: Matt Clay <matt@mystile.com>
2020-08-06 12:25:45 -05:00
59a409193d [stable-2.9] facts - fix incorrect time for some date_time_facts (#70665) (#70997)
* [stable-2.9] facts - fix incorrect time for some date_time_facts (#70665)

The iso8601_micro and iso8601 facts incorrectly called now.utcnow(), resulting
in a new timestamp at the time it was called, not a conversion of the previously
stored timestamp.

Correct this by capturing the UTC timestamp once then calculating the local
time using the UTC offset of the current system.

* Use time.time() for getting the current time
* Convert from that stored epoch timestamp to local and UTC times
* Used existing timestamp for epoch time
* Add unit tests that validate the formate of the return value rather than an exact value since mocking time and timezone is non-trivial
(cherry picked from commit c4f442ed5a)

Co-authored-by: Sam Doran <sdoran@redhat.com>

* Remove tests for tz_dst since that fact only exists in newer versions
2020-08-06 12:24:54 -05:00
87364a3286 nxos_user: Do not fail when a custom role is used (#71054)
(https://github.com/ansible-collections/cisco.nxos/pull/130)

Reviewed-by: https://github.com/apps/ansible-zuul
Signed-off-by: NilashishC <nilashishchakraborty8@gmail.com>
2020-08-06 12:22:29 -05:00
0399960e34 [stable-2.9] unarchive - Check 'fut_gid' against 'run_gid' in addition to supplemental groups (#65666) (#71002)
* [stable-2.9] unarchive - Check 'fut_gid' against 'run_gid' in addition to supplemental groups (#65666)

Add integration tests for unarchiving as unprivileged user
Break tasks into separate files for easier reading and maintenance

Create a user by specifying a default group of 'staff' for macOS.

The user module does not actually remove the user directory on macOS,
so explicitly remove it.

Put the removal tasks in an always block to ensure they always run

Co-authored-by: Philip Douglass <philip.douglass@amadeus.com>
Co-authored-by: Sam Doran <sdoran@redhat.com>.
(cherry picked from commit ac5f3f8bef)

Co-authored-by: Philip Douglass <philip@philipdouglass.com>

* [stable-2.9] Fix unstable unarchive test (#71004)

* Add mode to copy tasks
* Fix unreliable test by ignoring errors

(cherry picked from commit f99f96ceb6)

Co-authored-by: Philip Douglass <philip@philipdouglass.com>
2020-08-06 11:37:56 -05:00
4f732c9ce9 Emit proper error for x in y when y is undefined (#70990) (#71012)
Fixes #70984

(cherry picked from commit bf7276a4e8)
2020-08-06 11:32:40 -05:00
0ecb2abf43 [stable-2.9] linux facts - return proper broadcast address (#64528) (#71065)
* linux facts - return proper broadcast address

Check that the value being returned is actually a broadcast address

* Add tests

* Cleanup tests
(cherry picked from commit e6bf202738)

Co-authored-by: Sam Doran <sdoran@redhat.com>
2020-08-06 11:18:07 -05:00
f097589fb2 2.9: YUM: Ensure we have enough values to split (#56802) (#71104)
* Ensure we have enough values to split (#56802)

Avoid raising an exception if pkgstr does not complains with expected
value.

(cherry picked from commit 433c98eae0)

* Add changelog

Co-authored-by: Adrián López <adrianlzt+github@gmail.com>
2020-08-06 09:59:31 -05:00
cea92ad2cd use security_fix category in changelogs (#71071)
* use security_fix category in changelogs

(cherry picked from commit 3d5217b6d5)

* these fragments do not say CVE but are security fixes

(cherry picked from commit 8d0c1ff51d)

Co-authored-by: Alicia Cozine <acozine@users.noreply.github.com>
2020-08-03 14:54:52 -05:00
e5ec3f8578 [stable-2.9] Cap pytest version to avoid relative import issue.
(cherry picked from commit 3a8ac62596)

Co-authored-by: Matt Clay <matt@mystile.com>
2020-07-28 17:14:33 -07:00
53a1885ab5 Make changelog tool be more strict about suffixes (#70798)
* Make changelog tool be more strict about suffixes

Change:
- Files must end in .yml or .yaml, and must not be dotfiles.
- This is to prevent (for example) emacs backup files (.yml~) from being
  included in changelogs during releases.
- Backport of https://github.com/ansible-community/antsibull-changelog/pull/33

Signed-off-by: Rick Elrod <rick@elrod.me>
2020-07-23 19:26:15 -05:00
4d675b6d87 win_reg_stat fix up broken test (#70830) 2020-07-23 09:28:11 -05:00
2dd7942073 Update Molecule support contact (#70797) (#70805)
As Molecule started to use https://github.com/ansible-community/molecule/discussions we need to update documentation before retiring
the molecule-users mailing list.

(cherry picked from commit b7ee07215d)

Co-authored-by: Sorin Sbarnea <ssbarnea@users.noreply.github.com>
2020-07-22 12:15:40 +01:00
7f7d01c0ce Remove erroneous changelog entry from .change.yaml too
Signed-off-by: Rick Elrod <rick@elrod.me>
2020-07-22 03:01:08 -05:00
4941cc861d Remove erroneous changelog entry
Signed-off-by: Rick Elrod <rick@elrod.me>
2020-07-22 02:44:45 -05:00
bef5ebba6e Update Ansible release version to v2.9.11.post0. 2020-07-20 20:54:52 -05:00
34d1fac39b New release v2.9.11 2020-07-20 18:21:45 -05:00
a1e6884f96 win async - use full path for powershell (#70703) (#70713)
(cherry picked from commit 154efd97f2)
2020-07-17 14:44:21 -07:00
6c56c5c2ab docker_container: make sure to_text() and to_native() are used instead of str() (#642) (#70646)
* Make sure to_text() and to_native() are used instead of str().

* Add changelog.

* Quoting should stay.

Backport of 8b92e0454d
2020-07-17 14:42:39 -07:00
f556b6cdd8 [stable-2.9] Allow single vault encrypted values to be used directly as module parameters. Fixes #68275 (#70607) (#70642)
* rebase conflicts

* [stable-2.9] Allow single vault encrypted values to be used directly as module parameters. Fixes #68275 (#70607).
(cherry picked from commit a77dbf0866)

Co-authored-by: Matt Martz <matt@sivel.net>
2020-07-17 14:42:01 -07:00
4f978af4ca [2.9] pipe: update docs for Popen with shell=True usage (#70603)
pipe lookup plugin uses Popen with shell=True intentionally.
This is considered a security issue if user input is not validated.
Updated docs to reflect this information for the user. Also, added
Bandit B602 documentation link for further reading.

Fixes: #70159

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
(cherry picked from commit e5649ca3e8)
2020-07-17 14:41:31 -07:00
879b9fb2ab [2.9] selective callback: mark task failed correctly (#70581)
Added additional condition to detect failed task in
selective callback plugin when ran with loop or with_items.

Fixes: ansible/ansible#63767

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2020-07-17 14:41:05 -07:00
d1b71e56a4 enabled check mode on nxos bgp modules (#57360) (#70578)
* enabled check mode on nxos bgp modules

* fixed indentation

* spaces instead of tabs

(cherry picked from commit 79ab8cb48d)

Co-authored-by: Jacob Snapp <7643439+jacobsnapp@users.noreply.github.com>
2020-07-17 14:40:23 -07:00
00eb2edc09 Make filter type errors 'loop friendly' (#70417) (#70575)
- ensure we preserve the typeerror part of the exception so loop defereed error handling
 can postpone those caused by undefined variables until the when check is done.
 - fix tests to comply with the 'new normal'

 - human_to_bytes and others can issue TypeError not only on 'non string'
 but also bad string that is not convertable.

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

Co-authored-by: Sloane Hertel <shertel@redhat.com>
(cherry picked from commit cf89ca8a03)
2020-07-17 14:39:50 -07:00
23f11081eb try to capture better winrm/put_file error (#70508) (#70571)
* try to capture better winrm/put_file error

fixes #70361

* Update lib/ansible/plugins/connection/winrm.py

Co-authored-by: Abhijeet Kasurde <akasurde@redhat.com>
Co-authored-by: Matt Davis <nitzmahone@users.noreply.github.com>
(cherry picked from commit 8789d7968d)
2020-07-17 14:39:30 -07:00
a96288c5b4 Fix decrypt argument in assemble module (#70465) (#70559)
* Do not pass decrypt parameter to assemble module

* Add integration tests where decrypt=True

* Add changelog #70465

(cherry picked from commit 71c378e139)
2020-07-17 14:39:03 -07:00
8bd8c09daf [stable-2.9] podman: Add user flags before container id in podman exec (#70541)
* Add user flags before container id in podman exec

When user provides an ansible_ssh_user, podman connection
plugin includes this values as `--user` flag. This patch
fixes the location of this flag according to podman exec command help.

Fixes: ansible/ansible#65220

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>

* Don't use mount in case of specified user

Co-authored-by: Sagi Shnaidman <sshnaidm@redhat.com>

(cherry picked from commit cc8d4bb4510bcc79537ed3fa591fb9cace576ae9)
2020-07-17 14:38:16 -07:00
a048dcba68 [2.9] Make sure ansible_become treated as a boolean (#70484) (#70527)
* Make sure ansible_become treated as a boolean (#70484)

* Make sure ansible_become treated as a boolean

(cherry picked from commit 8aca464b8b)

* Update test/integration/targets/inventory_ini/aliases

Co-authored-by: Sam Doran <sdoran@redhat.com>

Co-authored-by: Sam Doran <sdoran@redhat.com>
2020-07-17 14:37:23 -07:00
eee4058c7e k8s: update openshift requirements in documentation (#70479)
Backport of https://github.com/ansible-collections/community.kubernetes/pull/153
2020-07-17 14:36:59 -07:00
6b054121d6 [stable-2.9] Use the first galaxy server supporting v1 for roles (#70375) (#70421)
* Use the first galaxy server supporting v1 for roles. Fixes #65440

* Add changelog fragment

* This is best effort, fall back to original behavior if something bad happens
(cherry picked from commit 1f1d6e5)

Co-authored-by: Matt Martz <matt@sivel.net>
2020-07-17 14:36:30 -07:00
6789fa717a puppet: Fix command line construction (#70463)
Fix command line construction in the puppet module
related to check mode and using manifests directly.

Also, fixes 69ead0ba78 which
introduced another if-statement in the middle of a if/elif pair,
which causes the elif to execute together with the original if
which created '--noop --no-noop' commands.

Fixes: #60576
2020-07-17 14:36:08 -07:00
99a37234b7 Fix delegate_facts with interpreter not being set (#70293) (#70385)
Fixes #70168

ci_complete

Co-authored-by: Brian Coca <bcoca@users.noreply.github.com>
Co-authored-by: Matt Clay <matt@mystile.com>
(cherry picked from commit b05e00e99a)
2020-07-17 14:35:23 -07:00
c00009bc41 [2.9] Handle post_validate templating errors and add tests (#70240) (#70390)
* Handle post_validate templating errors and fix tests (#70240)

* Handle unexpected templating errors

* Fixes #70050

Fix up tests that weren't running and add tests for graceful templating error handling

(cherry picked from commit 30e70f4b63)

* changelog

ci_complete
2020-07-17 14:35:07 -07:00
93f2f47d4c [stable-2.9] Pin psutil version in tests (#70715)
A recent update to psutil introduced a breaking change
2020-07-17 15:55:09 -05:00
a866aa5875 bug fixing in azure_rm_aks.py (#70227) 2020-07-17 13:50:12 -07:00
54787c07f3 [2.9] Fix json callback for non-lockstep strategy plugins such as free. (#70163)
Fixes: #65931

Backport of https://github.com/ansible-collections/ansible.posix/pull/8
2020-07-17 13:47:05 -07:00
1465adcb95 nmcli: Add compatibility for new networkmanager library (#65726) (#70152)
Fixes: #48055
* add compatibility for new networkmanager library
* update debian/ubuntu docs
* move import gi into try

(cherry picked from commit 663171e218)

Co-authored-by: Sascha Marcel Schmidt <torvitas@users.noreply.github.com>
2020-07-17 13:23:35 -07:00
38eb98bd91 [eos] [2.9] [backport] Turn on eapi by default. (#70119)
* Turn on eapi by default

Signed-off-by: GomathiselviS <gomathiselvi@gmail.com>

* added changelog
2020-07-17 13:18:15 -07:00
caaf295a37 return changed for group_by (#32057) (#69860)
* return changed for group_by

* added tests and fixed 'early registeration'

(cherry picked from commit 22da903e9c)
2020-07-17 13:17:35 -07:00
9707efbc9d backport ios_59 (#69787) 2020-07-17 13:15:53 -07:00
b8cae337cd [stable-2.9] ansible_runner test - Add constraints (#70667) (#70670)
A recent updated to psutil, which is a dependency of ansible-runner, fails
to install on older versions of pip.

Commit with the breaking change:

  135628639b
(cherry picked from commit 9d27d7c8b1)

Co-authored-by: Sam Doran <sdoran@redhat.com>
2020-07-15 17:39:29 -05:00
f3872c4996 Disable hcloud_server_network test 2020-07-10 23:36:18 -07:00
8b0484217f [stable-2.9] Default ansible-test provisioning to us-east-1.
Previously windows instances on Shippable would be automatically directed to us-east-2.
(cherry picked from commit 1cf26896c5)

Co-authored-by: Matt Clay <matt@mystile.com>
2020-07-07 15:19:05 -07:00
2a4f98d19f [2.9] Docs: mention about Ansible workshops (#70378)
Lightbulb is deprecated in favor of https://ansible.github.io/workshops/. Update links accordingly.

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
(cherry picked from commit e4f48c920c)
2020-07-02 10:30:33 -05:00
3b0e0a8194 Remove Azure module tests from CI. 2020-06-30 15:09:47 -07:00
194308ea97 pip tests, use py2 compat sampleproject fork
Change:
- sampleproject has gone py3 only. Use a py2 compatible fork.

Test Plan:
- CI

Signed-off-by: Rick Elrod <rick@elrod.me>
2020-06-26 09:03:25 -07:00
d672ee1c03 To backport ios_user and ios_command TC failure fix (#70253) 2020-06-24 11:09:54 -07:00
3b7f71dfae adds japanese translation as a version-switcher option (#70214) (#70217)
Co-authored-by: Alicia Cozine <acozine@users.noreply.github.com>
(cherry picked from commit 4a0f42923b)
2020-06-22 15:53:26 -05:00
89dfe82705 [stable-2.9] Pin version of netaddr in docker_container test (#70210) 2020-06-22 12:42:11 -07:00
be2a3f520c Add an author exception for OpenStack Ansible SIG
The current author line wants to match a github author id. But
some people, including the OpenStack project, do not use github,
and additionally do not claim individual ownership but instead
group ownership.

Since there are already a couple of hard-coded examples in the
regex, just add one more. Alternately we could come up with some
mechanism to indicate that the author is purposely not listing
a github id, but that seems a bit heavywight.
2020-06-22 10:17:29 -07:00
8b75da2af2 Fix ansible-test import analysis warning.
Fix overlooked in https://github.com/ansible/ansible/pull/68372/

(cherry picked from commit 77732ed50d)
2020-06-22 10:09:30 -07:00
75d1213f9a Fix ansible-test change detection traceback.
(cherry picked from commit 53a3d1ffdb)
2020-06-22 10:09:30 -07:00
e80d736869 Fix ansible-test module_utils import analysis.
Now empty `*.py` files are ignored during module_utils import analysis for change detection.
This eliminates "No imports found" warnings for files which should have no imports.

(cherry picked from commit ab27680318)
2020-06-22 10:09:30 -07:00
f4b1604eba Fix ansible-test import analysis for collections. (#68352)
* Fix ansible-test import analysis for collections.

* Ignore plugins/module_utils/__init__.py

(cherry picked from commit 0ca3feb861)
2020-06-22 10:09:30 -07:00
cd7dfcebab [stable-2.9] Pin version of netaddr and jmespath in filters test 2020-06-19 09:23:51 -07:00
a8900f2b42 Update Ansible release version to v2.9.10.post0. 2020-06-18 17:11:23 -05:00
60275fd9b4 New release v2.9.10 2020-06-18 13:59:26 -05:00
6514ae6c05 Revert "Fix ansible-test module_utils import analysis. (#69406)"
This reverts commit b8808efd26.
2020-06-17 16:24:21 -07:00
a0c02d4c9d Revert "Fix ansible-test import analysis for collections. (#68352) (#69405)"
This reverts commit c333846097.
2020-06-17 16:24:21 -07:00
c8a94d0ad5 Revert "Fix ansible-test change detection traceback."
This reverts commit 58954ab77b.
2020-06-17 16:24:21 -07:00
84a60f1883 galaxy - preserve symlinks on build/install (#69959) (#69994)
* galaxy - preserve symlinks on build/install (#69959)

* galaxy - preserve symlinks on build/install

* Handle directory symlinks

* py2 compat change

* Updated changelog fragment

(cherry picked from commit d30fc6c0b3)

* Fix integration test

* ansible-galaxy - fix collection installation with trailing slashes (#70016)

If we fail to find a member when extracting a directory, try adding a trailing
slash to the member name. In certain cases, the member in the tarfile will
contain a trailing slash but the file name in FILES.json will never contain
the trailing slash.

If unable to find the member, handle the KeyError and print a nicer error.

Also check if a directory exists before creating it since it may have been
extracted from the archive.

Fixes #70009

* Add unit tests
* Use loop for trying to get members

(cherry picked from commit d45cb01b84)

Co-authored-by: Sam Doran <sdoran@redhat.com>
2020-06-17 14:09:25 -07:00
58954ab77b Fix ansible-test change detection traceback.
(cherry picked from commit 53a3d1ffdb)
2020-06-17 14:03:42 -07:00
b0c7cdc60d Backport: ovirt_disk fix activate (#70114)
* Backport: ovirt_disk fix activate

* add changelog
2020-06-17 12:09:36 -07:00
6967811560 Fix for https://github.com/ansible-collections/cisco.nxos/issues/46 (#70093)
Reviewed-by: https://github.com/apps/ansible-zuul
Signed-off-by: NilashishC <nilashishchakraborty8@gmail.com>

Add changelog

Co-authored-by: Suhas Bharadwaj <subharad@cisco.com>
2020-06-17 12:08:39 -07:00
055a24c027 yum/dnf: check type of elements in a name (#70072) (#70089)
(cherry picked from commit 843751a00d)
2020-06-17 12:06:59 -07:00
f79c606aae copy: ensure _original_basename is set (#70088)
* added changelog fragment
* added quick and basic test
* Revert "added quick and basic test"
* This reverts commit 75f4141656.
* added better tests
* now also creating files to copy on the remote
* removed tests for recursive copying which is not supported by remote_src

Fixes: #47050

(cherry picked from commit 79dfae9624)

Co-authored-by: Moritz Grimm <memo42@users.noreply.github.com>
2020-06-17 12:04:50 -07:00
7b1e2d7176 Backport nxos_file_copy fixes (#70075)
Signed-off-by: NilashishC <nilashishchakraborty8@gmail.com>
2020-06-17 11:58:29 -07:00
1f3185d3eb Allow tasks to notify a fqcn handler name (#68213) (#70074)
* Allow tasks to notify a fqcn handler name

* Add tests. Fixes #68181

* Add changelog fragment

* Add test to ensure handlers are deduped properly with fqcn, role, and just handler names

* Add some docs about new special vars

(cherry picked from commit 087be1da50)

Co-authored-by: Matt Martz <matt@sivel.net>
2020-06-17 11:57:30 -07:00
b8a81973ee Backport of dnf module logging (#69480) (#70066)
Signed-off-by: Hideki Saito <saito@fgrep.org>
2020-06-17 11:55:41 -07:00
e0322a0420 implemented 'prefix' for file based cache (#69872) (#70008)
* implemented 'prefix' for file based cache

Co-authored-by: s-hertel <shertel@redhat.com>
(cherry picked from commit ebb22655e4)
2020-06-17 11:52:58 -07:00
2cba0dc75c Do not keep empty blocks after tag filtering (#69987) (#69999)
This prevents PlayIterator having to go through empty blocks
that were created in filter_tagged_tasks. This should
be a performance improvement for playbooks that mostly skip
tasks with tags.

ci_complete

(cherry picked from commit ac20466375)
2020-06-17 11:49:32 -07:00
94df27233f fixed missing default (#69972) (#69985)
* fixed missing default (#69972)

* fixed missing default

 also deprecated so new options wont have to go through this

(cherry picked from commit 805dff4129)

* remove deprecation
2020-06-17 11:47:03 -07:00
074ddace35 zfs_delegate_admin: add diff,hold,release to list of permissions (#69962)
Co-authored-by: Lauri Tirkkonen <lauri@tuxera.com>
2020-06-17 11:04:50 -07:00
34e804a4f2 Backport: ovirt_disk force wait when uploading disk (#69943)
* ovirt_disk: force wait when uploading disk

* add changelog
2020-06-17 11:02:34 -07:00
23761b9880 Backport: ovirt_vm fix cd_iso search by name (#69941)
* ovirt_vm: fix cd_iso search by name

* fix pylint

* add changelog
2020-06-17 11:01:54 -07:00
5ee9072613 [2.9] Handle set object retrieved from lookup plugin (#69901)
self.client.resources.api_groups is a dict_keys and is not
handled correctly by default callback plugin while JSON serialization.

This fix will typecast it to list so that it can be JSON serialized for
further processing.

Fixes: ansible-collection/community.kubernetes#111

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2020-06-17 11:00:48 -07:00
a5c85b477b Fix IncludedFile equality check (#69524) (#69885)
In the case of a free style strategy, it is possible to end up with
multiple hosts trying to include from the same role, however the tasks
being included may be different with the use of tasks_from.  Previously
if you had two hosts that were included the same role when the
process_include_results function tries to determine if a included needs
to be run on a specific host, it would end up merging two different
tasks into which ever one was processed first.

This change updates the equality check to also check if the task uuid
associated with the IncludedFile is the same. The previous check only
checked if the task's parent uuid was the same. This breaks down when
both includes have the same parent.

    - hosts: all
      strategy: free
      gather_facts: false
      tasks:
        - include_role:
            name: random_sleep
        - block:
          - name: set a fact (1)
            include_role:
              name: set_a_fact
              tasks_from: fact1.yml
          - name: set a fact (2)
            include_role:
              name: set_a_fact
              tasks_from: fact2.yml
        - name: include didn't run
          fail:
            msg: >
              set_a_fact didn't run
              fact1: {{ fact1 | default('not defined')}}
              fact2: {{ fact2 | default('not defined') }}"
          when: (fact1 is not defined or fact2 is not defined)

Closes #69521

(cherry picked from commit 247e43b252)
2020-06-17 10:56:57 -07:00
c51ce1e47c Add mod_defaults for AWS collections (#69818)
We need to be able to add 2.9 CI jobs for AWS collections. Modules added
during the 2.10 dev cycle will need mod default entries to support test suites
2020-06-17 10:54:04 -07:00
dec1953cf7 Fix for vdc with no interface in N7K (https://github.com/ansible-collections/cisco.nxos/pull/68) (#69806)
Fix for vdc with no interface in N7K

Reviewed-by: Nilashish Chakraborty <nilashishchakraborty8@gmail.com>
             https://github.com/NilashishC
Signed-off-by: NilashishC <nilashishchakraborty8@gmail.com>

Add changelog

Co-authored-by: praveenramoorthy <62758226+praveenramoorthy@users.noreply.github.com>
2020-06-17 10:52:46 -07:00
7f31a7a488 [stable-2.9] Disabled inconsistent pylint checks.
(cherry picked from commit 8152d8bc1a)

Co-authored-by: Matt Clay <matt@mystile.com>
2020-06-17 10:51:37 -07:00
16f0b7461c Support removed_at_date in ansible-doc (#70002) (#70015)
* Support removed_at_date in ansible-doc

Signed-off-by: NilashishC <nilashishchakraborty8@gmail.com>

Changes:
  * ansible-doc does not support `removed_at_date` and assumes that
    deprecated dict will either have `removed_in` or `version`. This
    results in ansible-doc (and hence "sanity --test=ansible-doc")
    failing for modules having only `removed_at_date`.

  * This patch adds support for `removed_at_date` and also gives it
    precedence over `removed_in` or `version`.

* Add tests and changelog

Signed-off-by: NilashishC <nilashishchakraborty8@gmail.com>
(cherry picked from commit 9d6b0f2b03)
Signed-off-by: Paul Belanger <pabelanger@redhat.com>

Co-authored-by: Nilashish Chakraborty <nilashishchakraborty8@gmail.com>
2020-06-17 10:09:28 -07:00
41bed21e20 ec2_group: Ensure group-based rule targets have consistent data formats (#69748)
Ensure group-based rule targets have consistent data formats throughout the module.
Backported from https://github.com/ansible-collections/amazon.aws/pull/33
2020-06-16 20:43:06 -07:00
4a5f9e87cc Split regular and handler results into their own queues (#69498) (#69730)
When mixed with the free strategy (or any custom strategy that does not behave in
a lock-step manner), the linear methodology of _wait_on_handler_results may cause
race conditions with regular task result processing if the strategy uses
_process_pending_results directly. This patch addresses that by splitting the queues
used for results and adding a flag to _process_pending_results to determine which
queue to check.

Fixes #69457

(cherry picked from commit a4072ad0e9)

Co-authored-by: James Cammarata <jimi@sngx.net>
2020-06-16 20:40:59 -07:00
bc550fd935 Don't pass tenant_id for remote group in os_security_group_rule (#69726) 2020-06-16 20:39:13 -07:00
307d86de4b Fix system default dict generation (#69690)
Signed-off-by: NilashishC <nilashishchakraborty8@gmail.com>

Add changelog
2020-06-16 20:37:13 -07:00
d9366cb818 [stable-2.9] Allow the use of paramiko_conn before connection (#61570) (#69642)
* [stable-2.9] 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.
(cherry picked from commit 50e09be14f)

Co-authored-by: Nathaniel Case <ncase@redhat.com>

* Restore check_prompt and task_uuid
2020-06-16 20:35:37 -07:00
a259d79ad6 [stable-2.9] Fix filedescriptor out of range in select() when running commands (#65058) (#69517)
* Fix filedescriptor out of range in select() when running commands

* Simplify the run_command() code

Now that we're using selectors in run_command(), we can simplify some of
the code.

* Use fileobj.read() instead of os.read()
* No longer use get_buffer_size() as we can just slurp all of the data
  instead.

Also use a simpler conditional check of whether the selector map is
empty

Co-authored-by: Toshio Kuratomi <a.badger@gmail.com>.
(cherry picked from commit f200487414)

Co-authored-by: Bob Weinand <bobwei9@hotmail.com>

Co-authored-by: Bob Weinand <bobwei9@hotmail.com>
2020-06-16 20:27:24 -07:00
4f39d9ac65 avoid fatal tb on bad fqcn callback name (#69440) (#69496)
(cherry picked from commit 0aa76503dc)
2020-06-16 20:25:49 -07:00
156b302b4b Fix issue with replaced (#69477)
Signed-off-by: NilashishC <nilashishchakraborty8@gmail.com>

Add changelog
2020-06-16 20:25:19 -07:00
e652706d63 Add missing options for GRE interface (#69426)
This commit adds some missing options related to gre interfaces on
junos_interfaces module.

Cherry-picked from https://github.com/ansible-collections/junipernetworks.junos/pull/37
Fixes: https://github.com/ansible-collections/junipernetworks.junos/issues/36

Signed-off-by: Daniel Mellado <dmellado@redhat.com>
2020-06-16 20:24:34 -07:00
c333846097 Fix ansible-test import analysis for collections. (#68352) (#69405)
* Fix ansible-test import analysis for collections.

* Ignore plugins/module_utils/__init__.py

(cherry picked from commit 0ca3feb861)

Co-authored-by: Matt Clay <mclay@redhat.com>
2020-06-16 20:21:56 -07:00
54d96eae8c Ensure --version works with non-ascii project path (#66624) (#69789)
Fixes #66617

(cherry picked from commit 3606dcfe65)
2020-06-16 20:20:33 -07:00
a9f5f45d45 [stable-2.9] RoleRequirement - Include stderr in the error message (#66006) (#69486)
* RoleRequirement - Include stderr in the error message if there's a non-0 return code

* Don't try to concatenate str and bytes

Co-Authored-By: Sam Doran <sdoran@redhat.com>
(cherry picked from commit 1b3ca34)

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

Co-authored-by: Sloane Hertel <shertel@redhat.com>
2020-06-16 20:19:52 -07:00
4744f31023 Fix ansible-test egg-info directory detection. (#69403)
(cherry picked from commit 8b63da7b43)

Co-authored-by: Matt Clay <matt@mystile.com>
2020-06-16 20:19:01 -07:00
153de5ee49 [2.9] podman_image: use correct option for remove_signatures flag (#68979)
podman_image module uses 'podman push' command with wrong
flag '--remove_signatures' instead of '--remove-signatures'

This patch fixes the given typo.

Fixes: ansible/ansible#67965

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2020-06-16 20:17:48 -07:00
cf244c094a [2.9] Prevent Ansible 2.9 to choke on collections using deprecation by date or collection_name for deprecation calls (#69935)
* Prevent Ansible 2.9 to choke on collections using deprecation by date or collection_name for deprecation calls.

* Add changelog fragment.

* Fix YAML.

* Improve C# compatibility.

* Add tests for AnsibleModule.

* Fix var name.

* Fix type.

* Update C# code.

* Show deprecation warning if removed_at_date is used for Python modules.

* Update changelogs/fragments/69935-2.10-deprecation-support.yml

Co-authored-by: Alicia Cozine <879121+acozine@users.noreply.github.com>

* Prevent crash of validate-modules if 'removed_in' is not in 'deprecated'.

Co-authored-by: Alicia Cozine <879121+acozine@users.noreply.github.com>
2020-06-16 20:16:00 -07:00
5399127ec0 Update sesu.py: use defined prompt (#69835)
* Update sesu.py: use defined prompt

* Add changelog fragment

Co-authored-by: Alexandros Zachos <alexandros.zachos@cz.ibm.com>
2020-06-16 20:14:09 -07:00
3e36350309 [2.9] Handle disabled service units (#69804)
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
(cherry picked from commit 723a904f4e)
2020-06-16 20:13:06 -07:00
6c9ebd76d1 Feature privilege status should only be checked if we need to escalate priv (https://github.com/ansible-collections/cisco.nxos/pull/61) (#69766)
Check feature privilege status only if priv escalation is required

Reviewed-by: https://github.com/apps/ansible-zuul
Signed-off-by: NilashishC <nilashishchakraborty8@gmail.com>
2020-06-16 20:09:43 -07:00
98a1e1f7a6 Remove unused import from frr cli plugin (#67790) (#69764)
Signed-off-by: Paul Belanger <pabelanger@redhat.com>
(cherry picked from commit 357ae7ec0e)

Add changelog

Signed-off-by: NilashishC <nilashishchakraborty8@gmail.com>

Co-authored-by: Paul Belanger <pabelanger@redhat.com>
2020-06-16 20:08:52 -07:00
0e9477262f Add validity check for [Driver][IPAddress] else use docker-machine ip command. (#69696)
* Add validity check for [Driver][IPAddress] else use docker-machine ip command. (backport of https://github.com/ansible-collections/community.general/pull/412)

* Add validity check for [Driver][IPAddress] else use docker-machine ip command.

* Note why we fallback to the `docker-machine ip <machine name>` command.

Co-authored-by: Ben Roose <ben.roose@wichita.edu>

* Backport the changelog as requested.

Co-authored-by: Ben Roose <ben.roose@wichita.edu>
2020-06-16 20:07:52 -07:00
eb2fae7951 Fixes collection.general 407 (#69695) 2020-06-16 17:43:11 -07:00
28b99ead44 Backport: Support direct upload/download to Image I/O daemon on oVirt node (#69691)
* ovirt_disk: fix upload/download of image

* add changelog
2020-06-16 17:42:05 -07:00
d5b648ee41 Add FQCN mappings for network facts modules (#69601) (#69689)
* Add FQCN mappings for network facts modules

Signed-off-by: NilashishC <nilashishchakraborty8@gmail.com>

* Add unit tests

Signed-off-by: NilashishC <nilashishchakraborty8@gmail.com>

* update entry for ironware

Signed-off-by: NilashishC <nilashishchakraborty8@gmail.com>
(cherry picked from commit dae3ba71a8)

Add changelog
2020-06-16 17:30:28 -07:00
f6829b386e [2.9] Typecast results before use in profile_tasks callback (#69665)
If user specifies sort_order to none, results are not converted to list.
This fix force this typecasting before using the results.

Fixes: ansible/ansible#69563

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2020-06-16 17:28:47 -07:00
6abe3a889d [stable-2.9] file - return 'state': 'absent' when a file does not exist (#66503) (#69657)
This was changed in ansible/ansible#51350.
(cherry picked from commit cd8920af99)

Co-authored-by: Sam Doran <sdoran@redhat.com>
2020-06-16 17:27:57 -07:00
9e00214fb4 fix delegation vars usage (debug still shows inventory_hostname (#69520)
* fix delegation vars usage (debug still shows inventory_hostname) (#69244)

* fix delegation vars usage and reporting

 - just pass delegated host vars + task vars to plugins
   and avoid poluting with original host vars
 - updated tests

(cherry picked from commit 2165f9ac40)

* fix delegated interpreter discovery (#69604)

* fix delegated interpeter
* allow returning fact if it is 'the right host'
* added note for future fix/efficiency
 as it stands we rerun discovery for the delegated host
unless its saving facts to itself
 * fixed test lacking delegate_to mock

(cherry picked from commit de3f7c7739)

* Fix `ansible -K` become_pass regression (#69629)

* Fix `ansible -K` become_pass regression

Change:
- This fixes a breaking change introduced in
  2165f9ac40

Test Plan:
- Local VM for now, with plans to add an integration test for -K going
  forward.

Tickets:
Refs #69244

(cherry picked from commit fe9696be52)

* fix discovery on loop with delegation (#70013)

* fix discovery on loop with delegation

fixes #69963

(cherry picked from commit 4c9d9dbb56)

Co-authored-by: Rick Elrod <rick@elrod.me>
2020-06-16 17:26:35 -07:00
0cdaec5316 Add platform guide for FRR (#69773) (#70067)
* Add platform guide for FRR

* Add entry in index

Signed-off-by: NilashishC <nilashishchakraborty8@gmail.com>
(cherry picked from commit 5a7f2f9d5d)

Add changelog
2020-06-16 11:27:18 -05:00
4c1777e26e [stable-2.9] Properly handle unicode in safe_eval (#68576) (#69626)
* Properly handle unicode in safe_eval

Fixes #66943

* Update lib/ansible/template/safe_eval.py

Co-authored-by: Sam Doran <sdoran@redhat.com>.
(cherry picked from commit ecd986006e)

Co-authored-by: Martin Krizek <martin.krizek@gmail.com>

Co-authored-by: Martin Krizek <martin.krizek@gmail.com>
2020-06-10 16:23:43 -07:00
ef01267eb6 ios_l3 loopback backport (#69593) 2020-06-10 16:03:11 -07:00
e78c8be3d1 Modify the way of parsing NETCONF XML message in ce.py (#69571)
* update module_utils for ce

* update module_utils for ce

* Module modification information

* Module modification information
2020-06-10 15:27:25 -07:00
df3540073c [stable-2.9] lineinfile - Use ANSIBLE_REMOTE_TMP for temporary file (#69543) (#69549)
(cherry picked from commit b8469d5c7a)

Co-authored-by: Sam Doran <sdoran@redhat.com>
2020-06-10 15:26:32 -07:00
f39b106f83 only show_vars when showing vars (#69365) (#69504)
* only show_vars when showing vars

avoid processing function params that can be very expensive
and might not be used at all in called function.

fixes #69357

* Update changelogs/fragments/69357_optimize_inventory_graph_wo_vars.yml

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

Co-authored-by: Sloane Hertel <shertel@redhat.com>
(cherry picked from commit f0b6f76bc6)
2020-06-10 15:22:27 -07:00
0438165f58 Backport to fix ios_vlans vtp version 2 issue (#69501)
* fix ios_vlans issue

* add changelog
2020-06-10 15:19:42 -07:00
036e604587 Remove deprecation for TRANSFORM_INVALID_GROUP_CHARS (#66650) (#69487)
Fixes #61889

(cherry picked from commit 6086ea62ee)
2020-06-10 15:19:05 -07:00
4ed4d2d280 Validate args for includes in handlers too (#57537) (#69448)
(cherry picked from commit 9645304da3)
2020-06-10 15:18:42 -07:00
95f0d3ff8d [stable-2.9] Fix galaxy publish sha256 value format. (#67942) (#69435)
* Fix galaxy publish sha256 value format.

The multipart/form content used for the body
of the POST to /api/automation-hub/v3/collections
was missing a newline before the line with the value
of the sha256.

automation-hub/galaxy/django skips the field entirely in
that case and automation-hub code will use None for default
to indicate that no sha256 is provided (an available option).

Fixes ansible/galaxy-dev#246

* Add changelog fragment

Co-authored-by: Matt Martz <matt@sivel.net>
(cherry picked from commit cd8dd4a)

Co-authored-by: Adrian Likins <alikins@redhat.com>

Co-authored-by: Adrian Likins <alikins@redhat.com>
2020-06-10 15:17:18 -07:00
6aca3a2c69 Fix/archive empty file (#64895) (#69420)
* Remove call to filecompare to fix issue with empty file exclusion from archive

* Add empty file

(cherry picked from commit 277dd54d45)

Co-authored-by: Nabil BENDAFI <nbendafi@yseop.com>
2020-06-10 15:16:32 -07:00
abbb8c4ea8 ansible-test: don't trigger full CI run for changes to changelogs/ and docs/ in collections (#68550) (#69408)
* Don't trigger full CI run for changes to changelogs/ and docs/ in collections.

* Add changelog fragment.

* Update changelogs/fragments/68550-ansible-test-docs-changelogs.yml

Co-Authored-By: Matt Clay <matt@mystile.com>

Co-authored-by: Matt Clay <matt@mystile.com>
(cherry picked from commit bae5f18f5c)
2020-06-10 15:16:01 -07:00
6280bd7af2 Fix ansible-test PATH handling. (#69407)
(cherry picked from commit f1b3e8364e)

Co-authored-by: Matt Clay <matt@mystile.com>
2020-06-10 15:15:07 -07:00
b8808efd26 Fix ansible-test module_utils import analysis. (#69406)
Now empty `*.py` files are ignored during module_utils import analysis for change detection.
This eliminates "No imports found" warnings for files which should have no imports.

(cherry picked from commit ab27680318)

Co-authored-by: Matt Clay <matt@mystile.com>
2020-06-10 15:14:37 -07:00
c43b03abe9 Fix shebang sanity test module identification. (#69404)
(cherry picked from commit 9d0113be5c)

Co-authored-by: Matt Clay <matt@mystile.com>
2020-06-10 15:13:30 -07:00
380be7581e Address compat issue for collection loading on py26 (#68219) (#69402)
* Address compat issue for collection loading on py26

* Move import_module shim to utils for compat across the codebase

* Enable collection tests on py2.6

* Update changelog fragment

* Simplify code using sys.moduls

* Move compat to module_utils/compat/importlib

* Add back errantly deleted newline

* Remove hack comment

Co-Authored-By: Matt Clay <matt@mystile.com>

Co-authored-by: Matt Clay <matt@mystile.com>
(cherry picked from commit da3a90e88e)

Co-authored-by: Matt Martz <matt@sivel.net>
2020-06-10 15:12:36 -07:00
c57ca3fbf2 enables to set keys not present in existing config (#69399)
((cherry picked from commit 95525030e2)

Co-authored-by: satunnainen <satunnainen@users.noreply.github.com>
2020-06-10 15:06:16 -07:00
4670c3bab8 Instruct collection build command to ignore .git file (#69271)
In some advanced git usage scenarios, .git is not a directory. One
such example when developer use worktrees where each worktree contains
a .git symlink to the real .git directory.
2020-06-10 15:05:33 -07:00
dff302701a [2.9] Update developing_modules_best_practices.rst (#69939)
wrong module path for module_utils.basic in developing_modules_best_practices.rst

(cherry picked from commit ff98ecc4d0)

Co-authored-by: usatosi <usatosi@e-mail.jp>
2020-06-10 14:30:55 -05:00
3e1d4cb6d7 Backport: ovirt_storage_vm_info fix example (#69940)
* ovirt_storage_vm_info: fix example

* add changelog
2020-06-10 14:29:44 -05:00
ce9493fdb5 Backport: ovirt_vm fix quotas example (#69942)
* ovirt_vm: fix quotas example

* add changelog
2020-06-10 14:29:11 -05:00
b665a65fea ovirt: update operating system options backport (#69449)
* ovirt: update operating system options backport

* add changelog
2020-06-10 14:28:17 -05:00
05aed52d8e fix get_data on case_insensitive fs (#69955)
* fix get_data on case_insensitive fs

* implement case-sensitive-forcing versions of various os.path methods that just pass through on case-sensitive systems.

* catch broader IOError for py2/py3 compat

* optimization: factor out case-insensitive comparison

* implement case-sensitive open
2020-06-08 19:47:34 -07:00
55eb2766ae [2.9] ansible-test: make pylint deprecation plugin not choke on tagged versions (#69851)
* ansible-test pylint: do not choke on module.deprecate() / display.deprecated() version which has string components.

* Add changelog fragment.
2020-06-03 09:49:44 -07:00
5192f68f3a Update mso_schema_site_anp_epg_domain.py (#69703)
anp, epg are required arguments for module.  fatal error occurs when not specified: "FAILED! => {"changed": false, "msg": "missing required arguments: anp, epg"}"
2020-05-28 15:50:28 -05:00
9731787b12 Fix documentation of docker_host_info (it does not delete). (#69745) 2020-05-28 15:11:14 -05:00
f963aba45a [stable-2.9] Pin Docker version at 19.03.1 (#69635) (#69645)
* [stable-2.9] Pin Docker version at 19.03.1
(cherry picked from commit fe941a4045)

Co-authored-by: Sam Doran <sdoran@redhat.com>

* [stable-2.9] Pin docker-ce-cli version in tests (#69620)

Installing docker-ce has a dependency of docker-ce-cli. If the version of docker-ci-cli is not specified, it installs the latest version.

(cherry picked from commit 889da811d7)
2020-05-21 13:27:15 -07:00
7adce02130 Explain module docs loss for devel (#68369) (#69546)
(cherry picked from commit 0d379d4205)
2020-05-18 13:41:02 -05:00
b4b27d631f Update Ansible release version to v2.9.9.post0. 2020-05-12 16:56:53 -05:00
6f83b9aff4 New release v2.9.9 2020-05-12 13:25:40 -05:00
5a0d35646d Fix fileglob plugin with non-existent subdirectory
Since Ansible 2.9.8, if the fileglob plugin is passed a path containing
a subdirectory of a non-existent directory, it will fail. For example:

lookup('fileglob', '/'): ok
lookup('fileglob', '/foo'): (non-existent): ok
lookup('fileglob', '/foo/bar'): (non-existent): FAIL

The exact error depends on Python 2 or 3, but here is the error on
Python 2:

    AttributeError: 'NoneType' object has no attribute 'endswith'

And on Python 3:

    TypeError: expected str, bytes or os.PathLike object, not NoneType

This change fixes the issue by skipping paths that are falsey before
passing them to os.path.join().

Fixes: #69450
2020-05-12 09:58:45 -07:00
457a1115e8 Update Ansible release version to v2.9.8.post0. 2020-05-12 08:31:33 -07:00
ed2a39d68e New release v2.9.8 2020-05-11 16:28:48 -07:00
972e55327c [stable-2.9] added missing clog for 58461
(cherry picked from commit 96f504cd11)

Co-authored-by: Brian Coca <brian.coca+git@gmail.com>
2020-05-11 15:55:45 -07:00
28e9121d94 Disable failing azure_rm_dnszone test.
The module requires updates to work with the current Azure API.
2020-05-07 22:32:16 -07:00
8b2957aac3 Revert "2.9: native types: literal_eval all the things (#68938) (#69044)"
This reverts commit 70b4ce5efd.
2020-05-07 17:57:29 -07:00
330112a45c Fix win_psmodule and win_psrepository tests 2020-05-06 20:39:36 -07:00
e40b96ed88 Refactor CLI prompt mode check for network plugins (#63945) (#69210)
* Refactor CLI prompt mode check for network plugins (#63945)

* Refactor CLI prompt mode check for network plugins

*  Move the CLI prompt mode check logic from action plugin
   to the controller side with the cliconf plugins.

*  This refactor also allows the network modules
   to initialise the persistent connection with remote device
   only when it is required.

* Fix review comments

(cherry picked from commit c27e47327f)

* Fix cli context check for network_cli connection (#64697)

* Fix cli context check for network_cli connection

Fixes #64575

*  Check cli context for network_cli connection
   at the start of new task run only.

* Pass task_uuid around to identify start of new task run

* Handle for local connection

(cherry picked from commit ee3f8d28a4)

* Add test for reboot & wait_for_connection on EOS & IOS (#63014)

* Add test for reboot & wait_for_connection

* Add test for ios

* Collection-proof block test

* Add junos test

* Don't try to evaluate cli context unless using the connection

* Prevent infinite recursion

* Update change log

(cherry picked from commit e19b94f43b)
(cherry picked from commit ee3f8d28a4)
(cherry picked from commit e19b94f43b)

devel:
https://github.com/ansible/ansible/pull/63945
https://github.com/ansible/ansible/pull/64697
https://github.com/ansible/ansible/pull/63014

Co-authored-by: Nathaniel Case <ncase@redhat.com>
2020-05-05 21:26:17 -07:00
fbf93db4a8 [2.9] service_facts: fix for systemd 245
* service_facts: fix for systemd 245

Since systemd 245, `systemctl list-unit-files` comes with a new column
"VENDOR PRESET" [1] and breaks the service_facts module:

This patch drops the third column to make it work with old and new
systemd. With the new slice operation, IndexError instead of ValueError
is raised if the output contains less than 2 columns.

Test plan: running `ansible-test integration -v service_facts` on
up-to-date Arch Linux

[1] https://github.com/systemd/systemd/pull/14445

* add changelog

Signed-off-by: Chih-Hsuan Yen <yan12125@gmail.com>
Signed-off-by: Rick Elrod <rick@elrod.me>
Co-authored-by: Rick Elrod <rick@elrod.me>
(cherry picked from commit bd4fdb1ca2)
2020-05-05 21:21:12 -07:00
28cc8e6155 [2.9] zabbix_template: fixed zabbix no longer returning macros as part of the template (#69235)
* fixed zabbix no longer returning macros as part of the template (#66996)


(cherry picked from commit c80d0c40ce)

* added changelog fragment
2020-05-05 21:20:45 -07:00
99e6f4ff54 [stable-2.9] Handle non-ascii paths during role installation. Fixes #69133 (#69213)
(cherry picked from commit bc41dd4)

Co-authored-by: Matt Martz <matt@sivel.net>
2020-05-05 21:20:02 -07:00
6c2b372d1b [stable-2.9] Address fixme and handle filter/test errors for collections better (#68047)
* Address fixme and handle fitler/test errors for collections better. Fixes #66721

* Re-arrange code
(cherry picked from commit ee6413a)

Co-authored-by: Matt Martz <matt@sivel.net>
2020-05-05 21:19:18 -07:00
ff3275f9bd [2.9] Added missing parameter
The call to daemonize() in sysvinit.py was missing the module parameter
included in the function definition in service.py.

This pull request simply adds that parameter, as the module is
used for error handling in daemonize().

(cherry picked from commit 339c442250)
2020-05-05 21:18:37 -07:00
0ec98cffe2 hostname - Add Manjaro Linux distribution (#64810)
* Add Manjaro Linux distribution

(cherry picked from commit a75a79b84c)
2020-05-05 21:17:51 -07:00
82378406ea [pip] Enable virtualenv_command to have arguments
Currently if virtualenv_command has arguments, then the
search for the binary in the path does not work so the
user has to specify the full path to it.

To allow arguments to be used without having to specify
the path to the binary, we split the module argument into
the command and anything after the first space.

This makes using this module argument more flexible and
user friendly.

Fixes: #52275
(cherry picked from commit da390b297e)
2020-05-05 21:17:12 -07:00
081ce0e4e1 update ActionBase._low_level_execute_command to honor executable (#68315)
* update ActionBase._low_level_execute_command to honor executable

* adding changelog fragment

* renaming changelog fragment to .yml

* noop change to bump shippable

* adding raw_executable integration test

* copying aliases from raw

* removing blank lines

* skipping aix and freebsd

* noop to bump shippable

* moving tests to raw/

* removing become_method: sudo ; it doesn't work on AIX

* removing trailing blank line

* forcing become_method: su to try to get AIX to work

Co-authored-by: Rob Wagner <rob.wagner@sas.com>
(cherry picked from commit 977b58740b)
2020-05-05 21:16:09 -07:00
f252494ff2 ovirt_network: allow to remove vlan_tag (#69123)
* ovirt_network: allow to remove vlan_tag

* add changelog

* fix backport

* fix changelog
2020-05-05 21:13:35 -07:00
ec73968b5d ovirt_disk: upload image auto detect size (#69150)
* ovirt_disk: upload image autodetect size

* add changelog
2020-05-05 21:12:17 -07:00
1432a947e7 ovirt_disk: add warning when uploading wrong format (#69153)
* ovirt_disk: add warning when wrong format

* add changelog

* Update ignore.txt
2020-05-05 21:09:31 -07:00
7cb8594e97 Bugfix of 67377: postgresql_set converts value to uppercase if "mb" or "gb" or "tb" is in the value string (#67418)
* Bugfix of 67377: postgresql_set converts value to uppercase if "mb" or "gb" or "tb" is in the value string

* fix CI

* add changelog

(cherry picked from commit 59bcc9f739)
2020-05-05 21:05:25 -07:00
70b4ce5efd 2.9: native types: literal_eval all the things (#68938) (#69044)
* native types: literal_eval all the things (#68938)

With https://github.com/pallets/jinja/pull/1190 merged our short-circuit
is no longer valid (has it ever been?) as now data like ' True ' may go
through our ansible_native_concat function as opposed to going through
intermediate call to Jinja2's native_concat before. Now we need to always
send data through literal_eval to ensure native types are returned.

(cherry picked from commit acdc9eb76d)

* Fix tests
2020-05-05 21:02:20 -07:00
4f909589c2 [2.9] plugin_formatter: sys.exit does not take a file argument
Cleanup of leftover from bcdfdc0cc3.

sys.exit does not take any named argument.

(cherry picked from commit cdad594b16)
2020-05-05 20:38:35 -07:00
b3a1288150 preserve json parsing error (#58461)
* preserve json parsing error
* added test

(cherry picked from commit bbdf77a59f)
2020-05-05 20:37:46 -07:00
e2f7676c5a [stable-2.9] Allow a collection role to call a standalone role by default (#69102)
* Allow a collection role to call a standalone role by default. Fixes #69101

* tweaked changelog text

* Guard against NoneType

Co-authored-by: Matt Davis <nitzmahone@users.noreply.github.com>.
(cherry picked from commit da98fc267a)

Co-authored-by: Matt Martz <matt@sivel.net>
2020-05-05 20:34:57 -07:00
f8a5377cc6 Fix fileglob when using 'file*' vs 'stuff/file*' (#68945)
* Fix fileglob when using 'file*' vs 'stuff/file*'

 when not having dir in glob, files/ subdir was being ignored.

* tests for fileglob

(cherry picked from commit d3cab602a5)
2020-05-05 20:33:56 -07:00
17458a16ca influxdb: Fix documentation (#67807)
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
(cherry picked from commit ed306c7991)
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2020-05-05 20:28:57 -07:00
e5d93a4f11 redfish_config: fix support for boolean BIOS attributes
Backport of ansible-collections/community.general#189 to stable-2.9

Currently the redfish_config module will convert boolean bios_attribute_value
settings to strings (type str). This will cause BMCs expecting booleans to
error out.

This PR will change the default type of bios_attribute_value to 'raw' in order
to support strings and booleans.

Fixes #68251
2020-05-05 19:33:37 -07:00
604f797f0e mysql_user: fix error No database selected 2020-05-05 19:27:52 -07:00
3fd73750dc [2.9] Docs: point inventory script to respective version
With collections migration, inventory scripts are moved from devel (2.10).
Point docs for inventory script to their respective version.

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2020-05-05 19:26:05 -07:00
2939a90097 Backport of ansible-collections/azure@40fac2381e (ansible-collections/azure#101) to stable-2.9. (#69221) 2020-05-05 14:46:02 -05:00
fd828672a5 [2.9] constructed inventory plugin: correct example (#69189)
Fixed 'intersect' filter name in constructed inventory plugin example.

(cherry picked from commit 91d02e1c1f)

Co-authored-by: Kenyon Ralph <kenyon@kenyonralph.com>
2020-05-05 14:44:40 -05:00
c49f2218de Mention acme_certificate behavior changes in porting guide caused by a bugfix and previously incorrect examples. (#69167) 2020-05-05 14:42:46 -05:00
d6dc085b06 [2.9] Fix docs issues in aws_s3_bucket_info and ec2_vpc_vpn (#69166)
* Backport of ansible-collections/community.aws@dedf734b21 (ansible-collections/community.aws#47).

* Backport of ansible-collections/community.aws@4a0e1a4d87 (ansible-collections/community.aws#55).
2020-05-05 14:38:28 -05:00
b4d66c4991 Add RHEL 8.2 to CI
Change:
RHEL 8.2 GA was released this week, test it in CI instead of 8.1.

Test Plan:
CI

Signed-off-by: Rick Elrod <rick@elrod.me>
2020-04-30 14:32:40 -07:00
4a20196492 Enable dnf integration tests on CentOS 8
Change:
We were only testing dnf on RHEL previously.
Test on CentOS 8 as well.

Test Plan:
Ran locally in docker.

Signed-off-by: Rick Elrod <rick@elrod.me>
2020-04-30 14:32:40 -07:00
07084217dc [dnf] Make behavior/errors compatible for new DNF
Change:
Extend the logic for custom error handling in the dnf module, so that on
newer DNF (such as DNF that ships with modern Fedora 31 container
images, and ships with RHEL 8.2) we report errors consistently with
older DNF.

Test Plan:
Ran dnf integration tests against an old Fedora 31 container image and a
brand new Fedora 32 container image; tess passed on both.

Signed-off-by: Rick Elrod <rick@elrod.me>
2020-04-30 14:32:40 -07:00
a4f13acd85 Revert "Fix missing persistent connection messages (#68496)" (#69147)
This reverts commit 5f6427b1fc.
as it breaks netconf connection. This will be a temporary measure
for unlocking CI until a proper fix is shipped.

Fixes #69065

(cherry picked from commit 9217aeeac1)
Signed-off-by: Daniel Mellado <dmellado@redhat.com>
2020-04-27 12:02:10 -07:00
8f1a614428 [stable-2.9] Remove obsolete vcenter setup from ansible-test..
(cherry picked from commit a050d892d8)

Co-authored-by: Matt Clay <matt@mystile.com>
2020-04-27 00:45:26 -07:00
18f91bbb88 Fix incorrect CVE reference in changelog fragment
Change:
This corrects an incorrect CVE identifier in the changelog entry for
CVE-2020-1735.

Test Plan:
N/A

Tickets:
Refs #67793, #68720

Signed-off-by: Rick Elrod <rick@elrod.me>
2020-04-21 11:43:17 -07:00
e4a5b4b797 [stable-2.9] pip - Fix check_mode for prerelease packages (#68690)
* pip - Fix check_mode for prerelease packages

Fixes #68592.

Signed-off-by: Rick Elrod <rick@elrod.me>
Co-authored-by: Matt Martz <matt@sivel.net>
(cherry picked from commit 82c60db49b)

Co-authored-by: Rick Elrod <rick@elrod.me>
2020-04-21 11:31:11 -07:00
6410570643 Update Ansible release version to v2.9.7.post0. 2020-04-16 20:05:09 -07:00
ff7bbbcaf1 New release v2.9.7 2020-04-16 16:26:06 -07:00
290bfa820d fixed fetch traversal from slurp (#68720)
* fixed fetch traversal from slurp

  * ignore slurp result for dest
  * fixed naming when source is relative
  * fixed bug in local connection plugin
  * added tests with fake slurp
  * moved existing role tests into runme.sh
  * normalized on action excepts
  * moved dest transform down to when needed
  * added is_subpath check
  * fixed bug in local connection

fixes #67793

CVE-2019-3828

(cherry picked from commit ba87c225cd)
2020-04-15 12:47:35 -07:00
685a4b6d3f safely use vault to edit secrets (#68644)
* when possible, use filedescriptors from mkstemp to avoid race
  * when using path strings, ensure we are always creating the file

CVE-2020-1740
Fixes #67798

Co-authored-by: samdoran
(cherry picked from commit 28f9fbdb5e)
2020-04-15 12:41:17 -07:00
d41e38435b [2.9] CVE-2020-1746 - Remove the params module option from ldap_attr and ldap_entry (#68714)
* Remove the params module option from ldap_attr and ldap_entry

Module options that circumvent Ansible's option handling were disallowed
in:
https://meetbot.fedoraproject.org/ansible-meeting/2017-09-28/ansible_dev_meeting.2017-09-28-15.00.log.html

Additionally, this particular usage can be insecure if bind_pw is set
this way as the password could end up in a logfile or displayed on
stdout.

Fixes CVE-2020-1746

(cherry picked from commit 0ff609f1bc)

* Fix formatting for option names

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

* Fix fail_json

* fix indentation error

Co-authored-by: Toshio Kuratomi <a.badger@gmail.com>
Co-authored-by: Felix Fontein <felix@fontein.de>
2020-04-14 19:26:47 -07:00
0b4788a71f prevent ansible_facts injection (#68431)
- also only replace when needed
 - switched from replace to index
 - added test to verify bogus_facts are not accepted

CVE-2020-10684

(cherry picked from commit a9d2ceafe4)
2020-04-14 19:13:51 -07:00
51d2514753 fix vault temp file handling (#68433)
* fix vault tmpe file handling

 * use local temp dir instead of system temp
 * ensure each worker clears dataloader temp files
 * added test for dangling temp files
 * added notes to data loader

CVE-2020-10685

(cherry picked from commit 6452a82452)
2020-04-14 18:48:00 -07:00
65866519e4 support rabbitmq 3.8.x in version check (#66855) (#68137)
* support rabbitmq 3.8.x in version check (#66855)

* support rabbitmq 3.8.x in version check

* Removed extraneous white space

(cherry picked from commit 6b017db05b)

* Add changelog fragment.

Co-authored-by: bitchkat <kjh@flyballdogs.com>
Co-authored-by: Matt Clay <matt@mystile.com>
2020-04-14 18:42:43 -07:00
c6c4fbf4a1 subversion module - provide password securely when possible or warn (#67829)
* subversion module - provide password securely with svn command line option --password-from-stdin when possible, and provide a warning otherwise.
* Update lib/ansible/modules/source_control/subversion.py.
* Add a test.

Co-authored-by: Sam Doran <sdoran@redhat.com>
(cherry picked from commit d91658ec0c)
2020-04-14 18:41:54 -07:00
b2551bb694 ansible-galaxy - Fix tar path traversal issue during install - CVE-2020-10691 - 2.9 (#68601)
* ansible-galaxy - Fix tar path traversal issue during install - CVE-2020-10691 (#68596)

(cherry picked from commit a20a527014)

* Remove extra tests missing from rebase
2020-04-14 18:25:27 -07:00
cef6296735 WebRequest - Fix use_proxy: no on module options (#68603)
* WebRequest - Fix use_proxy: no on module options

* Fix up changelog fragment

(cherry picked from commit ae1cd27b57)
2020-04-14 18:23:56 -07:00
3bebeb9cc3 Fixed mysql_user module idempotency for long privilege lists. (Fixes #68044) 2020-04-14 18:22:32 -07:00
8d387802ec [2.9] ipa: Remove redundant encoding in json.loads
Backport of https://github.com/ansible-collections/community.general/pull/87

Fixes: ansible/ansible#66592

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2020-04-14 18:20:42 -07:00
2b536b8e82 Backport of ansible-collections/community.general@07e8911fd8 to stable-2.9. 2020-04-14 18:19:48 -07:00
a41f09901b [stable-2.9] Fix missing persistent connection messages (#68496) (#68562)
* [stable-2.9] Fix missing persistent connection messages (#68496)

* Be more proactive about returning module messages

* Move message display to a function, and replace handling already in shutdown().
(cherry picked from commit 5f6427b1fc)

Co-authored-by: Nathaniel Case <ncase@redhat.com>

* Add changelog
2020-04-14 18:18:23 -07:00
ea4f6e1539 nxos_lacp: updated tests to handle platforms not supporting lacp system mac command (#64074)
* Updated nxos_lacp tests to handle platforms not supporting lacp system mac command

* nxos_lacp: addressing comments

* nxos_lacp: Updating image tag search to include more tags

(cherry picked from commit 00193f27eb)

Add changelog for nxos_lacp fix
2020-04-14 18:16:14 -07:00
852b64b3ba routeros_facts: prevent crash of module when ipv6 package is not installed (#68554)
* routeros_facts: fix crash when ipv6 is disabled

* Update 64958-routeros-facts-ipv6.yml
2020-04-14 18:14:48 -07:00
eec5cc4f73 [2.9] VMware: Use existing DVPG network in vmware_guest_network
* Handle all cases of networks

Fixes: #65968

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
(cherry picked from commit afb71c14bd)
2020-04-14 18:13:19 -07:00
61c6a6b7b3 ovirt_storage_domain: fix update_check warning_low_space (#68505)
* ovirt_storage_domain: fix update_check warning_low_space

* add changelog
2020-04-14 18:11:46 -07:00
0e51aadd8e [stable-2.9] Add CentOS 8 to the test matrix (#68025)
* Add CentOS 8 to the test matrix (#63649)

(cherry picked from commit 2a7623dd5c)

* Skip PostgreSQL tests on CentOS 8

The tests in devel have diverged significantly from what is in
stable-2.9. It is easiest to skip these test for CentOS 8 in this branch
since they are still being run in devel.
2020-04-14 17:46:17 -07:00
b0e2321a17 setup - Use original logic for FQDN hostname builder 2020-04-14 17:39:42 -07:00
281af782e2 Fix purefa_snmp errors 2020-04-14 17:36:14 -07:00
32f41334fb Fix colorization to not extend across newline boundary (#68517)
* Fix colorization to not extend across newline boundary

* Fix unit test to look for the newline outside the coloration

* Add changelog fragment

(cherry picked from commit 2068131589)
2020-04-14 17:07:05 -07:00
52d509717e fallback to uid when no uname (#68466)
* fallback to uid when no uname

 fixes #68007

Co-Authored-By: Matt Clay <matt@mystile.com>
(cherry picked from commit 1570098e86)
2020-04-14 17:06:15 -07:00
8088ffb853 [2.9] Fix warning message in dense callback plugin
Fix dense callback plugin access to its configuration variables
and remove a warning message

Backport of https://github.com/ansible-collections/community.general/pull/83

Fixes: #64628
2020-04-14 17:04:51 -07:00
76f1aeb188 [stable-2.9] Always set the discovered interpreter on the delegated host (#64906)
* Always set the discovered interpreter on the delegated host. Fixes #63180

* Make code a little more generic

* Move code into a function

* Implement some changes based on reviews

* Add changelog fragment
(cherry picked from commit 123c624)

Co-authored-by: Matt Martz <matt@sivel.net>
2020-04-14 17:03:19 -07:00
gp
859cdc8695 [2.9] VMware: Fix cluster argument of module vmware_content_deploy_template
(cherry picked from commit 98f19c970f)

Signed-off-by: gp <gp@gparent.net>
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2020-04-14 16:52:14 -07:00
64d8947f7f [2.9] docs: Fixed "Edit on GitHub" link for plugin, cli
Fixed sphinx theme to navigate "Edit on Github" link to locate correct
plugin, cli source in GitHub repo.

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
(cherry picked from commit 2728c2476e)
2020-04-14 16:51:21 -07:00
80b9a0a25c avoid mkdir -p (#68921)
* also consolidated temp dir name generation, added pid for more 'uniqness'
* generalize error message
* added notes about remote expansion

CVE-2020-1733
fixes #67791

(cherry picked from commit 8077d8e401)
2020-04-14 16:46:23 -07:00
378434a148 passwordstore: Honor equal sign in userpass
passwordstore lookup plugin now can handle equal sign in user input

Fixes: ansible/ansible#68265

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2020-04-14 15:59:35 -07:00
9f22ef10b6 [2.9] Handle get_tags_for_object in vmware_rest_client
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2020-04-14 15:43:59 -07:00
a0491f804f Fix os_user_role issue to grant a role in a domain
Fixes #66525.

Backport of https://github.com/openstack/ansible-collections-openstack/commit/4c03ae.
2020-04-14 15:39:59 -07:00
203e74b73a Fix wrong parameter name in example
Changed from name to workflow_templated (the right parameter name)
2020-04-14 15:29:12 -07:00
1f304ef372 win_unzip - normalize and compare paths to prevent path traversal (#67799)
* Actually inspect the paths and prevent escape
* Add integration tests
* Generate zip files for use in integration test
* Adjust error message

(cherry picked from commit d30c57ab22)
2020-04-14 12:56:09 -07:00
938fb16069 adhoc: Load callbacks before sending v2_playbook_on_start (#67673)
(cherry picked from commit 370f788731)
2020-04-14 12:55:26 -07:00
f7c63c1201 get_url pass incorrect If-Modified-Since header(#67417) (#67419)
Fix #67417. HTTP header value of `If-Modified-Since` set by `get_url` does not follow HTTP protocol.

(cherry picked from commit 1097694355)
2020-04-14 12:55:12 -07:00
bf3cd041e7 Disable failing azure_rm_cosmosdbaccount test. 2020-04-09 17:47:56 -07:00
f75e1698f5 [stable-2.9] Optionally support task_uuid if passed from newer modules (#68556)
* Optionally support task_uuid if passed from newer modules

* Add changelog
2020-04-09 15:15:40 -07:00
8a14392a29 [stable-2.9] Update tests to use RHEL 7.8. (#68787)
* Update tests to use RHEL 7.8.

Keeping support for RHEL 7.6 since collections are still using it.

* Fix tests for RHEL 7.7+ due to extras repo name change..
(cherry picked from commit 04edd77c42)

Co-authored-by: Matt Clay <mclay@redhat.com>
2020-04-09 01:53:33 -07:00
89937180c5 Fix win_psrepository tests
Backport of a5414cb0e4

Signed-off-by: Rick Elrod <rick@elrod.me>
2020-04-09 00:32:06 -07:00
7a861dd2f1 OpenSUSE15.1 container image + necessary test change (2.9 edition) (#68788)
* add changelog fragment

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

* Update changelogs/fragments/ansible-test-opensuse-15.1.yml

Co-Authored-By: Matt Clay <matt@mystile.com>

* Update docker.txt to use the OpenSUSE 15.1 container image

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

* handle installing mysql on suse

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

* attempt to get tests passing again

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

Co-authored-by: Matt Clay <matt@mystile.com>
2020-04-09 00:29:32 -07:00
f1a21eb600 Backport of ansible-collections/community.general@7cec9cc972 (#68658) 2020-04-03 14:05:13 -05:00
6196aadcfa Backport of ansible-collections/community.crypto@28827db5d9 (#68630) 2020-04-03 14:03:22 -05:00
b84e3faa3f Add Kubernetes Working Group to Communicating guide. (#68501) 2020-04-03 14:02:12 -05:00
04ba05e003 document danger of kubectl options (#68195) 2020-04-03 14:01:34 -05:00
4433899b79 [2.9] vmware_cluster: Improve documentation for deprecated parameters (#68175)
* vmware_cluster: Improve documentation for deprecated parameters, with changelog fragment
2020-04-03 13:59:21 -05:00
d6a82e6865 galaxy - preserve mode properly on artifact (#68418) - 2.9 (#68451)
* galaxy - preserve mode properly on artifact (#68418)

* galaxy - preserve mode properly on artifact

* Fix py2 encoding issue

* Update lib/ansible/galaxy/collection.py

Co-Authored-By: Matt Clay <matt@mystile.com>

* Use sane defaults instead of sourcing from tarfile

Co-authored-by: Matt Clay <matt@mystile.com>
(cherry picked from commit 127d54b363)

* added mode to dir creation that was missed in backport
2020-03-31 16:00:07 -07:00
e5995a2eed Update Ansible release version to v2.9.6.post0. 2020-03-05 10:52:13 -08:00
9e3ccd64b6 New release v2.9.6 2020-03-04 18:23:12 -08:00
77be6d1b8d mysql_db: partial revert of backport #66998 2020-03-03 19:15:41 -08:00
6703ffd21d [stable-2.9] win_unzip - LiteralPath fix (#66972)
* win_unzip - LiteralPath fix

* Fix up Python sanity issues
(cherry picked from commit 2a9ec8975f)

Co-authored-by: Jordan Borean <jborean93@gmail.com>
2020-03-03 18:51:43 -08:00
8377f03eb2 Increase unit test timeouts. 2020-03-03 16:41:17 -08:00
1f2758af20 ansible-galaxy - fix role list bug (#67391) (#67619)
Properly list roles even when the role name is the same or a substring of the
path to the role.

(cherry picked from commit c64202a495)
2020-03-02 17:24:48 -08:00
7f90fde5b3 Bugfix of 65525: proxysql in check_config TypeError: tuple indices must be integers, not str (#66850) (#67334)
(cherry picked from commit a86524b2bb)
2020-03-02 17:22:35 -08:00
7051a7ff92 Fix eos_vlans docs (#67335)
wording in examples changed ios to eos (#66131)

wrong module was used in examples: should be eos_vlans not ios_vlans

(cherry picked from commit 506e2da0ff)

Add changelog for eos_vlans docs fix

Co-authored-by: qoreQyaS <github@gucke.net>
2020-03-02 17:22:21 -08:00
ed30858f50 Backport PR to fix the bug where IOS vlans module throws traceback (#67336)
* To fix the bug where IOS vlans module throws traceback (#64633)

* fix 64515

* add fix

(cherry picked from commit c5a2ba5217)

* changelog
2020-03-02 17:22:10 -08:00
49cb05d992 Fix creating IP specific firewall rules with Python 2 (#67394) 2020-03-02 17:21:40 -08:00
47fc7ab97d galaxy - Fix collection install dep resolver for bad versions (#67405) (#67413)
* Also make sure version is a string and not an int/float

(cherry picked from commit 4881af2e7e)
2020-03-02 17:21:17 -08:00
3d91f759c0 Backport/2.9/57737 ec2_asg unhandled exception (#67431)
* cope with an ASG instance not having a launch config any more (#57737)

* add changelog

Co-authored-by: Andrew de Quincey <adq@lidskialf.net>
2020-03-02 17:20:46 -08:00
1b65ecc71a azure_rm_rg_info: fix KeyError: 'ansible_facts' (#66729) (#67479)
* azure_rm_rg_info: fix KeyError: 'ansible_facts' (#66729)

* azure_rm_rg_info: fix KeyError: 'ansible_facts'

Fix facts for using old azure_rm_resourcegroup_facts, closes #66727

* fix intendation

(cherry picked from commit 569f0cf808)

* azure_rm_rg_info: add changelog fragment
2020-03-02 17:20:14 -08:00
587f241dbf Remove a host from a play after meta: end_host (#66851) (#67480)
* Remove a host from a play after meta: end_host

* Fix changelog

(cherry picked from commit a2c620819f)
2020-03-02 17:19:49 -08:00
ee9c5df0f0 vultr: Fix retry max delay param ignored (#67437) (#67513)
* vultr: Fix retry max delay param not taken

* add changelog

(cherry picked from commit bcd145c111)
2020-03-02 17:19:29 -08:00
f8aaa7dcd2 [2.9] VMware: vmware_export_ovf module fix Python3 compatibility issue (#67514)
(cherry picked from commit 023a9b3166)

Co-authored-by: Diane Wang <41371902+Tomorrow9@users.noreply.github.com>
2020-03-02 17:19:16 -08:00
e64b120bff openssl_* modules: prevent crash on fingerprint determination in FIPS mode (#67515) (#67519)
* openssl_* modules: prevent crash on fingerprint determination in FIPS mode.

* Add changelog.

(cherry picked from commit ca57871954)
2020-03-02 17:18:53 -08:00
e40e05576b [2.9] Fix links in Postgresql modules (#67525)
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
(cherry picked from commit 70b9bdbce6)
2020-03-02 17:18:39 -08:00
9351cbfde3 Fixi iscsi register backport (#67542)
* Fix KeyError for iSCSI parameters (#67463)

The required parameters for the LUN mapping for destination LUN is
address, port and iqn. However if the user doesn't pass parameters
like  CHAP authentication parameters, we will get KeyError. The patch
fixes the same.

* add changelog

Co-authored-by: Nijin Ashok <nashok@redhat.com>
2020-03-02 17:18:12 -08:00
151d83efc3 win_credential - fix wildcard name (#67549) (#67552)
(cherry picked from commit d7059881a2)
2020-03-02 17:17:58 -08:00
f243b39ef3 [stable-2.9] Do not error if collection specified null dependencies (#67575) (#67618)
(cherry picked from commit cffead4631)

Co-authored-by: Alan Rominger <arominge@redhat.com>

Co-authored-by: Alan Rominger <arominge@redhat.com>
2020-03-02 17:17:40 -08:00
ad4cad43ad Ovirt vm numa backport (#67700)
* ovirt_vm: correct numa nodes (#67611)

* init commit

* update docs

* update numa function name

* correct whitespaces

* add backport
2020-03-02 17:17:15 -08:00
a0c3d890c3 [stable-2.9] Allow SSH synchronization between Docker containers (#65698) (#67713)
* [stable-2.9] Allow SSH synchronization between Docker containers
(cherry picked from commit 1c15a485c2)

Co-authored-by: Nabil BENDAFI <nabil@bendafi.fr>

* Add changelog

(cherry picked from commit 854925b072)

Co-authored-by: Nabil BENDAFI <nabilbendafi@users.noreply.github.com>
2020-03-02 17:16:58 -08:00
18377e6390 [2.9] Allow nxos_l2_interfaces to append the allowed vlans list (#67703)
* Added Fix - Allow nxos_l2_interfaces to append the allowed vlans list (#66517)

* Added Integration tests

* Corrected lint errors

* Added fix for bug # 54400

* Revert "Added fix for bug # 54400"

This reverts commit bf42db4269.

* Revert "Adding files for RM static_routes"

This reverts commit dafdd92d43.

* Revert "Added Integration tests"

This reverts commit 129dc87682.

* Bug Fix 65332

* Added testcase for #66517

* Removed unnecessary commit

* fixing conflicts

* fixing conflicts

* addressed mikeweibe's comments

* Corrected lint errors

* Added idempotent tc for add vlans

* Added replaced and overridded tcs for trunk vlan add

(cherry picked from commit 4ac89b8ac7)

* backport to PR #66517
2020-03-02 17:16:23 -08:00
c3dbd69a1b [Backport/2.9/66098]: Fix duplicate log entries (#67719)
* Fix duplicate log entries (and add item support for failures) (#66098)


(cherry picked from commit 936bd83614)

* Backport + changelog for #66098
2020-03-02 17:15:58 -08:00
449626feb5 [2.9] hostname: Use hostnamectl for Systemd strategy (#67721)
Use hostnamectl command to get current hostname for host while using
systemd strategy.

Fixes: #67661

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
(cherry picked from commit 53aa258d78)
2020-03-02 17:15:36 -08:00
9c17410f58 strip spaces for each value in host list lists (#67701) (#67740)
(cherry picked from commit 9ea5bb3364)
2020-03-02 17:15:10 -08:00
afb389e588 Fix inline vaults for plugins in ensure_type (#67492) (#67741)
* Fix implicit string - only looked right because of the vault __repr__
* Add tests for strings and implicit strings

(cherry picked from commit 8eb00dd14c)
2020-03-02 17:14:42 -08:00
e379dc76c3 Run Powershell modules on windows container via docker connection (#67832) (#67872)
* Run modules on windows container

This provides an ability to run Powershell modules on windows container via docker connection. Otherwise, Ansible tries to run python modules on windows containers and fails.

* Removing whitespace in the blank lines

* Adding a changelog fragment

(cherry picked from commit e0eee3c37e)

Co-authored-by: Ruheena Ansari <ruheena0105@tamu.edu>
2020-03-02 17:14:13 -08:00
3fb4d109ce acme_* modules: adjust documentation to reference RFCs 8737 and 8738 instead of the drafts (#67881) (#67882)
* Adjust documentation to reference RFCs 8737 and 8738 instead of the drafts.

* More references.

(cherry picked from commit 35fd86c6bc)
2020-03-02 17:13:37 -08:00
ff3d3b59e2 Remove redundant check for pyopenssl (#67901) (#67903)
(cherry picked from commit 44d8ce9b31)

Co-authored-by: gp <gp+github@gparent.net>
2020-03-02 17:13:07 -08:00
6e7383807a Ovirt vm deprecated backport (#67923)
* ovirt_vm: remove deprecated warning (#67922)

* ovirt_vm: remove deprecated warning of boot params

* update docs

* add changelog
2020-03-02 17:12:47 -08:00
2376f20bd9 line indentation issue in postgresql_set (#67859)
Fixed indentation issue with the `register` for the example task in postgresql_set module.
(cherry picked from commit b437167671)
2020-03-02 16:31:00 -08:00
1e8bebb20b Bump min openstacksdk version for os_network/{port_security_enabled,mtu}
To make use of the port_security_enabled [a] and mtu [b] parameters,
[c] and [d] need to be present in the openstacksdk or the os_network
module with return an error like:

TypeError: create_network() got an unexpected keyword argument 'port_security_enabled'

or:

TypeError: create_network() got an unexpected keyword argument 'mtu'

To handle this, we fail the module if one of the arguments are used
and the minimum openstacksdk version for that argument is not met.

[a] eaf238b033
[b] c6a8e99d34
[c] 8eb788af07
[d] a1fc820a2f

Backport-of: https://review.opendev.org/708119
Fixes: https://github.com/ansible/ansible/issues/62062
Change-Id: I2b80dc721a08bbdb530af3705ae99cf1b579d9f0
2020-03-02 15:54:22 -08:00
f90c7411e8 Bugfix of 65351: mysql_db create dump with CREATE DATABASE and USE instruction 2020-03-02 15:25:14 -08:00
cddecf8c05 Backport/2.9/60508 (#67531)
* route53: improve octal encoded characters handling

* Update changelogs/fragments/60508-route53-improve-octal-characters-handling.yml

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

Co-authored-by: Felix Fontein <felix@fontein.de>
2020-03-02 14:52:19 -08:00
a24dcf232c docker_login: fix permissions for ~/.docker/config.json (#67353)
* Fix permissions for ~/.docker/config.json.

* Add changelog, remove debug output.

(cherry picked from commit 55cb8c5388)
2020-03-02 14:41:03 -08:00
6fc2ae7476 [stable-2.9] Clean up CONDITIONAL_BARE_VARS warning. Fixes #67735 (#67751).
(cherry picked from commit 6e1a59174a)

Co-authored-by: Matt Martz <matt@sivel.net>
2020-03-02 14:31:55 -08:00
0f7d62f6a5 ansible-galaxy - optimise some paths and use fake galaxy int tests (#67685) - 2.9 (#67874)
* ansible-galaxy - optimise some paths and use fake galaxy int tests (#67685)

* ansible-galaxy - optimise some paths and use fake galaxy int tests

* Added init, built, and publish tests

* Test against both mocked Galaxy and AH server

* Finish off writing the install tests

* Fix up broken tests

* Rename test target and add migrated tests

* Use cloud provider for Galaxy implementation

* Added blank static config

* Use correct alias group

* Set release version and fix copy typo

* Remove reset step as it is no longer needed

* Use sane env var names for test container name

(cherry picked from commit 26129fcb80)

* Use --api-key and not --token

* Set fallaxy tests as a smoketest

(cherry picked from commit b241c021b7)
2020-03-02 14:26:27 -08:00
b38603c45e Templating: make sure only one variable results are cached (#67429)
* Make sure only one variable results are cached.

* Add changelog.

* Add test.

(cherry picked from commit c520d70bf4)
2020-03-02 14:20:42 -08:00
48bfa3e906 Fix to - eos_vlans using state parameter replaced is giving odd behavior (#67346)
* backport PR 67318

* added changelog file

* Added missing fixture file
2020-03-02 14:17:56 -08:00
7cac554222 Add collection support for network platform agnostic modules (#66342)
*  Refactor net_base action plugin to invoke platform
   action plugin with implementation module name updated
   in the new task copy.

(cherry picked from commit 0d85ab1fe3)
2020-03-02 14:00:55 -08:00
eb01926b43 Backport PR #67339 - Fix proxysql module cursor_class (#67471)
* Fix merge conflicts

* remove db_conn  as mysql_utils was not backported from devel

* fix indentation for sanity check
2020-03-02 13:54:52 -08:00
9c1794ebfd remove unused import 2020-03-02 13:51:34 -08:00
39cfb63be6 Allow no_log=False to silence the no_log warnings for module parameters (#64733) (#67439)
As AnsibleModule._log_invocation is currently implemented, any parameter
with a name that matches PASSWORD_MATCH triggers the no_log warning as a
precaution against parameters that may contain sensitive data, but have not
been marked as sensitive by the module author.

This patch would allow module authors to explicitly mark the aforementioned
parameters as not sensitive thereby bypassing an erroneous warning message,
while still catching parameters which have not been marked at all by the
author.

Adds tests for various no_log states including True, False, and None (as
extracted by AnsibleModule._log_invocation) when applied to an argument with
a name that matches PASSWORD_MATCH.

Fixes: #49465 #64656
(cherry picked from commit 3ca4580cb4)
2020-02-24 16:54:29 -06:00
1bab4c99f3 Backport of 67645 docs/docsite/rst/: fix typos (#67649) 2020-02-24 16:51:23 -06:00
4cc4d77c4b [2.9] Backport /docs/docsite/rst: fix typos (#67650)
* user_guide/intro_adhoc.rst: fix typo (#67644)

(cherry picked from commit 05a3192eb7)

* dev_guide/developing_modules_best_practices.rst: fix typo (#67639)

(cherry picked from commit 244277addd)

* /docs/docsite/rst/dev_guide: fix typos (#67643)

(cherry picked from commit 907c98ebcd)
2020-02-24 16:49:40 -06:00
c6a29ed7d2 [stable-2.9] Update example requirements file docs (#67626) (#67714)
Use "name" when possible rather than "src" to make the examples
of roles and collections in a single requirements files more
coherenant. Fundamentally, roles and collections are completely different.
But we can make the requiremets file easier to read by unifying the
format as much as possible.
(cherry picked from commit 6c70959131)

Co-authored-by: Sam Doran <sdoran@redhat.com>
2020-02-24 16:48:36 -06:00
0da817b827 postgresql_info module: fix broken link (#67517) (#67521)
(cherry picked from commit 5a7c58b2be)
2020-02-18 09:48:24 -06:00
e047c8c70e ovirt_disk: correct description of storage_domain (#67454) (#67518)
* ovirt_disk: correct description of storage_domain
* add changelog

Signed-off-by: mnecas <necas.marty@gmail.com>
Co-authored-by: Abhijeet Kasurde <akasurde@redhat.com>
2020-02-18 09:43:10 -06:00
80e5ed0bba Specify lowercase only for Galaxy namespaces (#67485) (#67503)
* specify lowercase only for galaxy namespaces
* doh... include meta file

(cherry picked from commit a60feeb3c1)
2020-02-17 17:39:59 -06:00
79ad190f71 [backport][2.9]Add note that devel branch should not be used in real environments (#… (#67494)
* Add note that devel branch should not be used in real environments (#67483)

(cherry picked from commit 39fef58bea)
2020-02-17 15:12:45 -06:00
9895e18e24 Clarify b64encode with Python 2 (#67488) (#67491)
(cherry picked from commit 423a900791)
2020-02-17 15:12:18 -06:00
a95c76855d Fix broken links in crypto, docker and hetzner modules. (#67360) (#67363)
(cherry picked from commit 11e75b0af2)
2020-02-17 10:47:48 -06:00
227f498314 stable-2.9: Restore Tower integration tests. (#67395)
* Move tower_common tests with tower_organization.

(cherry picked from commit c92697acec)

* Test: Bump TOWER_VERSION to supported version (#67378)

* Revert "Remove Tower module tests from CI. (#67368)"

This reverts commit b041d96762.

* Test: Bump TOWER_VERSION to 3.6.2

(cherry picked from commit b9bd2c25ca)

Co-authored-by: Yanis Guenane <yguenane@gmail.com>
2020-02-13 16:22:24 -08:00
8fc3dfca32 Update Ansible release version to v2.9.5.post0. 2020-02-13 13:17:47 -08:00
9388be4269 New release v2.9.5 2020-02-13 08:30:05 -08:00
6f95e9629b [stable-2.9] Remove Tower module tests from CI. (#67368) (#67371)
* [stable-2.9] Remove Tower module tests from CI. (#67368)

* Remove Tower module tests from CI.

The required AMIs are no longer available.

* Mark Tower tests as unsupported..
(cherry picked from commit b041d96762)

Co-authored-by: Matt Clay <mclay@redhat.com>

* Mark tower_common unsupported.
2020-02-12 22:13:39 -08:00
aeade1412f Docs: improve anchors vs. header bar (#67244) (#67317)
(cherry picked from commit fd43619f1a)
2020-02-11 15:00:56 -06:00
b49d1d9810 Backport ovirt disk docs (#67301)
* ovirt_disk: update interface docs (#67272)
* add changelog
2020-02-11 09:51:14 -06:00
04994e8dfb [stable-2.9] ansible-test - add constraint for virtualenv (#67289)
* ansible-test - add constraint for virtualenv

* Limit virtualenv only on macOS.

Co-authored-by: Matt Clay <matt@mystile.com>
(cherry picked from commit 8f296a6533)

Co-authored-by: Sam Doran <sdoran@redhat.com>
2020-02-10 18:01:51 -08:00
1dafd80eab fix changelog entry failing rstcheck 2020-02-10 18:01:26 -08:00
54ca524da3 nxos_interfaces: RMB state fixes (#63960) (#67173)
* nxos_interfaces: RMB state fixes

* shippable fixes

* Add add'l comments per review

* fix long line

* Fix mode/enabled system defaults handling

* fix N3L test skips

* lint

* test updates for titanium images

* doc fix

(cherry picked from commit d72025be75)

Add changelog for nxos_interfaces fix

Co-authored-by: Chris Van Heuveln <cvanheuv@cisco.com>
2020-02-10 15:35:49 -08:00
c956f9cffe fix systemd use in container builds (#66062) (#67140)
* systemd: unify "systemctl show" failure cases

* systemd: is-enabled to detect configured state

* systemd: is-enabled to detect masked status

(cherry picked from commit b868f1c933)
2020-02-10 15:33:22 -08:00
aa64519072 wait_for_connection: also retry interpreter discovery (#67040) (#67136)
self._discovered_interpreter_key is None unless a previous iteration
has attempted discovery.  In that case, force re-discovery, as the
previous attempt certainly failed.

(cherry picked from commit fd954a9c5c)
2020-02-10 15:32:31 -08:00
7b03b581dc Make nios_txt_record use text field for object lookup (#67120)
Up until now, nios_txt_record assumed that the name and view
parameters uniquely described a TXT record. What this meant is that it
was impossible to have more than one TXT record with a certain name.

Changes in this commit expands the set of parameters that uniquely
identify the TXT record with a text field.
2020-02-10 15:31:19 -08:00
569218f0cd Fix removed_in_version to support honor suboptions (#66918) (#67104)
* Add unit tests.
* Fix reporting for removed_in_version.
* Add changelog.

(cherry picked from commit fe454d27a1)
2020-02-10 15:30:37 -08:00
f330286734 [Backport/2.9/66604] Fix powershell path_join for UNC path handling (#67073)
* Update to use os.ntpath

(cherry picked from commit 1522820612)

* Add changelog for #66604

(cherry picked from commit 40761c73b6)
2020-02-10 15:29:36 -08:00
42cae0a801 openssl_publickey: forgot to pass backend (#67036) (#67039)
* Forgot to pass backend.

* Add changelog.

* Pass on backend from get_fingerprint.

* Handle cryptography backend in get_fingerprint.

(cherry picked from commit a0e5e2e4c5)
2020-02-10 15:28:52 -08:00
5ca28963e5 Backport of 66806: mysql_variables not supporting variables name with dot (#67007) 2020-02-10 15:27:55 -08:00
287ea7d319 Fix user_agent string not getting set (#67001)
(cherry picked from commit cb9e24fbd2)
2020-02-10 15:26:39 -08:00
c529c86c1e Backport of 66995: mysql_user doesnt support privileges with underscore (#66998) 2020-02-10 15:24:12 -08:00
5d406cffca Bump minimum openstacksdk version when using os_network/dns_domain (#66952)
With the addition of [a], the minimum openstacksdk version needs to
be bumped to include [b], or the os_network module will return the
error:

TypeError: create_network() got an unexpected keyword argument 'dns_domain'

To handle this, we fail the module if the dns_domain argument is used
and the minimum openstacksdk version for that argument is not met.

[a] 6c74e29618
[b] a3e846e2b9

Fixes: #64495
Fixes: #64841
2020-02-10 15:23:38 -08:00
31e348409f [stable-2.9] nxos_facts: Don't fail if faninfo isn't reported (#66866) (#66949)
(cherry picked from commit bf65e7a)

Co-authored-by: Nathaniel Case <ncase@redhat.com>
2020-02-10 15:21:59 -08:00
69ba90098a When no pool quantity is set, then do not set quantity to 1 (#66807) (#66933)
* Fixes #66478
* When no quantity is set, then candlepin server usually uses
  default value 1. When more quantities are required, then
  candlepin server can automatically choose correct minimal
  value.

(cherry picked from commit 6f1bb37feb)
2020-02-10 15:21:16 -08:00
f54263c459 Backport/2.9/55220 (#66757)
* Working Cisco IOS macro editing (fixes #55211) (#55220)

* Working Cisco IOS macro editing (fixes #55211)

* Working Cisco IOS macro editing [fixed pylints] (fixes #55211)

* Added integration tests for edit_macro

* Added conditional integration tests for ios_config macro

* Cosmetic fix: when near block for added conditional integration tests for ios_config macro

* Move teardown to always for block

(cherry picked from commit 4a0c875447)

* changelog

Co-authored-by: Albert Siersema <albert@mediacaster.nl>
2020-02-10 15:19:57 -08:00
77985f2beb galaxy: fix AttributeError on empty requirements.yml (#66726) (#66752)
* galaxy: fix AttributeError on empty requirements.yml

* add changelog

(cherry picked from commit 9e8fb5b7f5)
2020-02-10 15:18:37 -08:00
f8c4a38ffe Backport PR to fix the duplication of IPV6 address with replace state in ios_l3_interfaces module (#66680)
* fix 66530 (#66654)


(cherry picked from commit 0c4f167b82)

* changelog

* Update 66654-fix-ipv6-duplication-for-replace-state-ios-l3-interfaces.yaml

Co-authored-by: Matt Davis <nitzmahone@users.noreply.github.com>
2020-02-10 15:17:58 -08:00
481327ec37 group - correctly determine if a local group exists. (#59772) (#67176)
Fixes #58619
Add integration test

(cherry picked from commit 80c4b86abe)
2020-02-10 15:16:15 -08:00
0ed22d1fbc add info on creating doc fragments in a collection (#67171) (#67279)
* add info on creating doc fragments in a collection
Co-authored-by: Alicia Cozine <879121+acozine@users.noreply.github.com>

(cherry picked from commit 4dd2513371)
2020-02-10 15:14:46 -08:00
361d7c677f Fix DNF idempotency. (#66209) (#66578)
(cherry picked from commit a7e4479d01)
2020-02-10 14:27:31 -08:00
99c96bbf42 [2.9] gitlab_project_variable: Remove sensitive information (#66559)
Redact GitLab Project variables which might include sensetive information
such as password, api_keys and other project related details.

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
(cherry picked from commit 84b68aa05f)
2020-02-10 14:25:29 -08:00
6f0f2c9d68 [stable-2.9]add one note to help ansible user to understand the requirements to (#65969) (#66493)
execute iosxr_command module

Signed-off-by: Peng Xiao <xiaoquwl@gmail.com>
(cherry picked from commit 69f9c3c8eb)
2020-02-10 14:24:56 -08:00
a764f332f9 Declare support for Python 3.8 @ Trove classifiers (#66514)
(cherry picked from commit ee290bf5b1)

Co-authored-by: Sviatoslav Sydorenko <wk.cvs.github@sydorenko.org.ua>
2020-02-10 14:23:21 -08:00
57fbb0e571 Backports/2.9/67188 aws_az_info: Fix rename deprecaction warning (#67208)
* aws_az_info: Fix rename deprecaction warning (#67188)

* Add changelog
2020-02-10 14:22:43 -08:00
a9c3bfa96c Backport PR #66219 to support the backport of PR #64733 (#67209)
* Update user module to support no_log=False. (#66219)

Updates the user module to support pull request #64733. Neither the
update_password or password_lock field contains sensitive information, so
mark them as such.

(cherry picked from commit 40394ed671)

* Backport PR #66219 to support PR #64733

Backport PR #66219 to support the backport of PR #64733
(see: https://github.com/ansible/ansible/pull/66219).

* Delete backport-66219-update-user-module-for-64733.yml

* Update 66219-update-user-module-for-64733.yml

Co-authored-by: Matt Davis <nitzmahone@users.noreply.github.com>
2020-02-10 14:21:45 -08:00
7ace25dd6d Backport of pmrun.py: Recreate the older behavior where the entire success command was quoted (#67241)
* pmrun - quote success command (#66929)

* Recreate the older behavior where the entire success command was quoted

* Use shlex_quote for a correct fix of this

* Add changelog fragment

(cherry picked from commit fd8eb77cc3)

* Backport of 66929-pmrun-quote-entire-success-command-string

* Update changelog fragment

* Delete 66929-pmrun-quote-entire-success-command-string.yml

Unclear from docs, but this is the devel fragment so removing.

* Update changelog
2020-02-10 14:20:14 -08:00
182831d8b0 Make banner detection non-greedy in ios_banner (#63092) (#66274)
* Make banner detection non-greedy in ios_banner (#63092)

* Make banner detection non-greedy in ios_banner

* Added ios_banner unit test to detect bug #63091

* Corrected PEP8 errors

* Added integration test

* Corrected typo in integration test

(cherry picked from commit 01a92f0191)

* Added changelog fragment

* Update 66274-ios_banner_nongreedy.yml

Co-authored-by: kalimsshar <34369784+kalimsshar@users.noreply.github.com>
Co-authored-by: Matt Davis <nitzmahone@users.noreply.github.com>
2020-02-10 14:15:40 -08:00
b390f808d9 Link the testing documentation to the module documenting page (#67248) (#67288) 2020-02-10 14:15:20 -08:00
93e66c1362 Backport ovirt job (#67076)
* ovirt_job: add when job is detected but in state finished (#66810)

* ovirt_job: add when job is detected but in state finished

* add docs

* add changelog
2020-02-10 14:14:56 -08:00
045fc371eb win_uri: fix up tests (#67064) (#67066)
(cherry picked from commit 3ada0b2f65)
2020-02-10 14:14:28 -08:00
b9a2466e76 docker_container and docker_swarm_service: allow to actually disable healthcheck of image (#66599) (#67056)
* Allow to actually disable healthcheck of image.

* Add changelog.

(cherry picked from commit 5c1a3a3ac2)
2020-02-10 14:14:13 -08:00
e42c007753 Fix pacman: "IndexError: list index out of range" #63077 (#65750) (#67011)
* Fix #63077

If the package is already installed the stdout is not as expected by this function. Either remove `--needed` or just noop if we detect pacman returning. We cannot match the stdout string, as that is most likely localized.

```
[root@archBook user]# /usr/bin/pacman --upgrade --noconfirm --noprogressbar --needed  /srv/aur/src/i3cat-git/i3cat-git-r38.c6d29dd-1-x86_64.pkg.tar.xz
loading packages...
warning: i3cat-git-r38.c6d29dd-1 is up to date -- skipping
 there is nothing to do
```

* Add comment

Add comment

* Add changelog fragment.

Co-authored-by: Felix Fontein <felix@fontein.de>
(cherry picked from commit 14b1febf64)

Co-authored-by: Klaus Frank <agowa338@users.noreply.github.com>
2020-02-10 14:13:51 -08:00
a2b5af86dd [stable-2.9] include_vars - fix stack trace when run ad-hoc with dirs parameter (#66581) (#66910)
Add integration test

There are a number of other parameters that result in stack traces as well when this module is used ad-hoc. I'm not sure if we're interested in fixing them all since this module isn't meant to be run ad-hoc.
(cherry picked from commit cc2376b782)

Co-authored-by: Sam Doran <sdoran@redhat.com>
2020-02-10 14:13:22 -08:00
aaadf71438 [stable-2.9] tests: ipify_facts: retry on fail (#66897) (#66903)
(cherry picked from commit 91063f40d6)

Co-authored-by: Rene Moser <mail@renemoser.net>

Co-authored-by: René Moser <mail@renemoser.net>
2020-02-10 14:12:54 -08:00
becf3fbf97 Ovirt add search with space (#66890)
* ovirt search name with space (#59184)

* init ovirt_search_name_with_space

* add search_by_name with whitespace

* add comments

* add changelog
2020-02-10 14:12:28 -08:00
587ed81d16 Backport ovirt network correct (#66886)
* ovirt_network: correct when not specified external_provider (#66859)

* add backport
2020-02-10 14:11:53 -08:00
783daf9d1b throttle: fix linear based strategies (#65422) (#66805)
* throttle tests: fix detection of parallel execution

The test wasn't able to detect if too many workers were running.

On my laptop:
- without this change, the 'throttle' target takes ~20 seconds
- with this change, the 'throttle' target takes ~70 seconds
- 1 second isn't long enough to encounter the issue

* Fix throttle test when strategy is 'free' based

'free' strategy allows multiple tasks to be executed in parallel: use
one 'throttledir' per task.

Use 'linear' strategy with a dedicated play for cleanup/setup tasks

* throttle: reset worker idx before queuing a new task

* TestStrategyBase: define task.throttle

otherwise '1' will be used instead of the default value due to the
following expression being equal to '1':

    int(templar.template(task_mock.throttle))

Co-authored-by: James Cammarata <jimi@sngx.net>
(cherry picked from commit bbbdc1c25c)
2020-02-10 14:11:17 -08:00
6df09ae41e pamd: Fix AttributeError when removing the first or last rule (#66398) (#66776)
(cherry picked from commit a4b59d0213)
2020-02-10 14:10:48 -08:00
474e6b1094 Backport 2.9: nxos_telemetry - Fix fact gathering for sensor-groups (#66677)
* Fix fact gathering for sensor-groups (#66439)

(cherry picked from commit 5c158755fc)

Add changelog for nxos_telemetry fix

* Update 66439_fix_nxos_telemetry_facts.yaml

Co-authored-by: Mike Wiebe <mwiebe@cisco.com>
Co-authored-by: Matt Davis <nitzmahone@users.noreply.github.com>
2020-02-10 14:10:29 -08:00
0952dad9e2 [stable-2.9] jenkins_job module: fix for python3 (#66642)
* jenkins_job module: fix for python3 (#54958)

* jenkins_job module: add changelog fragment
2020-02-10 14:10:12 -08:00
0731fff994 [stable-2.9] Reinstall i18n files for PostgreSQL tests (#66734) (#66769)
I am removing these from the test image to reduce its size a bit.
(cherry picked from commit 9df9ed4cd3)

Co-authored-by: Sam Doran <sdoran@redhat.com>
2020-02-10 14:09:32 -08:00
13023455e1 [stable-2.9] display - remove extra new line after warning message (#65199) (#66768)
Add unit tests for display
(cherry picked from commit 8e195adda5)

Co-authored-by: Sam Doran <sdoran@redhat.com>
2020-02-10 14:09:11 -08:00
3245b3dff2 [stable-2.9] synchronize - fix password authentication (#66542) (#66661)
On Python 2, leave all fds open since there is no mechanism to close specific fds with subprocess.Popen() on Python 2

Add unit tests.

Co-authored-by: Matt Martz <matt@sivel.net>
(cherry picked from commit 617fbad743)

Co-authored-by: Sam Doran <sdoran@redhat.com>
2020-02-10 14:08:16 -08:00
6120cd18e2 [stable-2.9] podman - fix rootless container copy no pause (#66583) (#66588)
Fixes #66263

Signed-off-by: Adam Miller <admiller@redhat.com>
(cherry picked from commit 077a8b4898)

Co-authored-by: Adam Miller <admiller@redhat.com>

Co-authored-by: Adam Miller <admiller@redhat.com>
2020-02-10 14:07:26 -08:00
c4f1e04bef [stable-2.9] file - change _diff_peek type in argument_spec (#60428) (#66587)
* Add integration tests
* Handle error in _get_diff_data()
* Change to warning rather than error
* Also change failure to warning in assemble action plugin
(cherry picked from commit 9b7198d25e)

Co-authored-by: Sam Doran <sdoran@redhat.com>
2020-02-10 14:07:07 -08:00
3284262a60 Use UTF-8 without a BOM for win coverage (#66510) (#66513)
(cherry picked from commit e459eac565)
2020-02-10 14:06:39 -08:00
04d5325c3f Document network resource modules (#66226) (#67053)
* add network resource module details to docs

(cherry picked from commit 3e35d2d63ce17fb694e645785ad855f01420f7d8)

* network resource module page, with example output

(cherry picked from commit 2ad6055efd)
2020-02-05 10:35:59 -06:00
05df06fe4d Add anchor to each parameter row (#66895) (#67057)
* Add anchor to each paramater row
* Update docs/templates/plugin.rst.j2
* Insert full keys into plugin docs.
* Added visible links.

Co-authored-by: Felix Fontein <felix@fontein.de>
(cherry picked from commit 5b93a14a0f)

Co-authored-by: Dick Visser <dick.visser@geant.org>
2020-02-05 10:35:17 -06:00
c8610efa24 Network prompts (#66584) (#67054)
* add network prompt examples and module examples

* Update docs/docsite/rst/network/user_guide/network_working_with_command_output.rst

Co-Authored-By: Nathaniel Case <this.is@nathanielca.se>
(cherry picked from commit 68ab8c23be)
2020-02-05 10:28:44 -06:00
aff77f7b02 win_mapped_drive - Add WebDAV information (#67111) (#67112)
(cherry picked from commit f23cee2145)
2020-02-05 10:22:03 -06:00
a8657de818 Ovirt add docs ova backport (#66653)
* ovirt_vm: add docs about importing ova (#66652)

Signed-off-by: mnecas <necas.marty@gmail.com>
2020-02-05 09:58:09 -06:00
1e7434c49d Adding network plugin changes for netconf and network_cli (#65708) (#67049)
* Adding network plugin changes for netconf and network_cli

(cherry picked from commit b349ec8fcf)
2020-02-04 12:20:13 -06:00
a8b71747ae [stable-2.9] Add constraints for Jinja2 on Python 2.6. (#66826)
* Add constraint for Jinja2 on Python 2.6.

* Fix constraint in inventory_aws_conformance test.

* Add constrraints for template_jinja2_latest test.
(cherry picked from commit 965854fbd2)

Co-authored-by: Matt Clay <matt@mystile.com>
2020-01-27 15:18:49 -08:00
29cdd1ccca [stable-2.9] Change package name in docker_setup integration test (#66572)
* Change package name

* Retry to hopefully get a good mirror
(cherry picked from commit f15050b09e)

Co-authored-by: Sam Doran <sdoran@redhat.com>
2020-01-24 11:31:35 -08:00
26a09160eb Trim down to one Ansible search option (#66284) (#66664)
* move swiftype search to upper left of docsite, fix spacing and length issues for search icon and searchbox

(cherry picked from commit 1a0724fdd4)
2020-01-22 15:42:59 -06:00
af0a72df30 Add a banner which will display on the testing site. (#64763) (#66666)
* Add a banner which will display when the docs are published to the testing site.
Thanks to shane for the javascript code

Co-authored-by: Sandra McCann <samccann@redhat.com>
(cherry picked from commit 365820f871)

Co-authored-by: Toshio Kuratomi <a.badger@gmail.com>
2020-01-21 15:58:44 -06:00
c99f753239 Update Ansible release version to v2.9.4.post0. 2020-01-20 14:41:07 -08:00
818c66163e New release v2.9.4 2020-01-20 12:55:02 -08:00
e283c180d1 [stable-2.9] yum - fix bug where enablerepo is not honored when disablerepo all (#66557) (#66640)
Fixes #66549

The inefficiency improvement
https://github.com/ansible/ansible/pull/63713 introduced a bug where
`enablerepo` was not being honored if combined with
`disablerepo="*"`. This fixes that issue.

Signed-off-by: Adam Miller <admiller@redhat.com>
(cherry picked from commit 22fe22f796)

Co-authored-by: Adam Miller <admiller@redhat.com>

Co-authored-by: Adam Miller <admiller@redhat.com>
2020-01-20 12:48:24 -08:00
85f36a3a42 restructure headings and copy-edit shell completion (#66479) (#66536)
* Docs: restructure headings and fix shell completion on installation guide, apply suggestions from code review

(cherry picked from commit 599cc0bdfa)
2020-01-16 10:49:03 -06:00
cfc6e573c5 Update Ansible release version to v2.9.3.post0. 2020-01-15 15:58:49 -08:00
6832d8bf6a New release v2.9.3 2020-01-15 15:25:23 -08:00
a951e007df [stable-2.9] Ignore warnings in ansible-test environment check.
(cherry picked from commit 3db1ac4f56)

Co-authored-by: Matt Clay <matt@mystile.com>
2020-01-14 08:50:47 -08:00
41df8ec8c2 Remove Server 2008 from CI 2020-01-14 00:02:20 -08:00
41ec9a8516 [stable-2.9] Add test constraint for setuptools. (#66426)
* Add test constraint for setuptools.

* Update pip test to work on centos6 container.
(cherry picked from commit 51e5b714e0)

Co-authored-by: Matt Clay <matt@mystile.com>
2020-01-13 13:52:12 -08:00
c94aa6dde6 adjusted doc and argument spec in zabbix modules to match sanity requirements (#66176)
(cherry picked from commit 3456700420)
2020-01-13 13:51:26 -08:00
de0936f9c4 add details on network gather facts improvements (#66220)
* add details on network gather facts improvements, implement feedback

(cherry picked from commit 9922014441)
2020-01-13 13:35:00 -08:00
d97a9a75bd Fix callback set_options issue with collections (#66128)
Fixes: #66127
(cherry picked from commit 7888eafb82)
2020-01-13 11:48:04 -08:00
5dc1d93eac Fix iosxr netconf plugin get device info (#65489)
* Fix iosxr netconf plugin get device info

Fixes https://github.com/ansible/ansible/issues/64634

*  Catch execption if the xml payload to get
   device info is not valid for iosxr version
   running on remote host.

* Fix CI issue

(cherry picked from commit 3919a891c2)
2020-01-13 11:39:40 -08:00
2d7819e75d Fix netconf plugin related to collections (#65718)
* Fix netconf plugin related to collections

Fixes #65655 (partly)

*  Make netconf plugins configurable so that the
   information of ncclient device handler
   for give platform resides in the platform
   specific netconf plugin.
*  If the device handler value in ncclient is
   different from the ansible_network_os value
   the right value of `ncclient_device_handler`
   should be set in the plugin documentation.

* Fix review comments

* Fix CI issue

* Fix review comment

(cherry picked from commit 1cfab26fab)
2020-01-13 11:28:51 -08:00
5d16603b2e Test fix (#65132)
(cherry picked from commit 89954e6ef5)
2020-01-10 18:54:07 -08:00
7769cc82d3 fix nxos_hsrp keyerror (#65796)
Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>
(cherry picked from commit cb2a45d286)

Add changelog for nxos_hsrp fix

Signed-off-by: NilashishC <nilashishchakraborty8@gmail.com>
2020-01-10 18:53:53 -08:00
247c73432e Fix nxos_user roles bug (#65962)
(cherry picked from commit c2fed8603c)

Add changelog for nxos_user roles fix
2020-01-10 18:53:34 -08:00
4f3dd5a043 nxos_vlans: fix rmb behaviors and tests (#63650)
* nxos_vlans: fix rmb behaviors and tests

* whitespace fixes

* whitespace fixes 2

* review comments addressed

* TBD for legacy support

* additional tests to hit code coverage misses

* whitespace

(cherry picked from commit 3252665a94)

Add changelog for nxos_vlans fix

Signed-off-by: NilashishC <nilashishchakraborty8@gmail.com>
2020-01-10 18:53:08 -08:00
984e38d829 Temporarily disable vpc peer-link tests (#66121)
Signed-off-by: NilashishC <nilashishchakraborty8@gmail.com>
(cherry picked from commit 97aefb8e11)
2020-01-10 18:52:36 -08:00
54e0b2aa30 Make autocost bandwidth calculation a floor division for Py3 compatibility (#66095)
Signed-off-by: NilashishC <nilashishchakraborty8@gmail.com>
(cherry picked from commit 06927eab1f)

Add changelog for nxos_ospf_vrf fix

Signed-off-by: NilashishC <nilashishchakraborty8@gmail.com>
2020-01-10 18:52:18 -08:00
0d3c5c4bac Fix nxos_snmp_community command ordering (#66094)
Signed-off-by: NilashishC <nilashishchakraborty8@gmail.com>
(cherry picked from commit 4674435367)

Add changelog for nxos_snmp_community fix

Signed-off-by: NilashishC <nilashishchakraborty8@gmail.com>
2020-01-10 18:51:29 -08:00
4a034fdf4e Fix rendering duplicate peer-ip commands (#66088)
Signed-off-by: NilashishC <nilashishchakraborty8@gmail.com>
(cherry picked from commit 0ebb0ac0fa)

Add changelog for nxos_vxlan_vtep_vni fix

Signed-off-by: NilashishC <nilashishchakraborty8@gmail.com>
2020-01-10 18:51:06 -08:00
53847bd529 Fix nxos_l3_interfaces rendering of dhcp (#66049)
Signed-off-by: NilashishC <nilashishchakraborty8@gmail.com>
(cherry picked from commit 94e054755f)

Add changelog for nxos_l3_interfaces fix

Signed-off-by: NilashishC <nilashishchakraborty8@gmail.com>
2020-01-10 18:50:46 -08:00
eab972a70e Fix defaulting neighbor password
Add debug (#65909)

Signed-off-by: NilashishC <nilashishchakraborty8@gmail.com>
(cherry picked from commit ae0df67539)

Add changelog for nxos_bgp_neighbor fix

Signed-off-by: NilashishC <nilashishchakraborty8@gmail.com>
2020-01-10 18:50:03 -08:00
1a7500b72a Always cleanup vlan interfaces (#65756)
Signed-off-by: NilashishC <nilashishchakraborty8@gmail.com>
(cherry picked from commit 7af98f9724)
2020-01-10 18:49:35 -08:00
4de0d4648d Fix nxos_vrf purge breaking with empty aggregate
Fix to nxos_vrf purge breaks with empty aggregate (#66004)

* resolving conflicts

* fixed issue with purge and state var. fixed space issue with vrf name

* lint issues

(cherry picked from commit a3d67edfca)

Add changelog for nxos_vrf fix
2020-01-10 18:49:10 -08:00
13031109aa Bugfix of 65761: postgresql_privs fail after it's updated to 2.9.2 (#65903)
* Bugfix of 65761: postgresql_privs fail after it's updated to 2.9.2

* add changelog

(cherry picked from commit 9b85a51c64)
2020-01-10 18:46:58 -08:00
e6405715c8 Fix network action plugin load in collection (#65849)
* Fix network action plugin load in collection

Fixes https://github.com/ansible/ansible/issues/65071

*  Load network action plugin that matches the module
   prefix name from list of collections.

* Update changelog

* Fix unit test

(cherry picked from commit 74e9b1e219)
2020-01-10 18:46:16 -08:00
a45659652d postgresql_schema: use query_params with cursor object (#65679) 2020-01-10 18:40:51 -08:00
508ebf295b backport of ovirt_vm template clone check (#65702)
* backport of ovirt_vm template clone check

* update change log

* update change log 2
2020-01-10 18:40:10 -08:00
73238a5dc0 Fix pacman stdout parsing in the Ansible module (#65238)
pacman output is localized and the Ansible module is parsing its output.
So, we need to force the locale.
Add changelog fragment

Fixes #65237

(cherry picked from commit 10b6038e21)
2020-01-10 18:39:30 -08:00
dd4e7950fc backport of ovirt_network: correct external provider (#66053)
* ovirt_network: correct external provider (#65701)

* ovirt_network: update external provider

* unnecessary remove blank line

* remove update check for external_provider

* first try to import then create

* add changelog
2020-01-10 18:38:49 -08:00
cab0d2d759 [2.9] vmware_deploy_ovf: Use correct datastore in multi-datacenter environment
Fixes: #63920

Need to pass the datacenter to assure we get the correct datastore managed object Id.

(cherry picked from commit dc59880c31)
2020-01-10 18:37:06 -08:00
95b7bc15a0 routeros_command – add support for dot in username (#66293)
* routeros_command – add support for dot in username (#65905)

* chore: changelog
2020-01-10 18:35:43 -08:00
610487df3c yum - only instantiate YumBase once (#63713)
* yum - only instantiate YumBase once

Previously, this code was re-instantiating the `YumBase` object
many times which is unnecessary and slow. However, we must do it
twice in the `state: absent` case because the `yumSack` and
`rpmSack` data of the previously instantiated object becomes
invalid and is no longer useful post transaction when we verify
that the package removal did in fact take place. Also, this patch
removes the repetitive re-processing of enable/disable of repos in
various places.

Here's a display of the speed increase against a RHEL7 host:

```yaml
- hosts: rhel7
  remote_user: root
  tasks:
  - name: Install generic packages
    yum:
      state: present
      name:
        - iptraf-ng
        - screen
        - erlang
  - name: Remove generic packages
    yum:
      state: absent
      name:
        - iptraf-ng
        - screen
        - erlang
```

Before this patch:
```
real    0m52.728s
user    0m5.645s
sys     0m0.482s
```

After this patch:
```
real    0m17.139s
user    0m3.238s
sys     0m0.277s
```

Fixes #63588
Fixes #63551

Signed-off-by: Adam Miller <admiller@redhat.com>

* add changelog

Signed-off-by: Adam Miller <admiller@redhat.com>
2020-01-10 18:33:51 -08:00
13c40c70db Allow updating of ec2_group rules with EC2 classic ELB targets (#62374)
* Allow updating of ec2_group rules with EC2 classic ELB targets

Fix regression introduced in #45296 with EC2 Classic SGs

Fixes: #57247

Also add (unsupported) ec2 classic test suite with test case for this scenario

* move ec2 classic tests to conditional within ec2_group target

* clean up ec2_classic tests

* ec2_classic account can't run most ec2_group tests
2020-01-10 18:33:06 -08:00
e842c9a151 Use a context manager in docker.ImageManager. (#65609)
Co-Authored-By: Felix Fontein <felix@fontein.de>
(cherry picked from commit 965474841f)
2020-01-10 18:32:09 -08:00
c3cd510770 terraform workspace list failure warns instead of fails (#65044)
* terraform workspace list failure warns instead of fails

Fixes #64788

* add a changelog fragment

(cherry picked from commit b580f2929d)
2020-01-10 18:30:45 -08:00
06044aa3b8 #58578 support absolute paths additionally (#58812)
* support absolute paths additionally

* add changelog

* rename changelog

* fix changelog to bugfix

(cherry picked from commit e711d01ed1)
2020-01-10 18:30:08 -08:00
09e89d538c [stable-2.9] Add method to automatically clean up after an action plugin (#65509)
* Use correct var, move cleanup for async
* Add changelog and tests. Fixes #65393. Fixes #65277.
* Kill off all long running async tasks from listen_ports_facts
* Update task to work with older jinja2
(cherry picked from commit 03a4edb)

Co-authored-by: Matt Martz <matt@sivel.net>
2020-01-10 18:29:29 -08:00
56c6ebe258 [stable-2.9] Make sorting in collection_loader match plugin loader (#65776)
* Simply sorting of Windows files below other plugin types
    Using the sort method with a custom key function uses less memory than creating multiple lists then joining them.

    This seemed to be an acceptable use of a lamdba, even though I geneally try to avoid them.

* Fix sorting of plugins inside of collections
    Explicitly sort Windows files below others, mimicking what we do in plugin/loader.py

* Add documentation about ansible.builtin and ansible.legacy
    Also document to the two different methods used for searching based on the candidate type.

* Add changelog
* Add integration test
* Update comment with expected sort order
(cherry picked from commit 6f76a48f59)

Co-authored-by: Sam Doran <sdoran@redhat.com>
2020-01-10 18:28:05 -08:00
43cf40ffe0 [stable-2.9] Don't remove trailing / on galaxy api URLS (#63294)
This causes multiple unneeded http redirects.
Since each http redirect takes a few hundred
milliseconds, handling the redirects starts to
take up a significant amount of wall time.

Fixes: #63281
(cherry picked from commit d1c39b9068)

Co-authored-by: Adrian Likins <alikins@redhat.com>
2020-01-10 18:27:35 -08:00
67302136bf [stable-2.9] Fix 'CyberarkPassword' object has no attribute 'delimiter' (#66268)
This is a very small follow up to PR #59500
(cherry picked from commit 53e405dd42)

Co-authored-by: Marc Hörsken <mback2k@users.noreply.github.com>
2020-01-10 18:27:08 -08:00
44a5b20c67 ansible-galaxy - expand User-Agent string for Galaxy endpoints (#65578)
(cherry picked from commit eaba5572cd)
2020-01-10 18:26:00 -08:00
57b09d0684 win_uri win_get_url - Fix up redirection defaults (#65584)
(cherry picked from commit 9a81f5c3b7)
2020-01-10 18:25:34 -08:00
e577e8f30b display - Fix up tracebacks on 3rd party loggers when log path is set (#65582)
(cherry picked from commit b782227642)
2020-01-10 18:25:04 -08:00
66f089de4b ansible-galaxy ignore empty server_list (#65986)
* ansible-galaxy ignore empty server_list

(cherry picked from commit aba8f12495)
2020-01-10 18:24:27 -08:00
ab441a2784 Make sure warnings are printed during fact gathering (#66258)
(cherry picked from commit d3427bb860)
2020-01-10 18:24:00 -08:00
fd9c7f9acc win_user_right - docs to show how to remove all (#66315)
(cherry picked from commit 93bfa4b07a)
2020-01-10 18:23:41 -08:00
b55f20a3ee [2.9] various elbv2 bugfixes (#65212)
* Add aws elb multiple host header support (#65021)

* Add support for aws elbv2 multiple host header actions

* Add example of multiple host header

* Add test for multiple host headers

* Add missing quote

* Update test/integration/targets/elb_application_lb/tasks/test_modifying_alb_listeners.yml

Co-Authored-By: Jill R <4121322+jillr@users.noreply.github.com>

* Update test/integration/targets/elb_application_lb/tasks/test_modifying_alb_listeners.yml

Co-Authored-By: Jill R <4121322+jillr@users.noreply.github.com>

* Remove debug statements

(cherry picked from commit d52af75c68)

* elbv2 - print() statement results an task failure, even if the task itself was successfull (#65183)

(cherry picked from commit cba9abcbec)

* Add changelog fragment.

* Update changelogs/fragments/65021-65183-elb-bugs.yml

* Force values to be sorted when compared. (#65315)

* Force values to be sorted when compared.

This avoids problems where lists of values could be generated in
indeterminate order.

* Update lib/ansible/module_utils/aws/elbv2.py

Thank you felixfontein, sorry I missed this detail.

Co-Authored-By: Felix Fontein <felix@fontein.de>
(cherry picked from commit 777b6d3e30)

* Update changelog.

Co-authored-by: Michael Mayer <mjmayer@gmail.com>
Co-authored-by: Markus Bergholz <markuman@gmail.com>
Co-authored-by: roberbri <roberbri@cisco.com>
2020-01-10 17:53:48 -08:00
a7bb6700c6 [2.9] ec2 Filter dictionary iteration errors on py3.8 (#65705)
* Fix RuntimeError in ec2_group_info (#65434)

Modifying dictionary while iterating over it

* Fix ec2 filter dict iteration for python3.8 (#65521)

Python now throws a RuntimeError if dict keys are modified mid-iteration.
https://bugs.python.org/issue36452
Cast filter dicts to list before iteration.

Fixes: 65024
Related: 65434

* Backport of 65434, 65521 to address ec2 filter dictionary iteration on Py3.8

https://bugs.python.org/issue36452

* spell changelog entry correctly

Co-authored-by: Aaryn <10469251+arin-c@users.noreply.github.com>
2020-01-10 17:40:13 -08:00
3ff86a5cad docker_* modules: fix various errors in argument specs (#65632)
* Fix various errors in docker module argument specs.

* Adjust PR #.

* Fix option name.

* Fix username/password requirements for docker_login.

(cherry picked from commit e9cec0262d)
2020-01-10 17:18:56 -08:00
69070402f0 Fix network_cli become check to be compatible with collections (#65829)
*  The become method name check is not required in network_cli
   as the become command is specific to platform and is implemented
   in the platform specific terminal plugins

(cherry picked from commit ff5253fa0e)
2020-01-10 17:11:24 -08:00
21fad83716 Fix action plugin issue with network connection type in common collec… (#65830)
* Fix action plugin issue with network connection type in common collection (#65078)

* Fix action plugin isse with network connection type in common collection

*  For network connection in common collection the value of
   ansible_connection is the FQCN of the connection type
   For example ansible_connection=network.common.network_cli

*  Add fix in supported network action plugins to extract
   the connection name from FQCN

* Fix CI issue

* Fix review comments and update community network action plugins

(cherry picked from commit 2ef47148cd)

* Fix CI failures
2020-01-10 17:08:21 -08:00
e822ce196c Use dict_diff instead of sets to take diff lag members (#66126)
Signed-off-by: NilashishC <nilashishchakraborty8@gmail.com>
(cherry picked from commit cb46e5f06b)

Add nxos_lag_interfaces fix changelog

Signed-off-by: NilashishC <nilashishchakraborty8@gmail.com>
2020-01-10 16:46:51 -08:00
992960cfbb Backport of 65791 - postgresql modules: use query parameters with cursor objects (#65864)
* Backport of 65791 - postgresql modules: use query parameters with cursor objects

* remove line from changelog fragment
2020-01-10 16:40:47 -08:00
d1ac4da6a1 crypto modules: fix various errors in argument specs (#65633)
* Fix various errors in crypto module argument specs.

* Adjust PR #.

* Fix provider requirement.

* Make sure openssl binary is installed.

(cherry picked from commit 57c042243f)
2020-01-10 16:36:42 -08:00
d706059006 Backport of 65787 - postgresql_sequence: use query parameters with cursor object 2020-01-10 16:29:40 -08:00
28b3531824 Backport of 64585: Don't return module error when mysql_connect fails (#65596)
* mysql: add changelog fragment for PR 64585 (#65594)

* mysql: add changelog fragment for PR 64585

* change fragment name and bug description

(cherry picked from commit 85486b1ce4)

* Don't return module error when mysql_connect fails (#64560) (#64585)

* Don't return module error when mysql_connect fails (#64560)

mysql_user expects an Exception when using check_implicit_admin.

* Adds integration tests for mysql_user check_implicit_admin (#64560)

(cherry picked from commit 47aea84924)

* remove tests

Co-authored-by: Jürgen Hötzel <juergen@hoetzel.info>
2020-01-10 16:15:05 -08:00
4a05724fd7 [stable-2.9] user - compare macOS user properties using same type (#62973)
self._get_user_property returns a string, so when doing a comparison
using this value, cast the second variable to a string so that the
comparison behaves correctly
* Add changelog
* Add to_text import
* Add integration test.
(cherry picked from commit c73288ad53)

Co-authored-by: John Chen <kryptonite303@users.noreply.github.com>
2020-01-10 15:58:20 -08:00
d2c21af3f7 Fixed argument spec for multiple modules (#65496)
This change contains fixes for argument spec and respective datatypes.

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
(cherry picked from commit 96df2bdcf3)
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2020-01-10 15:53:46 -08:00
636f26f07e Make docker_stack adhere to standard ansible return values (#63467)
* Make docker_stack adhere to standard return values

The names of the various fields returned from ansible modules are e.g defined here https://docs.ansible.com/ansible/latest/reference_appendices/common_return_values.html#msg.

Adhering to this improves usability and makes use of functionality for e.g stdout_lines etc.

* Update lib/ansible/modules/cloud/docker/docker_stack.py

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

* Fix under-indentation of continuation line (pep8)

Issue exposed in test here https://app.shippable.com/github/ansible/ansible/runs/146667/1/console

* Don't break old playbooks/roles

Made sure the changes are only adding new variables, not removing anything existing yet.

* Added comment

* Minor fixes

* Update lib/ansible/modules/cloud/docker/docker_stack.py

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

* Update lib/ansible/modules/cloud/docker/docker_stack.py

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

* minor change to docker_stack.py

* Add changelog fragment for PR 63467

* Format changelog fragment

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

* Add fragment about docker_stack return val depr

* Add docker_stack doc note about deprecated vals

* Remove whitespace in empty line

* Add docker_stack depr notice to porting guide

* Update changelogs/fragments/63467-docker-stack-return-fix.yml

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

* Update docs/docsite/rst/porting_guides/porting_guide_2.10.rst

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

* Update lib/ansible/modules/cloud/docker/docker_stack.py

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

* Added back a missing new line

(cherry picked from commit a5d69f2a26)
2020-01-10 15:49:12 -08:00
b148d06bda Update 64902-fix-allow-duplicates-in-single-role.yml 2020-01-10 15:31:49 -08:00
8538127bdc Ensure allow_duplicates: true enables to run single role multiple times (#64902) (#65063)
* Ensure `allow_duplicates: true` enables to run single role multiple times(#64902)

* Changed return value in `_load_roles` . Fixes #64902

* Add changelog fragment

* Add an integration test for the issue

* Fix changelog generation error and integration test.

* Fix yaml syntax error in changelog fragment

(cherry picked from commit daecbb9bf0)
2020-01-10 15:31:49 -08:00
6586623a75 docker_network: fix multiple subnet (of same IP version) idempotence (#65839)
* Fix multiple subnet (of same IP version) idempotence for docker_network.

* Add changelog.

* Unit tests no longer make sense, since the part of the code they test has been removed.

* Re-add CIDR validation. Move it to better position (module setup instead of idempotence check).

* Update changelog.

* Only run new tests on VM test images.

* Actually do what is documented. Especially since an empty object is a valid value for aux_addresses.

(cherry picked from commit 17ef253ad1)
2020-01-10 15:07:53 -08:00
b5f817ca26 docker_container - #65993 - update restart policy (restart policy & restart retries) wit… (#66192)
* #65993 - update restart policy (restart policy & restart retries) without restarting the container

* - proper indentation on the continuation-line
- set restart_policy to the correct value independent from the api version

* - move restart_policy definitions into the if block
- add a new variable for the restart_policy configuration value

* add changelog fragment

* typo; minus -> underscore

* rename changelog fragment to contain the correct module name

* rename restart_policy_config_value to just restart_policy and refer to the correct dict values

(cherry picked from commit 02c126f5ee)
2020-01-10 15:04:00 -08:00
cd348c123b [2.9] docker_container: wait for removal if removal is in process (#66117)
* docker_container: wait for removal if removal is in process (#65854)

* Allow to inspect containers directly.

* Wait for containers to be removed before recreating them.

* Also wait for containers to be removed before creating them.

* Add changelog.

(cherry picked from commit 4df5bdb11e)

* Don't wait for removal during check mode. (#66145)

(cherry picked from commit 14e32c85b4)
2020-01-10 14:22:44 -08:00
1159193d16 [Backport 2.9] gitlab_runner: fix idempotency for shared runners (#65545)
* gitlab_runner: fix idempotency for shared runners (#65176)


(cherry picked from commit 2eb615f1ef)

* add changelog
2020-01-10 14:15:26 -08:00
b05a2c8a62 dnf: don't return fail_json['msg'] as list (#65302)
Although it's not enforced that fail_json['msg'] should be a string
[1], I think it is pretty strongly implied.

In this case the failure_response['msg'] is sent through as the
fail_json['msg'], and the trailing commas here turn it into a tuple.
It's not clear if this is a typo or intended, but it does cause
problems for callbacks that expect this as a string (e.g. [2]).

Since there seems no point to having these values as a tuple, remove
the trailing commas so they return a string as per everywhere else.

[1] 4c589661c2/lib/ansible/module_utils/basic.py (L2078)
[2] https://review.opendev.org/#/c/696081

(cherry picked from commit fc54ae9227)
2020-01-10 12:19:38 -08:00
e6db6d0d64 [stable-2.9] Handle InternalError raised by cryptography when running in FIPS mode (#65477)
Since older versions of paramiko do not require cryptography,
we cannot catch the exact exception from cryptography.

Remove other exceptions since we're catching everything now
(cherry picked from commit d35c1a435b)

Co-authored-by: Sam Doran <sdoran@redhat.com>
2020-01-10 11:33:18 -08:00
003e9fdecd [stable-2.9] user - honor update_password parameter on BusyBox hosts (#65977)
The check for this parameter was missing from BusyBox.modify_user(), resulting in unexpected password changes to existing user accounts.
(cherry picked from commit 18130e1419)

Co-authored-by: Sam Doran <sdoran@redhat.com>
2020-01-10 11:32:03 -08:00
2858983de3 docker_swarm_service: Fix parsing of Healthcheck.StartPeriod (#66151)
* Parse Healthcheck.StartPeriod properly

* Add changelog fragment

* Use proper markup in changelog

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

Co-authored-by: Felix Fontein <felix@fontein.de>
(cherry picked from commit f31b8e08b2)
2020-01-10 11:30:37 -08:00
1257448636 [2.9] Fix nxos_file_copy option value path validation (#65846)
* Fix nxos_file_copy option value path validation (#65423)

* Fix nxos_file_copy option value path validation

*  Modify `local_file`, `local_file_directory` and
   `remote_file` option type from `str` to `path`
   so that the option value is validated in Ansible
   for a legitimate path value

* Fix review comments

(cherry picked from commit 88008badb1)

* Fix review comments
2020-01-10 11:11:10 -08:00
a1b0f72c98 [2.9] solaris_zone: Allow only valid characters in zone name
CVE-2019-14904 - solaris_zone module accepts zone name and performs actions related to that.
However, there is no user input validation done while performing actions.
A malicious user could provide a crafted zone name which allows executing commands
into the server manipulating the module behaviour.

Adding user input validation as per Solaris Zone documentation fixes this issue.

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
(cherry picked from commit 7d2ae7e322)
2020-01-10 10:45:12 -08:00
755348d870 [stable-2.9] Add Fedora 31 to the test matrix (#64848)
* Add Fedora 31 to the test matrix

* Remove Fedora 29 from the test matrix
(cherry picked from commit 0e5a83a1cc)

Co-authored-by: Sam Doran <sdoran@redhat.com>
2020-01-09 13:59:04 -08:00
04ad3fcc89 [stable-2.9] DNF Handle Empty AppStream stream definition (#63819)
* DNF Handle Empty AppStream stream definition

Fixes #63683

Signed-off-by: Adam Miller <admiller@redhat.com>

* Switch Fedora dnf test target modularity to stratis

In Fedora 29, the metadata was not properly set for a default stream
for ripgrep even though there is a profile called "default", however
that's an arbitrary string and the module maintainer must set the
default stream (which it never was for the ripgrep module, thus
failing the "empty stream" install test)

Signed-off-by: Adam Miller <admiller@redhat.com>
(cherry picked from commit ed86907587)

Co-authored-by: Adam Miller <admiller@redhat.com>
2020-01-09 11:22:43 -08:00
312608d960 [stable-2.9] Fix timezone integration test for Fedora 31 (#65013)
(cherry picked from commit 163904fe37)

Co-authored-by: Sam Doran <sdoran@redhat.com>
2020-01-09 11:04:19 -08:00
0e3573640b [stable-2.9] Simplify docker_setup on Fedora.
This avoids installing dnf-plugins-core, which breaks the yum and dnf modules
when uninstalling packages using a wildcard after they have already been removed.

This should resolve issues with the yum integration tests failing after docker tests run.
(cherry picked from commit a5c36eedd8)

Co-authored-by: Matt Clay <matt@mystile.com>
2020-01-08 16:14:13 -08:00
df37d93754 Update indentation used in the code examples, unify empty lines (#65874) (#65886) 2020-01-02 15:49:51 -06:00
0341be2da5 Add notes on docker_network connectivity for containers and services. (#65840) (#65964)
(cherry picked from commit d3b6db3754)
2020-01-02 15:49:25 -06:00
43a9bc96a5 AWS Guidelines: Make 'security_token' optional so that they can be run outside of CI (#66107) (#66136) 2020-01-02 15:25:26 -06:00
5dfaf1dfe8 docker_swarm_service: Fix description of limits.memory (#66078) (#66113)
This option corresponds to the '--limit-memory' option. Also
fix other mentions memory reservation instead of limit.

(cherry picked from commit 30cfa92e90)

Co-authored-by: Pedro Alvarez Piedehierro <palvarez89@gmail.com>
2020-01-02 15:23:57 -06:00
fc89d45385 Update indentation used in the code examples, unify empty lines (#65346) (#65696) 2020-01-02 15:22:03 -06:00
12088b89c3 [stable-2.9] Disable failing azure_rm_storageaccount test.
(cherry picked from commit 342b9953bc)

Co-authored-by: Matt Clay <matt@mystile.com>
2019-12-20 16:21:34 -08:00
652a456e45 [stable-2.9] Fix 'Assert CNAME failure' assertion (#65875)
(cherry picked from commit 14ebceec25)

Co-authored-by: Justin Ossevoort <github@internetionals.nl>
2019-12-20 13:49:08 -08:00
374e3b12f6 [stable-2.9] Add ansible-test constraint to avoid coverage 5.0+
(cherry picked from commit 9ea5b539b6)

Co-authored-by: Matt Clay <matt@mystile.com>
2019-12-20 13:46:49 -08:00
56120d034a Backport/2.9/65145 zabbix modules now require higher version of underlying python module (#65602)
* updated required zabbix-api version for zabbix modules

(cherry picked from commit f48ac0da5d)

* added changelog fragment
2019-12-13 12:32:09 -06:00
6ba26e7556 Clarify how to install roles and collections from same requirements file (#65707) (#65736)
(cherry picked from commit 5eceebcaf3)
2019-12-11 13:02:55 -06:00
58a62da92d update version metadata to get faceted swiftype search running (#65574) (#65579)
* update version metadata to get faceted swiftype search running

(cherry picked from commit 96cbbdd59f)
2019-12-10 14:02:54 -06:00
b087d9ad01 [stable-2.9] Fix and reenable hcloud tests
(cherry picked from commit 5ad61ed7c1)

Co-authored-by: Lukas Kämmerling <lukas.kaemmerling@hetzner-cloud.de>
2019-12-06 10:04:36 -08:00
9ba42a50f3 [stable-2.9] Fix plugin paths for ansible-test pylint test. (#65526)
* Fix plugin paths for ansible-test pylint test.
(cherry picked from commit fb69d68)

Co-authored-by: Matt Clay <matt@mystile.com>
2019-12-04 19:23:06 -08:00
f69ef0b2a8 Update Ansible release version to v2.9.2.post0. 2019-12-04 15:18:50 -08:00
f2285203dc New release v2.9.2 2019-12-04 14:54:51 -08:00
50c25760a0 Fix ansible-galaxy man page generation (#65478) (#65523)
The Action list was misformatted, leading to an error message in the man
page.

https://bugzilla.redhat.com/show_bug.cgi?id=1717110
(cherry picked from commit 9973121f44)
2019-12-04 13:46:47 -08:00
75adf6577c Added required parameter to document DOC-string to produce Documentation. (#65230) (#65518)
* Added required parameter to document DOC-string to produce Documentation.

Signed-off-by: Satyajit Bulage <sbulage@redhat.com>

* Just copy short_description as it was

(cherry picked from commit 770430fd07)
2019-12-04 13:31:10 -08:00
6074b48fd2 [stable-2.9] Disable failing hcloud tests.
(cherry picked from commit 85722c360f)

Co-authored-by: Matt Clay <matt@mystile.com>
2019-12-04 10:43:10 -08:00
d434e3f1a0 Fix legacy facts keys having redundant underscore (#65167) (#65504)
Signed-off-by: NilashishC <nilashishchakraborty8@gmail.com>
(cherry picked from commit 62c4ff8174)

Add changelog for nxos_facts fix

Signed-off-by: NilashishC <nilashishchakraborty8@gmail.com>
2019-12-04 09:18:17 -08:00
6012f1ef67 Backport of 65310: postgresql_owner: use query_params with cursor (#65322) 2019-12-04 09:14:09 -08:00
999f91a705 [2.9] Check Point: fix all modules to be able to get parameter with value false (#65110)
* fix all modules to be able to get parameter with value false (very important fix) (#65040)

* add import of future and __metaclass__

* fix all modules to be able to get parameter with value false (very importent fix)

* Update ignore.txt

(cherry picked from commit b1e6667664)

* Update ignore.txt

* Create 65043-enable-parameter-value-to-be-false.yaml

* Update 65043-enable-parameter-value-to-be-false.yaml
2019-12-04 09:12:30 -08:00
f2107695e6 [2.9] pulp_repo: renamed module tls client auth params to avoid overlaping with fetch_url (#65014)
* renamed module tls client auth params to avoid overlaping with fetch_url (#59522)

* renamed module tls client auth parameters to avoid overlaping with ansible fetch_url

* added version_added info for params

* Updated version_added

Updated version_added info from 2.9 to 2.10

* Update pulp_repo.py

removed version_added for renamed params

* Apply suggestions from code review

added ca_cert alias and 'version_added'

Co-Authored-By: Mark Chappell <mchappel@redhat.com>

* Apply suggestions from code review

added old behavior for client_cert and client_key which will deprecate in 2.14

Co-Authored-By: Mark Chappell <mchappel@redhat.com>

* Update pulp_repo.py

fix for linting error ansibot is complaining

* added changelog fragment for 59522

* Apply suggestions from code review

more informative depreciation warning and changelog fragment

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

* added mention for changes in client_key and client_cert behavior

* fixed too long line (linting)

* deprecated ca_cert alias to have consistent module params in Ansible 2.14

* fixed indentation for deprecation warning

* changed deprecated alias handling to argument_spec

* moved deprecated_aliases insied argument dict, thanks tremble

* suggestions from felixfontein

Move doc info about client_cert and client_key into its own paragraph

Co-Authored-By: Felix Fontein <felix@fontein.de>
(cherry picked from commit 1e59017d27)

* 2.10 -> 2.9.2

* * Adjust messages.

* Fix one more.

(cherry picked from commit d1c58bc942)
2019-12-04 09:06:49 -08:00
95ff4372ec [stable-2.9] Do not treat AnsibleUndefined as being unsafe (#65202) (#65427)
* [stable-2.9] Do not treat AnsibleUndefined as being unsafe (#65202)

* Do not treat AnsibleUndefined as being unsafe. Fixes #65198

* fix yaml formatting.
(cherry picked from commit b08e7daf46)

Co-authored-by: Matt Martz <matt@sivel.net>

* Linting fix

* additional linting fix
2019-12-04 08:59:17 -08:00
612d70ba3c Remove k8s_scale dependency on k8s_raw (#65270)
* Remove k8s_scale dependency on k8s_raw (#59887)

* Remove k8s_scale dependency on k8s_raw

* fix sanity checks

(cherry picked from commit e60cdc310d)

* Add changelog fragment

* Rename 59887-scale-bug to 59887-scale-bug.yml
2019-12-03 20:16:03 -08:00
81a7957929 Backport of 65093, postgresql_lang: use query parameters with cursor.execute() (#65165)
* Backport of 65093, postgresql_lang: use query parameters with cursor.execute()

* fix CI tests
2019-12-03 20:12:21 -08:00
f5fa6ace4a [stable-2.9] Make Docker and Podman play nice (#65009) (#65015)
podman 1.4 now installs docker man pages. Add handler to remove docker packages to avoid test failure due to this conflict.

Adjust inventory_docker_swarm integration test
Add conditional to cleanup handlers to allow use of the setup_docker role without removing packages at the end of the play. The inventory_docker_swarm integration tests does its own cleanup..
(cherry picked from commit 6b2b876d43)

Co-authored-by: Sam Doran <sdoran@redhat.com>
2019-12-03 20:11:09 -08:00
96126c26fb fix module that it reports the correct status of a change (#65098)
* fix module that it reports the correct status of a change

(cherry picked from commit 2028734ac3)

* postgresql_privs - fix sort comparison (#65125)

The result of .sort() is None, not the sorted object. The comparison was comparing the result of the .sort() method and not the sorted values.

(cherry picked from commit 426e37ea92)
2019-12-03 18:11:21 -08:00
87d9a088d0 config manager str type vault source (#65023) (#65090)
* config manager str type vault source

* Convert vault text to_text earlier and add tests

(cherry picked from commit 7092c196ed)
2019-12-03 18:09:58 -08:00
3d3dbd6e7b gitlab module: set max version for python-gitlab lib (#65049) 2019-12-03 18:08:02 -08:00
5a48f7ea6b [2.9] collection: Provide additional info about collection name restriction (#65276)
Fixes: #65151

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
(cherry picked from commit 9dca2bd3c4)
2019-12-03 18:06:37 -08:00
4b9644c00b Backport of 64661, postgres.py: add query_params (#65034) 2019-12-03 15:08:21 -08:00
95c023e1b2 Backport #58521, bug fixes to the Infoblox NIOS modules (#64972) 2019-12-03 14:59:38 -08:00
7b18723858 Fix postgres_user not commiting changes when groups is set (#64835) 2019-12-03 14:57:02 -08:00
9e023a91a6 zabbix_action module no longer requires event_source and esc_period arguments when state is absent (#64736)
(cherry picked from commit d8e014980f)
2019-12-03 14:55:57 -08:00
b4cb407b4b AWS IAM Sanity test cleanup (#63961) (#64644)
* AWS IAM Sanity test cleanup

(cherry picked from commit fd54c54b51)
2019-12-03 14:51:41 -08:00
c30e340094 [2.9] include_vars: Check NoneType for raw_params (#65301)
Lookup 'first_found' returns empty list which results in
raw_params checking. Check NoneType for 'raw_params' before
proceeding.

Fixes: #64939

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
(cherry picked from commit 8d0c2cd4d5)
2019-12-03 14:46:36 -08:00
1c2f36d4d9 ansible-galaxy - Add User-Agent to requests (#65438) (#65441)
(cherry picked from commit 8648003c1f)
2019-12-03 14:45:54 -08:00
fc69d01444 gen on_become prompt for ios backport (#63572) 2019-12-03 14:36:58 -08:00
b133384895 openssh_keypair: fix idempotence issue (#65017) (#65128)
* Fix idempotence issue.

* Add changelog.

(cherry picked from commit b36f572256)
2019-12-03 14:18:53 -08:00
93186e453f openssl_csr: make sure privatekey_path is specified when state is present (#65435) (#65461)
* Make sure privatekey_path is specified when state is present.

* Add changelog.

(cherry picked from commit ae4363f6d1)
2019-12-03 14:07:31 -08:00
03b5a6f5d6 galaxy - print HTTP reason on unknown error (#65273) (#65439)
(cherry picked from commit 6586b7132c)
2019-12-03 14:06:35 -08:00
d93f56dccb Fix using a URL for galaxy collection install (#65272) (#65432)
* Fix using a URL for galaxy collection install

* Update lib/ansible/galaxy/collection.py

Co-Authored-By: Sloane Hertel <shertel@redhat.com>
(cherry picked from commit 694ef5660d)
2019-12-03 14:05:25 -08:00
955cebdd04 proxmox: fix proxmox 6 version detection by using LooseVersion (#59165) (#65379)
* proxmox: use 'release' key for version detection if possible

* proxmox: fix PEP issues

* add changelog fragment

* Uses LooseVersion for proxmox version detection

* move imports

* removes useless comment

(cherry picked from commit 38193f6b60)
2019-12-03 14:04:00 -08:00
d7d00ed36d acme_certificate: Fix ACME v1 support when modify_account is set to false (#64648) (#65412)
* Fix ACME v1 when modify_account is set to false.

* Add changelog.

(cherry picked from commit 08b53b94a9)
2019-12-03 14:03:30 -08:00
1ccfef9c5a [2.9] VMware: Fix typo in fail_json in vmware_guest_powerstate (#65163)
Fixed typo from "chanaged" to "changed"

Fixes: #65161

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
(cherry picked from commit d7039b6633)
2019-12-03 14:02:47 -08:00
1ca54af370 Handle LibraryError exception in postgresql_db (#65229) (#65247)
* Added changes into changelogs/fragments
* Removed no longer used 'LibraryError'.

Signed-off-by: Satyajit Bulage <sbulage@redhat.com>
(cherry picked from commit 5f8ec4d46e)
2019-12-03 14:02:27 -08:00
3a95101424 [stable-2.9] Add or later to the license expressed in the README (#65287)
This is a clarification, not a relicensing.

Our source code says "GPLv3+" or "version 3 of the License, or later".
Our documentation says GPLv3+:

https://github.com/ansible/ansible/blob/devel/docs/docsite/rst/dev_guide/developing_modules_checklist.rst#contributing-to-ansible-objective-requirements

We were just lazy when we wrote the README and left out the "or later".
this update to the README brings it in line with what everything else
says.
(cherry picked from commit a15fb26)

Co-authored-by: Toshio Kuratomi <a.badger@gmail.com>
2019-12-03 14:01:16 -08:00
b816e7c82e Update plugins/netconf/ce.py to fix a bug(failed to get veriosn information via neocnf). (#65065) (#65232)
* fix version fail.

* add a changelog fragment.

* Update ce.py

* Rename plugins-netconf-ce-fix.yaml to 65065-plugins-netconf-ce-fix.yaml

* Update ce.py

(cherry picked from commit da8ec327cc)
2019-12-03 13:59:32 -08:00
a4e055e0cd docker_container and docker_network: avoid None errors (#65018) (#65235)
* Avoid None errors.

* Add changelog.

(cherry picked from commit 63b94fca7e)
2019-12-03 13:59:03 -08:00
cf269667c1 docker_swarm_service: Sort lists when checking for changes (#63887) (#65221)
* docker_swarm_service: Sort lists when checking for changes

When two lists are checked for changes in this module, the lists are
reported changed when the order of the items is different. This PR
resolves this issue.

* docker_swarm_service: Minor typo fix

* docker_swarm_service: Another minor typo

* docker_swarm_service: Should use sorted(), not sort()

* docker_swarm_service: Sort lists of dictionaries

* docker_swarm_service: Fix style issues in tests

* docker_swarm_service: Updates to integration tests

* docker_swarm_service: Casting string types within lists when comparing

* docker_swarm_service: Special handling of unordered networks with ordered aliases

* docker_swarm_service: Sorting network lists

* docker_swarm_serivce: Better unit test code coverage for lists and networks

* docker_swarm_service: Fixed coding style for sanity tests

* docker_swarm_service: More coding style fixes

* docker_swarm_service: Ignoring test for Python < 3

* docker_swarm_service: Update to version info check for backwards compatibility

* docker_swarm_service: Added change fragment #63887

* docker_swarm_service: Better handling of missing sort key for dictionary of lists

* docker_swarm_service: Preventing sorts from modifying in-place

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

* docker_swarm_service: Removed spurious import in test

* docker_swarm_service: Preventing sorts from modifying more data in-place

Co-Authored-By: Felix Fontein <felix@fontein.de>
(cherry picked from commit a096cd08c5)
2019-12-03 13:56:39 -08:00
0f1e63b236 [yarn] Set name_version when version is not specified (#62348) (#65213)
* Set name_version when version is not specified, fix #55097

This will default to installing the latest version available

* Add changelog fragment

* update changelog

(cherry picked from commit 136dc27572)
2019-12-03 13:56:02 -08:00
7b3e63de71 Fix netconf post "delay persistent connections" (#63463) (#65137)
* ensure_connect on manager use

* Remove ensure_connected from individual netconf plugins

(cherry picked from commit f5e0995cae)
2019-12-03 13:55:25 -08:00
2fd6ed12fe Windows coverage - output temp files with UTF-8 BOM (#65086) (#65088)
* Windows coverage - output temp files with UTF-8 BOM
ci_complete ci_coverage

* Remove testing changes to get ready for merge

(cherry picked from commit 200fb00310)
2019-12-03 13:33:50 -08:00
0cec26f4eb Fix py2/py3 compability issue for httpapi plugin fortios (#64982) (#65091)
(cherry picked from commit bc479fcafc)
2019-12-03 13:33:12 -08:00
68b8e0e797 [stable-2.9] Fix ansible-test handling of git submodules. (#65027) (#65075)
* Revert most of PR #61605 commit e218c9814c

This removes the git error handling that converted all git errors into warnings.

* Fix ansible-test handling of git submodules.
(cherry picked from commit ba273c72d8)

Co-authored-by: Matt Clay <matt@mystile.com>
2019-12-03 13:32:15 -08:00
45cf977052 Correct win_dns_client test option name (#64967) (#64970)
(cherry picked from commit 096c3ffa80)
2019-12-03 13:30:39 -08:00
3c37d572aa [2.9] vmware_guest: Revert custom value customization in guest (#65059)
Due to confusion between 'Custom Attributes' and 'Advanced options',
this change got in devel. Revert to original behavior i.e. customizing
custom values using vmware_guest is done in this PR.

Fixes: #64291

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
(cherry picked from commit a6bc43ba47)
2019-12-03 13:30:07 -08:00
cd37b2df60 become - stop using play context in more places (#62373) (#64965)
* become - stop using play context in more places - ci_complete

* Fix up review points

(cherry picked from commit 480b106d65)
2019-12-03 13:29:14 -08:00
02a6ed9bda [stable-2.9] Fix firewalld integration tests for CentOS 8 (#64873) (#64924)
(cherry picked from commit 79a38c8a3a)

Co-authored-by: Sam Doran <sdoran@redhat.com>
2019-12-03 13:27:59 -08:00
0a91afd3b1 [stable-2.9] Use newer version of podman on RHEL (#64934) (#64964)
- Use same podman version for RHEL 7 and 8
- Pin to version 1.4
(cherry picked from commit a385ad321b)

Co-authored-by: Sam Doran <sdoran@redhat.com>
2019-12-03 13:27:38 -08:00
1c1a950a2d [stable-2.9] Fix setup_mysql8 tests for CentOS 8 (#64868) (#64926)
(cherry picked from commit 41f301fe1b)

Co-authored-by: Sam Doran <sdoran@redhat.com>
2019-12-03 13:27:09 -08:00
e5b13bb9e3 [stable-2.9] Fix setup_postgresql integration test for CestOS 8 (#64871) (#64925)
(cherry picked from commit f8c741894a)

Co-authored-by: Sam Doran <sdoran@redhat.com>
2019-12-03 13:26:44 -08:00
39dcfb1671 [stable-2.9] Fix filesystem integration test for CentOS 8 (#64866) (#64923)
(cherry picked from commit 082b1b6cca)

Co-authored-by: Sam Doran <sdoran@redhat.com>
2019-12-03 13:25:53 -08:00
84c9040d02 [stable-2.9] Fix setup_mysql_db for CentOS 8 (#64864) (#64920)
(cherry picked from commit 477fa63f68)

Co-authored-by: Sam Doran <sdoran@redhat.com>
2019-12-03 13:25:39 -08:00
918e7db2e8 [stable-2.9] Fix yum_repository tests for CentOS 8 (#64863) (#64919)
Refactor tests to run the same tasks with CentOS and Fedora using different variables.
(cherry picked from commit 05a7ce798d)

Co-authored-by: Sam Doran <sdoran@redhat.com>
2019-12-03 13:23:57 -08:00
77e1f9f536 [stable-2.9] Fix lookup_passwordstore integration test for CentOS 8 (#64869) (#64918)
pass is no longer packaged in EPEL
https://lists.zx2c4.com/pipermail/password-store/2019-July/003689.html
(cherry picked from commit 4291f09a68)

Co-authored-by: Sam Doran <sdoran@redhat.com>
2019-12-03 13:22:40 -08:00
0de8379ee3 Fix ansible_failed_{task,result} undefined in rescue (#64831) (#64843)
This is a fix for a regression introduced by Perfy. Since then we mainly
operate on host.name instead of the Host object. In a call to
set_nonpersistent_facts where we set ansible_failed_task and
ansible_failed_result variables we were still passing the object which
led to those vars being undefined.

Fixes #64789

(cherry picked from commit 5c0b2c151c)
2019-12-03 13:22:08 -08:00
af714a294d [stable-2.9] Fix iso_extract tests for CentOS 8 (#64861) (#64917)
- use setup_epel role rather than task which contains correct URL now since it has changed for EL8
- add conditional to setup_epel to prevent attempted installation on non-RHEL distros
(cherry picked from commit f2e605c856)

Co-authored-by: Sam Doran <sdoran@redhat.com>
2019-12-03 13:21:41 -08:00
cabeadb4b8 [stable-2.9] Fix paramiko_ssh test (#64857) (#64916)
(cherry picked from commit dd8a3ebb72)

Co-authored-by: Sam Doran <sdoran@redhat.com>
2019-12-03 13:21:02 -08:00
94a7de568c [stable-2.9] Fix setup_rpm integration tests for CentOS 8 (#64862) (#64915)
(cherry picked from commit 5d2a3ecbc4)

Co-authored-by: Sam Doran <sdoran@redhat.com>
2019-12-03 13:20:29 -08:00
688d63305b [stable-2.9] Fix group integration test for CentOS 8 (#64858) (#64914)
(cherry picked from commit 5e3b6c84c7)

Co-authored-by: Sam Doran <sdoran@redhat.com>
2019-12-03 13:20:15 -08:00
ca5e7e7cc2 win_chocolatey: Fix error when choco.exe not found (#53115) (#64881)
* win_chocolatey: Fix error when choco.exe not found

* Slight tweak to check and added changelog fragment

* Removed ignore rule that's no longer needed

(cherry picked from commit 521d6465f6)
2019-12-03 13:19:50 -08:00
6ee5297c02 Close subprocess stdout and stderr in the ssh connection plugin (#64874)
Eliminate `ResourceWarning: unclosed file` by closing all
file handles of each subprocess used by the SSH connection
plugin to execute commands.

This change prevents Ansible from accumulating "forgotten"
open file handles.

PR #64785 by Julien Palard
Fixes #64768
2019-12-03 13:17:44 -08:00
e3af54ffdd [2.9] VMware: Fix get_tags_for_vm API in vmware_vm_info module (#64821)
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
(cherry picked from commit e7c6134fd0)
2019-12-03 13:15:23 -08:00
18af2d257f win_domain_computer module: Fix idempotence when name != sam_account_name (#56967) (#64816)
* win_domain_computer module: Minor documentation error

* Fix idempotence when name != samaccountname

* Added changelog

* Added unsupported alias for CI check

(cherry picked from commit 04b8f75ffa)
2019-12-03 13:13:59 -08:00
f3c58f554c allow using --check on win_iis_webapppool module (#50528) (#64812)
* allow using --check on win_iis_webapppool module

* Added changelog and slight logic tweak

* Fix typo in changelog fragment

(cherry picked from commit 23a751323b)
2019-12-03 13:13:21 -08:00
07365b2040 Backport/2.9/64397 (#64790)
* [FIX] graceful is not an immutable attribute

(cherry picked from commit 1f4d15fc55)

* [ADD] changelog fragment for PR 64397 to stable-2.9
2019-12-03 13:11:09 -08:00
58b6ad7444 Fixed some documentation for postgresql_slot (#65278) (#65358) 2019-12-02 13:27:11 -06:00
04d32c503f Backport/2.9/64351 Doc notes 6 (#64351) (#64949)
* Doc notes 6 cloudengine (#64351)

(cherry picked from commit 25e03b1e75)

* add a change log
2019-11-19 10:42:57 -06:00
f3699c80be Backport/2.9/64928 Doc notes 5 (#64928) (#64948)
* Doc notes 5 cloudengine (#64928)
* new version 2.10 can not be backported

(cherry picked from commit 8ea9d0c06a)

* add a change log
2019-11-19 10:04:32 -06:00
19447485b8 Backport/2.9/64927 Doc notes 4 (#64927) (#64951)
* Doc notes 4 cloudengine (#64927)

(cherry picked from commit 2ccdf29b5b)

* add a change log
2019-11-19 10:02:35 -06:00
039dc88b10 Backport/2.9/64348 Doc notes 3 (#64348) (#64947)
* Doc notes 3 (#64348)

(cherry picked from commit ad0769c095)

* add a change log
2019-11-19 09:46:31 -06:00
0089df4cab Backport/2.9/64347 Doc notes 2 (#64347) (#64946)
* Doc notes 2 (#64347) 
* Update ce_evpn_bgp_rr.py
* Update ce_evpn_bgp.py

(cherry picked from commit 9e3b1f3b32)

* add a change log
2019-11-19 09:45:31 -06:00
1f9a500b54 Backport/2.9/64346 Doc notes 1 (#64346) (#64950)
* Doc notes 1 (#64346), backport of #64950

(cherry picked from commit 705c014ec3)

* add  a change log
2019-11-19 09:43:22 -06:00
a2b734dd9b win_firewall_rule.py to include ICMP echo (ping) example (#55013) - 2.9 (#64813)
* Update win_firewall_rule.py to include ICMP echo (ping)  example (#55013)

* Update win_firewall_rule.py

<!--- Your description here -->
Added example of enabling ICMP protocol, as ping is commonly used for troubleshooting in automation scenarios.  Equivalent netsh command is:
netsh advfirewall firewall add rule name='ICMP Allow incoming V4 echo request' protocol=icmpv4:8,any dir=in action=allow

+label: docsite_pr

* Remove yaml-breaking space

Removed extraneous space that caused validation to fail.

* Remove more extraneous whitespace

(cherry picked from commit 91d0ad9a4c)

* Remove icmp_type_codes

Setting the ICMP Type Codes on the protocol is not valid in 2.8/2.9, requires https://github.com/ansible/ansible/pull/60361 which will update the docs in devel.
2019-11-18 16:04:07 -06:00
0486885b9f Update openssl_certificate.py (#64772) (#64802)
Changed 'generate' to 'generating'

(cherry picked from commit 83927c3437)
2019-11-18 15:36:50 -06:00
9b27c7b7dc Backport/2.9/brokenlinks (#65016)
* Remove duplicated and broken link to Roles (#64991)

(cherry picked from commit f198036d7f)

* Fix link to Roles (#64992)

(cherry picked from commit 1d0a832692)

* fix collection broken links (#65010)

(cherry picked from commit 2749090bc6)
2019-11-18 15:12:24 -06:00
23de3c1614 update configuring ansible-galaxy client (#64796) (#64904)
* update configuring ansible-galaxy client, deduplicate, clarify tokens, AH procedures, etc.

(cherry picked from commit a01376a493)
2019-11-15 11:52:24 -06:00
d4f1552a19 Update Ansible release version to v2.9.1.post0. 2019-11-13 17:19:54 -08:00
6c051b0241 New release v2.9.1 2019-11-13 12:50:24 -08:00
8b3d1581bd [stable-2.9] vmware_host_firewall_manager: fix #61332 (#63567) (#64410)
Since https://github.com/ansible/ansible/pull/56733, we were not able to apply
firewall rules with no `allowed_hosts` key.

closes: #61332

In addition, this patch ensures the `allowed_hosts` key accepts a dict,
instead of a dict in a single entry list.

```yaml
vmware_host_firewall_manager:
  esxi_hostname: "{{ esxi1 }}"
  rules:
    - name: NFC
      enabled: True
      allowed_hosts:
        - all_ip: False
          ip_address:
            - "1.2.3.4"
```

Should be written:

```yaml
vmware_host_firewall_manager:
  esxi_hostname: "{{ esxi1 }}"
  rules:
    - name: NFC
      enabled: True
      allowed_hosts:
        all_ip: False
        ip_address:
          - "1.2.3.4"
```

(cherry picked from commit ab2aaca61d)
2019-11-12 21:31:33 -08:00
af2def5507 [stable-2.9] Cleanup after MySQL integration tests (#63641) (#63863)
Add handlers to setup_mysql_db and setup_mysql8 to remove installed packages..
(cherry picked from commit 3e4ae42256)

Co-authored-by: Sam Doran <sdoran@redhat.com>
2019-11-12 19:01:19 -08:00
1e0d7ac25b [stable-2.9] Eos vlan override (#63639) (#63687)
* [stable-2.9] Eos vlan override (#63639)

* Fix overridden & deleted in eos_vlans

* Fix vlan creation in overridden

* Right, Python 2.6
(cherry picked from commit 741d529)

Co-authored-by: Nathaniel Case <ncase@redhat.com>

* eos_vlans: Never try to set vlan_id as a property (#63689)

(cherry picked from commit d98482c294)

* Add changelog
2019-11-12 18:49:51 -08:00
65ab51082b Improve handling of "restarted" state for win_iis_website module (#63829) (#64760)
* Improve handling of "restarted" state for win_iis_website module

* Added changelog fragment

(cherry picked from commit bd9a0b6700)
2019-11-12 18:46:54 -08:00
25f8d0dcd3 win_acl no longer needs SeSecurityPrivilege (#57804) (#64758)
* win_acl no longer needs SeSecurityPrivilege
Set-ACL raises missing SeSecurityPrivilege error when the inheritance
from the parent directory is disabled.

* fixes test sanity

* registry rights can only be modified with Set-ACL

* add changelog

(cherry picked from commit 95d613f3ab)
2019-11-12 18:46:16 -08:00
d2d9a60eab Corrected Get-adcomputer (#63093) (#64756)
* Corrected Get-adcomputer

Corrected Get-adcomputer on "Remove-ConstructedState" and "Set-ConstructedState" functions.
resolved error: Unable to contact the server. This may be because this server does not exist, it is currently down, or it does not have the Active Directory Web Services running.

* Update lib/ansible/modules/windows/win_domain_computer.ps1

Co-Authored-By: Daniel-Sanchez-Fabregas <33929811+Daniel-Sanchez-Fabregas@users.noreply.github.com>

* Update win_domain_computer.ps1

changed
"-credential $credential" to "@extra_args" (Line 115 and 150)
corrected exception message (Line 122)

* Added changelog fragment, minor code tweak

(cherry picked from commit e77426dad3)
2019-11-12 18:45:14 -08:00
65f945fab1 Fix IOS_VLANS override operation for new VLANs (#63667)
* Fix IOS_VLANS override operation for new VLANs (#63624)

* fix vlans override state

* adding code comment

(cherry picked from commit 4f2665810f)

* changelog for 63624
2019-11-12 13:02:09 -08:00
50bbd72694 gitlab_user: Fix ssh key add and group membership add when there's other changes (#63621) (#63634)
* Fixed syntax in sshkey/group add

* Added changelog

* pep8 fix

(cherry picked from commit b4bb3dee9a)
2019-11-12 13:01:53 -08:00
20735f6b5b [stable-2.9] Explicitly use multiprocessing fork start method (#63581) (#63591)
* Explicitly use multiprocessing fork start method

* Remove unused import

* Remove unused import

* Fallback to just multiprocessing on py2
(cherry picked from commit 82ee341)

Co-authored-by: Matt Martz <matt@sivel.net>
2019-11-12 13:01:27 -08:00
14b48062ee Fix traceback for empty config (#62520) (#63090)
Signed-off-by: NilashishC <nilashishchakraborty8@gmail.com>
(cherry picked from commit 67213ccb4d)

Add changelog for vyos traceback fix
2019-11-12 12:04:42 -08:00
5558b43f27 Fix traceback for empty config (#62515) (#63089)
Signed-off-by: NilashishC <nilashishchakraborty8@gmail.com>
(cherry picked from commit fc5358cea0)

Add changelog for IOS-XR traceback fix

Signed-off-by: NilashishC <nilashishchakraborty8@gmail.com>

Remove empty spaces
2019-11-12 12:02:14 -08:00
e3f7b5327e docker_image and docker_login: move tests needing a registry into own target, add tests for docker_login (#62721) (#62951)
* Move tests with docker registry into own target.

* Add docker_login tests.

* Add step which makes sure hello-world:latest is around.

* Make work inside docker container.

* Add dependency.

* Use plaintext password.

* Forgot check_mode.

* Add no_log to avoid double log output in verbose mode.

(cherry picked from commit a79f7e575a)
2019-11-12 12:01:54 -08:00
5ca92a848c package_facts: check 'vital' and 'automated' values ('pkg' manager) (#62766) (#62825)
(cherry picked from commit 278398555d)
2019-11-12 12:01:37 -08:00
3a5bd5be18 [stable-2.9] Account for empty strings when splitting the host pattern (#62442) (#62679)
Improve tests
- add more unit test cases
- add specific integration test with more cases

Testing shows no major downside to calling .strip() twice in a comprehension vs. using a regular for loop and only calling .strip() once. Going with the comprehension for ease of maintenance and because comprehensions are optimized in CPython.
(cherry picked from commit 987265a6ef)

Co-authored-by: Sam Doran <sdoran@redhat.com>
2019-11-12 12:01:12 -08:00
7dad6ca149 [2.9] core: Handle empty extra vars in cli (#62240)
Fixes: #61497

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
(cherry picked from commit a2e61f67d5)
2019-11-12 11:59:06 -08:00
b5dabab16e ce_config/bug/jingdong: a bug from jingdong. (#62872) (#63980)
* update to fix "`quit` may make seesion closed."

* update to fix "`quit` may make seesion closed."

* 274:49: E272: multiple spaces before keyword

* add a changelog fragment.

* Update ce_config.py

using run_command for prompts.

* Update ce_config.py

* Update ce_config.py

typo error

* update to use get_prompt

* Update ce_config.py

* Update ce_config.py

* Update ce_config.py

* Update ce_config.py

* Update ce_config.py

* Update ce_config.py

* Update ce_config.py

(cherry picked from commit e4b6dd1862)
2019-11-12 11:57:30 -08:00
fd392ecb46 [Backport/2.9/64018]update ce_acl_interface to fix bugs (#64025)
* update ce_acl_interface to fix bugs

(cherry picked from commit 2849738e24)

* Module modification information
2019-11-12 11:55:38 -08:00
7ca3b677c4 Backport PR to Fix ios_l2_interfaces skipping relevant L2 interfaces facts (#63893)
* Fix ios_l2_interfaces skipping relevant L2 interfaces facts (#63779)

* fix bug 63777

* fix comment

(cherry picked from commit d620a209a5)

* changelog
2019-11-12 11:51:16 -08:00
cdc6577395 [stable-2.9] syslogger - disable check mode (#63646) (#63750)
(cherry picked from commit dcec3d000e)

Co-authored-by: Sam Doran <sdoran@redhat.com>
2019-11-12 11:50:53 -08:00
f440c23dd7 Improve module return values (#63541) (#63644)
* Remove lists from contains:, fix types, some more details.

* Adjust types.

* Add new type.

* Re-add meraki_mx_l7_firewall docs at right indentation level.

(cherry picked from commit a129499cf4)
2019-11-12 11:47:47 -08:00
2822744c68 dest lives in 4 different places depending on exeuction type (#62444) (#63283)
(cherry picked from commit d4ad541eee)
2019-11-12 11:44:56 -08:00
040247097c postgresql_publication: fix logic (#63737)
(cherry picked from commit 891489a27e)
2019-11-12 11:41:42 -08:00
8674090b19 Ovirt fix fetching of nested attributes backport (#63787)
* ovirt: Fix fetching of nested attributes (#61841)

This patch is fixing the fetching of nested attributes.

Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1748025

* add changelog
2019-11-12 11:40:40 -08:00
7df4550611 Ovirt disk correct fcp host backport (#63898)
* ovirt disk correct fcp host (#63857)

* add changelog
2019-11-12 11:40:10 -08:00
46b82cf01b [2.9] Fix typo in vmware_content_deploy_template docs (#63176)
Fixing typo mistake in testbed with section.
Deploy template from content library is supported from 67U3.

(cherry picked from commit c6c13b5626)
2019-11-12 11:39:47 -08:00
4aae6f5341 [stable-2.9] CentOS8/RHEL8 base don't have all the deps we were specifying (#63151)
We used a few packages for tests which don't exist in RHEL8 base.  Don't
dep on those so those tests will simply skip
(cherry picked from commit 2b6ee57)

Co-authored-by: Toshio Kuratomi <a.badger@gmail.com>
2019-11-12 11:39:27 -08:00
49f1760fea Ovirt correct resloving false atrs backport (#63953)
* ovirt correct resolving nested atributes which are false (#63908)

* add changelog
2019-11-12 11:37:45 -08:00
13db4b90a5 openssl_csr: fix tests (#63994)
* Make sure tests are validated with correct backend in mind.

* Fix tests.

(cherry picked from commit 35a412fab7)
2019-11-12 11:36:24 -08:00
c65e003796 Fix grafana_datasource fails when name with spaces (#63987)
(cherry picked from commit df6b7bf77f)
2019-11-12 11:35:56 -08:00
5a2d55a51f Fix network plugin config option load from collection (#64046)
* Fix network plugin config option load from collection

Fixes #63975

* Update the complete sub-plugin name within network
  connection plugins to handle sub-plugin in collection
  scenario.

* Fix review comments

(cherry picked from commit 60276d3d8d)
2019-11-12 11:34:55 -08:00
2feaea913d command, script & shell: mention 'cmd' parameter (#62778) (#64746)
'cmd' parameter is supported since 2b3c5aa41e (v2.0.0-1)

(cherry picked from commit 47bf5deb54)
2019-11-12 13:24:54 -06:00
9bd5d96abb [stable-2.9] rpmfilename must be constructed using rpmmacros (#63025)
Different subpackages have different names so, at the least, the %NAME
macros must be used when constructing the rpmfilename.  Otherwise each
subsequent subpackage will overwrite the previous one.

This reinstates dag's fix from d4b6aecd97

Fixes #62673
(cherry picked from commit 30cc54d)

Co-authored-by: Toshio Kuratomi <a.badger@gmail.com>
2019-11-12 11:22:35 -08:00
73f42d22ff Backport PR to fix ios_interfaces where non-existing virtual/loopback interfaces was not getting configured (#64259)
* fix bug 63761 (#63901)


(cherry picked from commit be1bcc7450)

* changelog
2019-11-12 11:19:18 -08:00
153f8341a5 Use templating in HostVarsVars __repr__ (#64282)
* Fix HostVarsVars templating

* Add some tests for HostVars and HostVarsVars templating

* changelog

(cherry picked from commit 371d7aae31)
2019-11-12 11:16:52 -08:00
94c8ca6c3e Master (#62626) (#62743)
* Master (#62626)

* Update win_package.ps1

Update Test-Path to use -LiteralPath instead of -Path to fix issue where powershell will not detect path with special characters such as '=' and '[]'.

* Update win_package.ps1

modified other instances of -Path and changed to -LiteralPath.  All except line L243 since it is a different function.

* added literal path to get-itemproperty

(cherry picked from commit 153a322f54)

* add fragment
2019-11-12 11:16:42 -08:00
cf31833a48 [2.9] Ovirt vm cpu treads docs backport (#64413)
* ovirt_vm: update cpu_threads docs (#64380)

* add changelog
2019-11-12 11:05:09 -08:00
1f0c518965 Document 'elements' for module option and return value documentation. (#64075)
(cherry picked from commit 0bf9146b29)
2019-11-12 11:04:35 -08:00
870294b2ed Ovirt host network dict correct backport (#64444)
* Ovirt host network dict correct (#64437)

* ovirt_host_network: correct comparing of two dicts

* update mode_number for 4th option

* add changelog

* add changelog
2019-11-12 11:03:31 -08:00
93d9a091a3 [stable-2.9] Fix up role version pagination for Galaxy install (#64373)
* Fix up role version pagination for Galaxy install

* Fix sanity issue
(cherry picked from commit 7acae62fa8)

Co-authored-by: Jordan Borean <jborean93@gmail.com>
2019-11-12 11:02:45 -08:00
6d829b0f6c [stable-2.9] debian: install lib in dist-packages (#64412)
On Ubuntu Precise and Trusty, the build was failing because the Ansible
libs were installed in /usr/lib/python2.7/site-packages.

According to the Debian Policy (2.5), they should actually be install in
/usr/lib/python2.7/dist-packages This is also CDBS default behaviour since
0.4.131.

See: https://www.debian.org/doc/packaging-manuals/python-policy/ch-python.html

Closes: #64160
2019-11-12 10:55:24 -08:00
64665ffcc9 ansible-test: bumping ACME test container version (#64424)
* Bumping ACME test container version.

* Add changelog.

(cherry picked from commit f4ff45dcd4)
2019-11-12 10:54:28 -08:00
c44cd68aa2 template lookup: fix regression when templating hostvars (#64070)
This fixes a regression that was caused by switching from copy() to
deepcopy() when 'saving' variables before templating. Since HostVars
did not implement the __deepcopy__() method, deepcopy returned incorrect
results when host vars were present in the variables.

Fixes #63940

(cherry picked from commit cd8ce16d48)
2019-11-12 10:53:55 -08:00
26e8474f6d [stable-2.9] unsafe wrapping should only happen for with_ loops (#64401)
* unsafe wrapping should only happen for with_ lookups. Fixes #64379. Addresses #64169

* edit porting guide entry

* typo in changelog fragment

* typo

Co-Authored-By: Sandra McCann <samccann@redhat.com>

* punctuation

Co-Authored-By: Sandra McCann <samccann@redhat.com>
(cherry picked from commit 254788b)

Co-authored-by: Matt Martz <matt@sivel.net>
2019-11-12 10:53:03 -08:00
270f851e7a Replace clear() method for backward compatibility. (#64504)
(cherry picked from commit 27d3dd58a4)
2019-11-12 10:52:15 -08:00
8528f414bd postgresql_publication: fix typo in module.warn (#64582)
* postgresql_publication: fix typo in module.warn

* postgresql_publication: fix typo in module.warn, add changelog

(cherry picked from commit 2039bf45fe)
2019-11-12 10:51:45 -08:00
3628c9c07e [2.9] Correct usage of API call in aws_config_aggregator
update_resource and delete_resource takes and requires four argument.

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
(cherry picked from commit 21c8dae83b)
2019-11-12 10:51:17 -08:00
cef3036179 [2.9] Fixed tiny typo in interpreter_discovery.rst
Added missing '/'

(cherry picked from commit 84bffff96a)
2019-11-12 10:50:12 -08:00
209865502a Fixes #56832: Remove warning when falling back to apt-get if aptitude is missing. (#61782)
(cherry picked from commit a6ec6c3175)
2019-11-12 10:49:34 -08:00
362a8ffd8c Remove unused variable for junos_user (#62311)
This isn't used any place, lets remove it to fix lint checks on our
network collections.

(cherry picked from commit 119acc1afe)
Signed-off-by: Paul Belanger <pabelanger@redhat.com>
2019-11-12 10:48:53 -08:00
e38f74159d 2.9: perf: reduce getting handler variables (#59969) (#64676)
* perf: reduce getting handler variables (#59969)

* perf: reduce getting handler variables

ci_complete

* Do not re-create templar

(cherry picked from commit 9ccef9e819)

* Add changelog
2019-11-12 10:48:06 -08:00
28c4a41d9b [stable-2.9] Set alter_sys=True instead of False to address backwards… (#64686)
* [stable-2.9] Set alter_sys=True instead of False to address backwards incompat (#64670)

* Set alter_sys=True instead of False to address backwards incompat

* ci_complete

* Add integration test

* ci_complete

* sanity

* ci_complete

* Changelog fragment

* Update import test and validate-modules to match.
(cherry picked from commit b93d92ef9a)

Co-authored-by: Matt Martz <matt@sivel.net>

* Rebase and add alter_sys to validate-modules
2019-11-12 10:46:48 -08:00
46b79e386c change $partition variable name to $ansible_partition (#63968)
* change $partition variable name to $ansbile_partition

* Added changelog fragment

(cherry picked from commit 8b13836b1f)
2019-11-12 10:46:05 -08:00
d8ea223543 Backport/2.9/63785 - zabbix_host logout missing (#64735)
* added missing atexit logout for zabbix_host module

(cherry picked from commit 59ed663113)

* added changelog fragment
2019-11-12 10:45:27 -08:00
f6a10b5633 [2.9] Remove temp directory created by wait_for_connection (#64738)
wait_for_connection creates AnsiballZ_ping.py in temp directory,
which remains on remote machine even after playbook run.

Fixes: #62407

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
(cherry picked from commit 68428efc39)
2019-11-12 10:24:52 -08:00
604e06c482 remove toshio as release manager (boohoo) (#64685) (#64740)
(cherry picked from commit 94e98d5369)
2019-11-12 12:06:02 -06:00
ea211caf5f Buypass now has a ACME v2 production endpoint. (#64649) (#64680)
(cherry picked from commit 4083d02989)
2019-11-11 19:14:38 -08:00
9dbc5b631a postgresql_query: add note to the documentation (#64432) (#64539)
(cherry picked from commit eb58f437fb)
2019-11-11 19:05:59 -08:00
d35a3a74cc openssl_csr and openssl_certificate: fix support for Ed25519 and Ed448 private keys (#63984) (#64125)
* Move X25519, X448, Ed25519 and Ed448 feature tests to module_utils.

* Correctly sign with Ed25519 and Ed448 keys.

* Fix public key comparison. Ed25519 and Ed448 do not have public_numbers().

* Add tests.

* Add changelog.

* Give better errors for cryptography 2.6.x and 2.7.x.

* Test for new errors.

* Forgot one.

* Used wrong private key.

* Use private key password for CA key. Add more stuff to its certificate.

(cherry picked from commit fed267df03)
2019-11-11 19:04:15 -08:00
4055e5cfc6 XenServer: Update docs with recent changes in XenAPI python lib and branding (#63728) (#63815)
- xenserver module_util: XenAPI lib import error message handling is now
   ported to missing_required_lib(). Updated unit tests.
 - xenserver_guest, xenserver_guest_info, xenserver_guest_powerstate modules:
   docs are updated to reflect recent changes in availability of XenAPI lib
   on PyPI.
 - xenserver_guest, xenserver_guest_info, xenserver_guest_powerstate modules:
   docs are updated to reflect recent Citrix rebranding of XenServer. Broken
   URLs to external resources are fixed.
 - xenserver_guest, xenserver_guest_info, xenserver_guest_powerstate modules:
   more tested platforms are mentioned in docs.
(cherry picked from commit 7afba9420a)
2019-11-11 18:10:54 -08:00
1979b4bf76 docker_swarm_service: Allow source to be omitted for tmpfs mounts (#64637) (#64640)
* Allow source to be omitted for tmpfs mounts.

* Add changelog.

(cherry picked from commit 574bd32db2)
2019-11-11 18:02:54 -08:00
afc4218ac4 docker_login: Use with statement for accessing files (#64382) (#64392) (#64524)
* docker_login: Use with statement for accessing files (#64382)

* Update changelogs/fragments/64382-docker_login-fix-invalid-json.yml

Co-Authored-By: Felix Fontein <felix@fontein.de>
(cherry picked from commit 52c4c1b00d)
2019-11-11 18:01:44 -08:00
a0ec2976b2 [2.9] Callback: removing args from task_fields from Sumologic and Splunk plugin (#64274)
CVE-2019-14864 Ansible: Splunk and Sumologic callback plugins leak sensitive data in logs

Fixes #63522

Signed-off-by: Patrick O’Brien <patrick.obrien@thetradedesk.com>
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
(cherry picked from commit c76e074e4c)
2019-11-11 18:00:48 -08:00
8cc018d936 [stable-2.9] paramiko_ssh - Improve authentication error message (#64157) (#64163)
The error is not always an invalid username/password. It could be a connection timeout or refusal.
(cherry picked from commit d5fbe6573b)

Co-authored-by: Sam Doran <sdoran@redhat.com>
2019-11-11 17:59:46 -08:00
68fcc7a50c [stable-2.9] copy - check for changes beyond first level of subdirectories (#58323) (#64111)
Add integration test for copy: deep recursive with remote_src=True
(cherry picked from commit b7e38dfa52)

Co-authored-by: Alexander Korsunsky <A.Korsunsky@gmail.com>
2019-11-11 17:37:45 -08:00
39aba6d304 lineinfile - don't run os.makedirs on empty dir path (#63921) (#64091)
* Fix #63919: don't run os.makedirs on empty dir path

* integration test for lineinfile create: yes without path (Sam Doran <sdoran@redhat.com>)

(cherry picked from commit 3c978a3225)
2019-11-11 17:36:16 -08:00
0e4fe7a52b ACMEAccount.get_request check status code value lower boundary (#63140) (#64071)
* check status code value lower boundary

Any HTTP code below 200 cannot be considered a success, should be
handled like a failure instead.

This is particularly true for below zero status codes.

Fixes #63139

* provide changelog fragment

* ensure connection errors are handled in Acme module

* add fetch_url check to ACME.send_signed_request

* remove module.fail_json

* move _assert_fetch_url_success out of ACMEAccount

* fix ansible-lint errors

* use simplified syntax status checking

(cherry picked from commit 0d905a0496)
2019-11-11 17:34:35 -08:00
b327e1e2c6 acl: fix module failure if there're spaces in a path (#63280) (#63811)
* Make acl module to work with whitespaces in path

* Added a changelog fragment

* Add quotes to changelog fragment

(cherry picked from commit 504d76e956)
2019-11-11 17:32:11 -08:00
02f45f45d7 Backportable subset of: openssl_csr: deprecate version option (#63432) (#63674)
Cherry-picked from ba686154b9.
2019-11-11 17:23:40 -08:00
61c323b199 Backport 2.9: Fix Gitlab module deprecation warning (#60425) (#63499)
* Fix Gitlab module deprecation warning (#60425)

* gitlab modules : Fix deprecation warnings and parameters

Also preparing for 2.10 deprecation

* gitlab modules : Correct deprecation message

(cherry picked from commit 7bb90999d3)

* gitlab_modules :  remove misssing required parameter (#63690)

* gitlab_group: remove required=True on server_url param

* gitlab_project: remove required=True on server_url param

* Revert "Example incorrect: server_url is required argument (#63670)"

This reverts commit b02467961a.
This modification shouldn't have been made.
This parameter is deprecated and #60425 forget to remove the required
parameter

(cherry picked from commit 0af32a1093)

* gitlab modules : Add changelog
2019-11-11 16:32:24 -08:00
0d993a6b78 Fix issue when setting an empty pass to no_log param (#62804) - 2.9 (#62814)
* Fix issue when setting an empty pass to no_log param (#62804)

* Fix issue when setting an empty pass to no_log param

* Fix typo

(cherry picked from commit 322e225830)

* Fix up actual get for older versions
2019-11-11 15:38:20 -08:00
64c52e6021 [stable-2.9] Fix ansible-test collections sanity import test. (#64467)
* Fix ansible-test collections sanity import test.

Resolves https://github.com/ansible/ansible/issues/64466

* Fix get_source implementation also.

* Fix is_package function.
(cherry picked from commit adcf9458f1)

Co-authored-by: Matt Clay <matt@mystile.com>
2019-11-11 15:11:41 -08:00
276f4b21de [stable-2.9] Fix ansible-test sanity requirements install.
This fixes ansible-test so it no longer tries to install sanity test dependencies on unsupported Python versions.
(cherry picked from commit 437e9b7063)

Co-authored-by: Matt Clay <matt@mystile.com>
2019-11-11 15:11:15 -08:00
259c278bcd [stable-2.9] Add constraint for pathspec.
This fixes installation of pathspec on Python 2.6.
(cherry picked from commit 32b57d57a0)

Co-authored-by: Matt Clay <matt@mystile.com>
2019-11-11 15:10:57 -08:00
8b0249c0b0 [stable-2.9] Add missing var for format string in ansible-test.
(cherry picked from commit 32979430d0)

Co-authored-by: Matt Clay <matt@mystile.com>
2019-11-11 15:10:43 -08:00
0586d2c630 Merge pull request #63537 from mattclay/backport-d829a50-stable-2.9
[stable-2.9] Fix use of deprecated function in xml module.
2019-11-11 15:09:48 -08:00
7c5e08c059 [stable-2.9] Fix ansible-test env var mixing running commands.
(cherry picked from commit 6be4741f72)

Co-authored-by: Matt Clay <matt@mystile.com>
2019-11-11 15:09:16 -08:00
c271fd0df2 [stable-2.9] Fixes for validate-modules import handling. (#63932)
* Fix validate-modules support for collections.

- Relative imports now work correctly.
- The collection loader is now used.
- Modules are invoked as `__main__`.

* Remove obsolete validate-modules code ignores.

* Handle sys.exit in validate-modules.

* Add check for AnsibleModule initialization.

* Remove `missing-module-utils-import` check.

This check does not support relative imports or collections.

Instead of trying to overhaul the test, we can rely on the `ansible-module-not-initialized` test instead.

* Fix badly named error codes with `c#` in the name.

The `#` conflicts with comments in the sanity test ignore files.

* Add changelog entries.
(cherry picked from commit e9f8a34dce)

Co-authored-by: Matt Clay <matt@mystile.com>
2019-11-11 15:07:58 -08:00
02cc45a8ae clarify acceptable file types in collection docs (#64618) (#64622)
* clarify acceptable file times in collection docs

* implement feedback

(cherry picked from commit 6a662b0ed0)
2019-11-08 14:52:37 -06:00
f561e7d15f updates RHEL packages to 2.9 (#64532) (#64620)
(cherry picked from commit ac9c75d467)
2019-11-08 14:00:03 -06:00
22df4947e2 [stable-2.9] Switch from RHEL 8.0 & 8.1b to 8.1 in CI.
(cherry picked from commit 75646037dc)

Co-authored-by: Matt Clay <matt@mystile.com>
2019-11-07 14:58:55 -08:00
6c7fadd861 clarify vault warning and fix typo (#64457)
(cherry picked from commit 59eb966042)
2019-11-06 15:43:45 -06:00
6d309f726d Add note about large tarball sizes for collections (#64411) (#64416)
* add note on collection tarball size

(cherry picked from commit 797397558e)
2019-11-04 15:59:52 -06:00
c486638e4e add general facts-to-info paragraph (#64293) (#64297)
(cherry picked from commit 6e07d4c1d9)
2019-11-01 15:32:07 -05:00
0c6cb417e5 [Docs-Release-2.9] clean up porting guide links and network text (#64124) (#64290)
* clean up porting guide links and network text
* fix shippable error

(cherry picked from commit 56d5fd34e3)
2019-11-01 14:31:24 -05:00
284be7456c [stable-2.9] Exclude the ansible-test script from the main rpm package (#64277)
We want the script to live in the ansible-test rpm subpackage alongside
of its libraries

Fixes #64275
(cherry picked from commit 87de146038)

Co-authored-by: Toshio Kuratomi <a.badger@gmail.com>
2019-11-01 12:27:20 -07:00
30bbbdbe33 action/ce.py:clear configuration candidate when return to user-view. (#63513)
* clear configuration candidate when return to user-view.

* add a changelog fragment for the pr.

* Update 63513-ce_action_wait_prompt_trigger_time_out.yaml

* Update 63513-ce_action_wait_prompt_trigger_time_out.yaml

(cherry picked from commit 47c31c201b)
2019-11-01 08:40:49 -07:00
0046d0be47 [temporary-2.9.1-branch-releng-only] lineinfile - use correct index value when inserting at the end (#63696)
(cherry picked from commit 92cd13a2cf)

Co-authored-by: Sam Doran <sdoran@redhat.com>
2019-11-01 08:40:49 -07:00
96d304a894 [temporary-2.9.1-branch-releng-only] lineinfile - properly insert line when line exists and backrefs are enabled (#63763)
Use a separate variable for the boolean test rather than having the same variable sometimes be a boolean and sometimes be a regular expression match object

Add integration tests to cover this scenario
(cherry picked from commit 29d4d318a5)

Co-authored-by: Sam Doran <sdoran@redhat.com>
2019-11-01 08:40:49 -07:00
c68507bcb0 Backport/2.9/62471 ce_link_status:update to fix a bug. (#62417) (#63423)
* update to fix a bug. (#62417)


(cherry picked from commit 7541dab1ef)

* add a changelog fragment.
2019-11-01 08:40:49 -07:00
6446b70728 docker modules: improve return value list documentation (#63145)
* Improve type documentation.

* Also improve return values.

(cherry picked from commit 7f643690c7)
2019-11-01 08:40:49 -07:00
67c02e5dee [2.9] crypto modules: improve return value list documentation (#63409)
* crypto modules: improve return value list documentation (#62929)

* Improve return value documentation by allowing entry for return values.
* Add docs formatting, adjust styling.
* Fix sample return value. (Taken from https://tools.ietf.org/html/rfc7517#appendix-A.1.)
* Work around abuse of .

(cherry picked from commit 054285c34c)

* Add changelog.
2019-11-01 08:40:49 -07:00
80233545cc docker_node_info: improve error handling (#63418)
* Improve error handling for get_service_inspect().

* Add changelog fragment.

(cherry picked from commit d753168e9d)
2019-11-01 08:40:49 -07:00
23f5b3b635 [stable-2.9] user - fix shadow file parsing on AIX (#62547)
Initialize variables in case the shadow file is not found.
Handle IndexErrors if something goes wrong with file parsing.
(cherry picked from commit e9d10f94b7)

Co-authored-by: Sam Doran <sdoran@redhat.com>
2019-11-01 08:40:49 -07:00
644f77f3ab [Backport/2.9/63331]Update ce_facts to fix bugs (#63457)
* Update ce_facts to fix bugs

(cherry picked from commit 73e7da40ff)

* Update ce_facts modified information
2019-11-01 08:40:49 -07:00
a72a25d191 [backport 2.9] facts: detect FreeBSD jails guest (#62857) (#62913)
* facts: detect FreeBSD jails guest (#62857)

* facts: detect FreeBSD jails

* PEP8 fix

* changelog for pr62913
2019-11-01 08:40:49 -07:00
a0fb10c2ab [stable-2.9] package_facts - use AnsibleModule.warn() for warnings
(cherry picked from commit 2b1e24fc49)

Co-authored-by: Sam Doran <sdoran@redhat.com>
2019-11-01 08:40:49 -07:00
353c9cb99d docker_image: fix option parameter so that warnings are issued (#63345)
* Fix option parameter so that warnings are issued.

* Add changelog.

(cherry picked from commit 61b3784131)
2019-11-01 08:40:49 -07:00
fc65941d86 Backport/2.9/63332 ce_netstream_global: bugs fix(list index out of range) (#63332) (#63389)
* ce_netstream_global: bugs fix(list index out of range) (#63332)

* update to fix bugs:index out of range

* list index out of range

* list index out of range

* update for bad-whitespace

* Update ce_netstream_aging.py

* Update ce_netstream_aging.py

* Update ce_netstream_global.py

* Update ce_netstream_global.py

* Update ce_netstream_global.py

* Update ce_netstream_template.py

* Update ce_netstream_global.py

* Update ce_netstream_global.py

* Update ce_netstream_template.py

* Update ce_netstream_aging.py

(cherry picked from commit b7f12f9ff3)

* add a changelog fragment.

* Update 63389_ce_netsream_list_index_out_of_range.yml

empty-lines too many blank lines (1 > 0)
2019-11-01 08:40:49 -07:00
3c0ed8c02a clean "changed" only after it has been processed (#59958)
* clean "changed" after it has been processed

without this change, a loop of `debug` tasks with `changed_when`
causes the "changed" status to get lost before output

* runme.sh tests for debug loop status

(cherry picked from commit bfd32c9b00)
2019-11-01 08:40:49 -07:00
125f7e8db1 issue #61672 backporting in Ansible 2.9 2019-11-01 08:40:49 -07:00
cc244f4e03 lineinfile - fix bug with insertbefore/insertafter and firstmatch (#63194)
(cherry picked from commit 3b18337cac)
2019-11-01 08:40:49 -07:00
9d1f07dd03 Backport/2.9/62587 module_utils/network/cloudengine:fix get_nc_next. (#62752)
* fix plugins/netconf/ce.py for netconf/capability/exchange (#60569)


(cherry picked from commit 037401b6e0)

* for capability/exchange/1.0 (#60630)

* for capability/exchange/1.0

* for capability/exchange/1.0

* update for shippable

* Update ce.py

* Update ce.py

(cherry picked from commit 28227c95a4)

* module_utils-network-cloudengine: fix get_nc_next. (#62587)

* fix get_nc_next.

* add a changelog fragment.

* upadte for  changelgo fragment.

* merge two prs, one depens another.

* merge two prs, one depens another.

* update changelog.

(cherry picked from commit d6ef7c8530)
2019-11-01 08:40:49 -07:00
fb897c3f48 [Backport/2.9/62589]update ce_bgp_af to fix bugs (#62652)
* update ce_bgp_af to fix bugs (#62589)

* update to fix bugs

* update to fix bugs

(cherry picked from commit 2a206f0e4c)

* Update ce_bgp_af modified information
2019-11-01 08:40:49 -07:00
c95f012ff6 [Backport/2.9/61442]Update ce_mtu to fix bugs (#62684)
* Update ce_mtu to fix bugs

(cherry picked from commit cb8a3a4c06)

* Update ce_mtu modified information
2019-11-01 08:40:49 -07:00
91eacc0f2b Bugfix for aggregate function in junos_user module (#62833)
* Update junos_user.py (#60459)

(cherry picked from commit c226c1015e)

* changelog fragment for junos_user bugfix
2019-11-01 08:40:49 -07:00
d68a05414a [Backport/2.9/61431]Update ce_interface_ospf to fix bugs (#62686)
* Update ce_interface_ospf to fix bugs

(cherry picked from commit b7e9bb8448)

* Update ce_interface_ospf modified information
2019-11-01 08:40:49 -07:00
59f33cde8b [Backport/2.9/61283]Update ce_info_center_global to fix bugs (#62688)
* Update ce_info_center_global modified information

* Update ce_info_center_global to fix bugs (#61283)

* Update ce_info_center_global to fix bugs

* Update ce_info_center_global to fix bugs

* Update ce_info_center_global to fix bugs

(cherry picked from commit 2d85cb3ded)
2019-11-01 08:40:49 -07:00
e9ef022b5d [Backport/2.9/61168]Update ce_evpn_bgp_rr to fix bugs (#62690)
* Update ce_evpn_bgp_rr to fix bugs

(cherry picked from commit 2cb3da3fa6)

* Update ce_evpn_bgp_rr modified information
2019-11-01 08:40:49 -07:00
4f8fefa6c4 [Backport/2.9/61136]Update ce_evpn_bgp to fix bugs (#62692)
* Update ce_evpn_bgp modified information

* Update ce_evpn_bgp to fix bugs

(cherry picked from commit 05d984b180)
2019-11-01 08:40:49 -07:00
2355ba73a5 [Backport/2.9/61652]Update ce_netstream_export to fix bugs (#62682)
* Update ce_netstream_export to fix bugs (#61652)

* Update ce_netstream_export to fix bugs

* Update ce_netstream_export to fix bugs

(cherry picked from commit 8233389446)

* Update ce_netstream_export modified information
2019-11-01 08:40:49 -07:00
ecf40c8275 [Backport/2.9/61653]Update ce_netstream_aging to fix bugs (#62658)
* Update ce_netstream_aging to fix bugs (#61653)

* Update ce_netstream_aging to fix bugs

* Update ce_netstream_aging to fix bugs

(cherry picked from commit 80fa2a0816)

* Update ce_netstream_aging modified information
2019-11-01 08:40:49 -07:00
254d2552f5 [Backport/2.9/61654]Update ce_ntp to fix bugs (#62656)
* Update ce_ntp modified information

* Update ce_ntp to fix bugs

(cherry picked from commit afea7cc454)
2019-11-01 08:40:49 -07:00
d869985a4c [Backport/2.9/61683]Update ce_vrf_af to fix bugs (#62654)
* Update ce_vrf_af to fix bugs

(cherry picked from commit 0c65db1a23)

* Update ce_vrf_af modified information
2019-11-01 08:40:49 -07:00
8c0e7bfb25 [Backport/2.9/61013]Update ce_evpn_global to fix bugs (#62694)
* Update ce_evpn_global modified information

* Update ce_evpn_global to fix bugs

(cherry picked from commit 9c6899a92f)
2019-11-01 08:40:49 -07:00
768bdeda0f [Backport/2.9/60937]Update ce_bgp_neighbor_af to fix bugs (#62696)
* Update ce_bgp_neighbor_af modified information

* Update ce_bgp_neighbor_af to fix bugs (#60937)

* Update ce_bgp_neighbor_af to fix bugs

* Update ce_bgp_neighbor_af to fix bugs

* Update ce_bgp_neighbor_af to fix bugs

(cherry picked from commit a260209098)
2019-11-01 08:40:49 -07:00
4725140514 [Backport/2.9/60634]Update ce_bgp_neighbor to fix bugs (#62698)
* Update ce_bgp_neighbor modified information

* Update ce_bgp_neighbor to fix bugs

(cherry picked from commit dc5f127086)
2019-11-01 08:40:49 -07:00
71743d3456 Update ce_bgp modified information 2019-11-01 08:40:49 -07:00
637933d433 update ce_bgp to fix bugs (#60573)
* update ce_bgp to fix bugs

* update ce_bgp to fix bugs

* update ce_bgp to fix bugs

* update ce_bgp to fix bugs

* Update ce_bgp to fix bugs

(cherry picked from commit 5f35916b22)
2019-11-01 08:40:49 -07:00
9e211c64ce docker_container: improve image finding / change detection (#62971)
* Improve image finding / change detection.

* Checked wrong object.

* Improve behavior. (Let docker daemon sort this out.)

* Add changelog.

* Add simple test.

* Fix image name.

* Use new docker_image params.

* Rewrite.

(cherry picked from commit 41eafc2051)
2019-11-01 08:40:49 -07:00
9fd70e3f3c Fix whitespace issue in filter (backport 2.9)
This fixes reported issue #60276

This is a backport of #62768
2019-11-01 08:40:49 -07:00
bdaa8baacb docker_container: fix idempotency for network IP addresses (#62928)
* Specifying IP addresses needs API version 1.22 or newer.

* Simplify code.

* Use IPAMConfig.IPv*Address instead of IPAddress and GlobalIPv6Address.

* Add changelog.

* Fix syntax errors.

* Add integration test.

* Don't rely on netaddr.

* Normalize IPv6 addresses before comparison.

* Install netaddr, and use it.

(cherry picked from commit 62c0cae29a)
2019-11-01 08:40:49 -07:00
25ff3d491a Fix _validate_csr_subject and _validate_csr_signature (#62790)
On python 3, if there is no explicit "return True", the
function call will be seen as "False", thus failling the module

(cherry picked from commit 75c4e9ec05)
2019-11-01 08:40:49 -07:00
de4d3dc34d ACME modules: make compatible to Buypass ACME v1 CA, and fix bug in ACME v1 account update (#61693)
(cherry picked from commit c6dcf78f53)
2019-11-01 08:40:49 -07:00
d55f7a0d26 Backport/2.9/docs release (#64173)
* docs: update to latest 3 versions (#64109)

(cherry picked from commit 409545825f)

* update too old version to 2.4 (#64167)

(cherry picked from commit c63ef6d911)

* update backport instructions to use stable-2.9 (#64168)

(cherry picked from commit f264e9cfca)

* [Doc-Release-2.9] update release and maintenance page for 2.9 (#64166)
* only 2.4 and earlier used the old changelog system

(cherry picked from commit 3f808d9ed6)
2019-11-01 09:03:23 -05:00
e6751a2d2a change 2.9 to lateset` (#64266) 2019-11-01 08:57:13 -05:00
6cad5e3546 Update Ansible release version to v2.9.0.post0. 2019-10-31 10:59:16 -07:00
24325a05df New release v2.9.0 2019-10-31 09:06:47 -07:00
891d801905 fixed changelog spelling issues (#64106) 2019-10-30 12:46:22 -05:00
381ca99de7 fix spelling issues (#64103) (#64107)
(cherry picked from commit 26236f474b)
2019-10-30 12:43:32 -05:00
b80ca85a69 Backport/2.9/docs (#64073)
* clarify no subfolders and md only for collections /docs folder (#63808)

(cherry picked from commit 6a2902c8d5)

* Fixed example error in windows_winrm user guide (#63922)
The example code to configure TLS 1.2 Support using Ansible had an indention error. The register variable 'enable_tls12' was not indented. This caused the subsequent task to fail since the variable was not registered. 

(cherry picked from commit c562e17659)

* Fix doc errors in AWS modules (#63851)
* Fix register/debug in aws_batch_compute_environment
* Fix aws_batch_job_queue doc errors
* Fix module naming: `batch_job_queue` > `aws_batch_job_queue`
* Fix missing register
* Update debug task to use modern YAML format
* Fix missing register + debug for lambda_policy
* Fix YAML syntax for elb_application_lb_info module

(cherry picked from commit e4f16368ed)

* Update documentation for package module (#63909)
It is not clear from the documentation that list can be used

(cherry picked from commit 7f2c367d78)

* [ec2_launch_template] Update description of state param (#63147)
Currently, it is not possible to delete specific versions of an ec2 launch template. The module docs incorrectly suggest that there is a `version` param to the module that can be used to do that. This patch aims to correct that error.

(cherry picked from commit 7ea7260753)

* template: Add a space in example block (#63930)

(cherry picked from commit f279715c29)

* revisions to docsite  README (#63957)

(cherry picked from commit 5c962ef859)

* combine galaxy.com install roles details (#63486)

(cherry picked from commit ee8a088205)

* Correct a typo (#64020)

(cherry picked from commit 18f4f0549f)

* Update password.py (#63965)
Update the examples of the password lookup plugin to show how multiple options are joined together.

(cherry picked from commit 92daec5d0b)

* Fix indentation of example (#63789)
Remove no_log since module_defaults aren't displayed like set_fact was

(cherry picked from commit 1e52782d6b)

* add newline to render table correctly (#63769)

(cherry picked from commit 1aee11c860)

* clarified some points on environment keyword usage (#64065)

(cherry picked from commit 885ee62b53)
2019-10-30 12:42:24 -05:00
12820ba64f Update Ansible release version to v2.9.0rc5.post0. 2019-10-23 13:21:18 -07:00
149ff0d3ad New release v2.9.0rc5 2019-10-23 11:18:01 -07:00
07fa9b5187 Backport/2.9/docs (#63814)
* Replaced old DSC links that given 404 (#63556)
Replace DSC links that returned "not found" with updated, working links.

(cherry picked from commit f638f29e44)

* Fix example in pip module documentation (#63462)

(cherry picked from commit d8b9f9fb4f)

* Update vmware ansible modules requirements section (#62797)
Update vSphere Automation Python SDK to the requirement section

Signed-off-by: Jobin George <jgeorge@vmware.com>
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
(cherry picked from commit 8a77f17dea)

* Typo usersername should be username (#63671)

(cherry picked from commit 2ef4ac1404)

* Update description for firstmatch option (#62896)

Fixes issue https://github.com/ansible/ansible/issues/62862. The edit makes the description for the `firstmatch` option clearer. The `firstmatch` option was introduced by PR https://github.com/ansible/ansible/pull/33825

(cherry picked from commit aeb0dde7cc)

* Update win_regmerge.py (#63633)
s/windows/Windows/ in title

(cherry picked from commit 4326165be5)

* Example incorrect: server_url is required argument (#63670)
The example "Delete GitLab Group" does not work - requires server_url parameter. This likely applies to all Examples, so this change proposes at least putting in the required parameter in the examples. In future we can remove the soon-to-be deprecated server_url parameter.

(cherry picked from commit b02467961a)

* doc: win_user: fix typo in the description of the groups modifyer (#63743)

(cherry picked from commit 6046386dba)

* Update AWS dev guide to recommend module_defaults and point to CI policy repo (#63589)

(cherry picked from commit 9cda5819b9)

* Add example for port range to win_firewall_rule_module (#63269)

(cherry picked from commit 2e81b813dd)

* added a link to install instruction of OpenSSH (#63548)

(cherry picked from commit cfe2beae46)
2019-10-23 10:05:12 -05:00
e1b9bed57d [stable-2.9] Fix various import sanity test issues. (#63839)
* [stable-2.9] Fix various import sanity test issues.

- Relative imports are now properly recognized.
- Correct script invocation of Ansible modules is used.
- Warnings are now consistently reported as errors.
- Errors are now consistently reported with the file tested.

Resolves https://github.com/ansible/ansible/issues/62723
Resolves https://github.com/ansible/ansible/issues/61884
(cherry picked from commit 92ccdeac31)

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

* Changelog entry for ansible-test sanity fixes.

(cherry picked from commit 0923ed56c7)
2019-10-23 07:10:22 -07:00
76c0a0825f [stable-2.9] Fix SSL protocol references in mqtt module. (#63654)
(cherry picked from commit 78eca0eb5d)

Co-authored-by: Matt Clay <matt@mystile.com>
2019-10-23 07:07:35 -07:00
db5382341d [stable-2.9] AH servers include automation-hub as part of the server configuration. (#63700)
* AH servers include automation-hub as part of the server configuration.

So we don't need to add it here.

Fixes #63699

* Update unittests for the fix to galaxy wait_import_task
(cherry picked from commit cc1ff57)

Co-authored-by: Toshio Kuratomi <a.badger@gmail.com>
2019-10-20 19:03:47 -07:00
3d04f25314 Update Ansible release version to v2.9.0rc4.post0. 2019-10-17 14:59:55 -07:00
289cdb6ea0 New release v2.9.0rc4 2019-10-17 09:56:06 -07:00
ab8f9969af [stable-2.9] Update default-test-container to 1.10.1.
This brings in the final Python 3.8.0 release instead of a release candidate.
(cherry picked from commit 7448084858)

Co-authored-by: Matt Clay <matt@mystile.com>
2019-10-17 09:10:55 -07:00
118825f4ae [stable-2.9] Fix ansible-galaxy --version (#63636)
* [stable-2.9] Added changelog fragment
(cherry picked from commit 7da37e5)

Co-authored-by: Andrea Tartaglia <andrea@braingap.uk>

* Fixes --version in ansible-galaxy cli

(cherry picked from commit 202ad4f89a)
2019-10-17 08:59:14 -07:00
741b6e65ef [stable-2.9] Galaxy publish fix (#63580)
* Handle galaxy v2/v3 API diffs for artifact publish response

For publishing a collection artifact
(POST /v3/collections/artifacts/), the response
format is different between v2 and v3.

For v2 galaxy, the 'task' url returned is
a full url with scheme:

        {"task": "https://galaxy-dev.ansible.com/api/v2/collection-imports/35573/"}

For v3 galaxy, the task url is relative:

        {"task": "/api/automation-hub/v3/imports/collections/838d1308-a8f4-402c-95cb-7823f3806cd8/"}

So check which API we are using and update the task url approriately.

* Use full url for all wait_for_import messages

Update unit tests to parameterize the expected
responses and urls.

* update explanatory comment

* Rename n_url to full_url.

* Fix issue with overwrite of the complete path

* Fixes overwrite of the complete path in case there's extra path stored
  in self.api_sever
* Normalizes the input to the wait_import_task function so it receives
  the same value on both v2 and v3

Builds on #63523

* Update unittests for new call signature

* Add changelog for ansible-galaxy publish API fixes.
(cherry picked from commit 4cad7e4)

Co-authored-by: Toshio Kuratomi <a.badger@gmail.com>
2019-10-16 18:24:40 -07:00
b04d328b3a Backport/2.9/docs2 (#63524)
* Update sros_config.py (#63132)

(cherry picked from commit b3deab4319)

* add note about collection links (#63346)

(cherry picked from commit bdd0fac606)

* Nosh module documentation update (#63303)
* detail the 'status' dictionary
* did not add individual descriptions, see nosh documentation for those
* sample: False not being rendered unless 'False' is quoted

(cherry picked from commit df283788e5)

* Move galaxy appendix info to a new Galaxy section (#63356)
* start galaxy docs restructure
* shared snippets in txt files
* moved all content to galaxy section

(cherry picked from commit ae265bc546)

* Enter should be Italics as it is a menu option (#63441)

(cherry picked from commit 7a8c909876)

* ini_file: remove incorrect documentation (#63394)

(cherry picked from commit ab249a469e)

* Changed with_items to loop in VMware example (#63022)

(cherry picked from commit 876a2d57be)

* ovirt update fetch_nested param doc (#63191)

(cherry picked from commit 0beab6bf69)

* Update 'delete' parameter description in synchronize module (#63450)

Co-Authored-By: Abhijeet Kasurde <akasurde@redhat.com>
(cherry picked from commit da46800f1b)

* Update unarchive.py - Further clarify extra_opts (#58102)
Update the description in the options to help assist with what the module is looking for in the extra_opts.  #31873 alone is not enough since if you are not familiar with the option given in the example it may not be obvious that both elements are part of the same option instead of being two different options.

Co-Authored-By: Alicia Cozine <879121+acozine@users.noreply.github.com>
(cherry picked from commit e967060b9f)

* ovirt_vm add warning about next run configuration (#63458)

(cherry picked from commit 16e49fdd44)

* Fix doc - porting_guide_2.8 value example (#63493)

(cherry picked from commit e0f67b58ce)

* Fix warnings for ufw examples (#63505)

(cherry picked from commit e4eea0510c)
2019-10-16 10:26:31 -05:00
db2e1d9227 Backport/2.9/docs (#63521)
* Update stat.py (#63289)
Reword awkward documentation language.

(cherry picked from commit b46299ff86)

* Update win_disk_facts.py example (#63266)
Fix incorrect index for second disk (should be `disks[1]` not `disks[0]`)

(cherry picked from commit ce1c8c24f7)

* Fix broken link (#63185)

(cherry picked from commit 021d095625)

* Typo on line 161 (#63133)
fix module name for azure_rm_manageddisk in one example

(cherry picked from commit 81a614684a)

* docs: add Centos and Ubuntu to examples for playbook conditionals (#63085)

Co-Authored-By: Sandra McCann <samccann@redhat.com>
(cherry picked from commit 19587b35da)

* Spot instance code error (#63246)
Adds 'instance_initiated_shutdown_behavior: terminate' to spot instance example for greater efficiency.

(cherry picked from commit 5ed163ce3f)

* Pass a JSON file to the Lambda's payload (#63261)
* Add an example of passing a JSON file to the Lambda's payload
Events passed to Lambda are commonly in JSON format, the change provides an example of using JSON file as an alternative to the inline YAML payload in the other examples.

(cherry picked from commit 1d5206f53e)

* Update ec2.py (#63260)
Change the explanation of spot_wait_timeout

(cherry picked from commit 719170e5c1)

* fix aruba_config examples (#63136)

(cherry picked from commit 6ff5968781)

* [ec2_launch_template] Update examples (#63152)
- Update tasks names for existing examples
- Add a new example showing how to delete a launch template

(cherry picked from commit 32980f214a)
2019-10-16 10:24:38 -05:00
bbc7c2d2ea [2.9] Fix return value documentation (#63529)
* Fix return value documentation (1/2) (#63477)
* Avoid validation errors for missing 'contains:'.

(cherry picked from commit 6bea1597cc)

* Fix return value documentation (2/2) (#63478)
* Avoid validation errors for missing 'contains:'.
* Convert JSON text to JSON dict.
* example -> sample.
* Fix YAML.

(cherry picked from commit 4bc298af83)
2019-10-16 10:21:50 -05:00
7a326e876b mysql_user: add seealso (#63497) (#63500)
(cherry picked from commit ecf71dd720)
2019-10-15 13:58:02 -05:00
b500ab3232 [stable-2.9] Ensure we preserve the /api appended URL (#63472)
(cherry picked from commit d8389d9)

Co-authored-by: Matt Martz <matt@sivel.net>
2019-10-14 14:33:10 -07:00
f610ed3a4e [stable-2.9] Properly mask no_log values is sub parameters during failure (#63405)
* Get no_log parameters from subspec

* Add changelog and unit tests

* Handle list of dicts in suboptions

Add fancy error message (this will probably haunt me)

* Update unit tests to test for list of dicts in suboptions

* Add integration tests

* Validate parameters in dict and list

In case it comes in as a string

* Make changes based on feedback, fix tests

* Simplify validators since we only need to validate dicts

Add test for suboptions passed in as strings to ensure they get validated properly and turned into a dictionary.

ci_complete

* Add a few more integration tests
(cherry picked from commit e9d29b1fe4)

Co-authored-by: Sam Doran <sdoran@redhat.com>
2019-10-14 14:31:16 -07:00
cfa6835f04 docker_* modules: docs improvements (#63165) (#63299)
* Improve docker_container docs.
* Fix usage of C(...) and I(...) and abuses of I(...).
* tls_verify has been made an alias of validate_certs some time ago.
* Fix YAML problems, order, formatting.
* Split long description.
* Rewrite state docs and make proper sentences.

Co-Authored-By: Andrey Klychkov <aaklychkov@mail.ru>

(cherry picked from commit 5349b3ae4c)
2019-10-11 13:28:20 -05:00
84ad291b3e Improve type documentation. (#62179) (#63142)
(cherry picked from commit a59b9d4269)
2019-10-11 13:25:26 -05:00
1ea7fc2f4c add ios/iosxr deprecated modules (#62992)
(cherry picked from commit 9b69e02882)
2019-10-11 13:23:59 -05:00
d59de7123a adapt to firewalld 0.7.0 for RHEL 8.1 Beta, Fedora 31+
Fixes #63254

Signed-off-by: Adam Miller <admiller@redhat.com>
2019-10-11 07:37:32 -07:00
baeff7462d Wrap CLI passwords as AnsibleUnsafeText (#63352)
* isa string should rewrap as unsafe in get_validated_value

* _is_unsafe shouldn't be concerned with underlying types

* Start with passwords as text, instead of bytes

* Remove unused imports

* Add changelog fragment

* Update changelog with CVE
2019-10-10 19:49:34 -07:00
7417d53546 Update Ansible release version to v2.9.0rc3.post0. 2019-10-10 16:52:11 -07:00
40f415ba35 New release v2.9.0rc3 2019-10-10 15:17:53 -07:00
5b6e8590cf fix default collection resolution in adhoc (#63298)
* fix default collection resolution in adhoc

* if an adhoc command is run with a playbook-dir under a configured collection, default collection resolution is used to resolve unqualified module/action names

* Set ANSIBLE_PLAYBOOK_DIR in integration tests.

* Fix config conflict in ansible integration test.

* add adhoc default collection test

* text-ify warning string

(cherry picked from commit 6d52bdf4db)
2019-10-10 14:54:14 -07:00
1ca6667a2f [2.9 backport] config encode errors should not be fatal (#63311) (#63312)
* config encode errors should not be fatal (#63311)

* fixes #63310
* subset of fixes from #58638
* added warning on error

(cherry picked from commit 77de663879)

* bring back text-ification from #63349
2019-10-10 13:55:29 -07:00
ae3a79fa58 backport of galaxy trailing api fix (63238) to stable-2.9 (#63293)
* Stop appending '/api' to galaxy server url (#63238)

* Stop appending '/api' to configured galaxy server url

Since not all galaxy REST api server URLs live
at '/api', stop always appending it to the
'url' value loaded from config.

* Add note about manually migrated galaxy configs and /api

* Add '/api/' to galaxy url and guessing if galaxy API

* Fix most unit tests (update to expect /api/)

* Fix test_initialise_unknown unit test

Since we retry now with an added /api/, mock it as well.

* Update fallback default avail_ver to new format

(cherry picked from commit bad72693e4)

* Add changelog fragment galaxy_api_config

* Fix galaxy url use everywhere when url is set in config. (#63286)

In addition to trying the configured url (for ex, a migrated
'https://galaxy.ansible.com/') there is an attempt at that
URL with '/api' postpended.

If the extended URL works, update GalaxyAPI.api_server to
use the extended URL. Previously it only used it for finding
the API root info ('available_versions', etc)

(cherry picked from commit ed203c5902)
2019-10-10 09:31:22 -07:00
37b4a5089e [2.9] Fix STS assume role error message when role does not exist (#63307)
* Fix STS assume role error message when role does not exist (#63249)

AWS appears to have changed this error message again.
Fixes https://app.shippable.com/github/ansible/ansible/runs/145643/115/tests

* [2.9] Fix STS assume role error message when role does not exist

* fix changelog sanity
2019-10-10 09:30:09 -07:00
e05938e05e [stable-2.9] cronvar - use correct binary name (#63279) (#63338)
* [stable-2.9] cronvar - use correct binary name (#63279)

Fixes regression introduced by #62554
Add integration tests for cronvar.
(cherry picked from commit 9d014778ad)

Co-authored-by: Sam Doran <sdoran@redhat.com>

* cron: add integration tests (#59830)

* cron: add integration tests

Use faketime in order to reduce waiting time. Using opensuse15
container:

    Tuesday 30 July 2019  23:03:19 +0000 (0:00:05.410)       0:01:28.291 **********
    ===============================================================================
    cron : install cron and faketime packages ------------------------------ 78.65s
    cron : wait 70 seconds max ---------------------------------------------- 5.41s
    Gathering Facts --------------------------------------------------------- 0.97s
    cron : enable cron service ---------------------------------------------- 0.72s
    cron : Use faketime with cron service ----------------------------------- 0.71s
    cron : command ---------------------------------------------------------- 0.41s
    cron : create directory for cron drop-in file --------------------------- 0.41s
    cron : add cron task ---------------------------------------------------- 0.40s
    cron : command ---------------------------------------------------------- 0.25s
    cron : command ---------------------------------------------------------- 0.25s
    cron : include_vars ----------------------------------------------------- 0.06s

* cron test, simplify: use Environment instead ExecStart

Thanks to mscherer for the suggestion.

* clean up comment: remove reference to outdated path

$OUTPUT_DIR is a plain path which doesn't reference any other
environment variables

* cron test: display elapsed time

* cron test: display some logs in case of failure

* cron test: handle FreeBSD

* cron tests: add checks

(cherry picked from commit 3c8abc0b82)
2019-10-10 08:06:08 -07:00
d0a4f0fdbe [stable-2.9] Add RHEL 8.1b to the Shippable test matrix.
(cherry picked from commit 811127d64d)

Co-authored-by: Matt Clay <matt@mystile.com>
2019-10-09 14:23:48 -07:00
6e0eafa3a7 add ANSIBLE_PLAYBOOK_DIR envvar support (#63220)
* add ANSIBLE_PLAYBOOK_DIR envvar support

* allows `ANSIBLE_PLAYBOOK_DIR` envvar as a fallback on CLI types that support `--playbook-dir`. This should have been implemented with #59464, but was missed due to an oversight.
* added basic integration test

* make first-class PLAYBOOK_DIR config entry

* update changelog

(cherry picked from commit fd229dcbb5)
2019-10-09 10:44:50 -07:00
bcd118c771 Backport/2.9/docs3 (#63251)
* Fixing typo mistake in testbed with section. Deploy template from content library is supported from 67U3

(cherry picked from commit c6c13b5626)

* Typo fix in mssql_db (#63184)
Changed from 'then' to 'than'

(cherry picked from commit b5cc0872e7)

* VMware: Update maintenance notes on vmware_cfg_backup (#62853)
Maintenance mode seems only to be required for load or restet, not for save_configuration. 

(cherry picked from commit e977e0af74)

* Misc typo in nxos_config documentation (#62629)
* Changed 'exit' to 'exist'
* Removed unnecessary word 'first'

(cherry picked from commit 0554b50eed)

* postgresql: add elements for list params to the module's documentation (#63186)

(cherry picked from commit 8a37a2440e)

* mysql: add elements for list params to the modules' documentation (#63187)

(cherry picked from commit 30c2d21f17)

* Add spaces around {{ indicators. (#63125)
The example looked a little less readable by not having spaces after `{{` and before `}}`. This commit should make the examples match [ansible-lint rule 206](https://github.com/ansible/ansible-lint/blob/master/lib/ansiblelint/rules/VariableHasSpacesRule.py)

(cherry picked from commit b7a9d99cef)

* fix typo in collection/plugins/readme (#63162)

(cherry picked from commit da1a945088)

*  Docs: User guide overhaul, part 1 (#63056)

(cherry picked from commit 941a9b68fc)
2019-10-09 09:13:24 -05:00
0ca9624802 Backport/2.9/docs2 (#63250)
* Concise file module example description (#62932)
A file won't be created by the example, the execution would fail unless the file already exists as specified by the module options

(cherry picked from commit 87a6f8397e)

* Added suffix note to process_name_exact parameter (#62849)

(cherry picked from commit 992b81e8fc)

* Fix broken link to powershell resources (#62845)
The previous link (https://docs.microsoft.com/en-us/powershell/dsc/builtinresource ) is a 404 . MS has a new link https://docs.microsoft.com/en-us/powershell/dsc/resources/resources  with the same content

(cherry picked from commit cae4255a16)

* Update playbooks_environment.rst (#62800)

(cherry picked from commit cea8a222a3)

* Update win_dsc.py (#62863)

(cherry picked from commit 798c5a55fa)

* Adjust documentation for yum clean to use best practices (#62898)
The yum module docs suggested using `shell: yum clean all`, which gives an `ansible-lint` error. Plus, you should use the `command` module unless you need more advanced features than just passing in an arbitrary command. Fixes that problem by using the `command` module in the example instead.

(cherry picked from commit 1e6fd6f54d)

* This should never have been "support:network" (#63068)

(cherry picked from commit 7ae46329f2)

* Add docs on hiding sensitive data in loops (#63096)

(cherry picked from commit 0311897722)

* Doc updates to openssl_certificate and ecs_certificate (#63006)
* Update lib/ansible/modules/crypto/entrust/ecs_certificate.py

Co-Authored-By: Felix Fontein <felix@fontein.de>
(cherry picked from commit e55f46f302)

* Update intro_installation.rst (#62994)

(cherry picked from commit f2214951c5)

* Update xml.py (#63128)
Update example to remove escape characters in front of special characters as it is not needed to add explicitly anymore with latest ansible version

(cherry picked from commit 82a6f9d198)
2019-10-08 19:45:25 -05:00
4e5c13e075 Backport/2.9/docs (#63247)
* add more anchors to collections docs (#62827)

(cherry picked from commit 7e01de96d7)

* add anchors to support galaxy links (#62808)

(cherry picked from commit 1b3bf33bdf)

* doc: fix typos (#62852)

(cherry picked from commit b33ae14949)

* Add some documentation about using plugins in collections (#62465)
- FQCN requirements
- Sharing code in collections
- Limitations with inventory caching

(cherry picked from commit d41050b28b)

* Remove Latin phrases from the docs (#62419)
* add styleguide about avoiding use of latin words

(cherry picked from commit e7436e278f)

* ovirt: Fixing typo in ovirt_disk examples (#62962)

(cherry picked from commit 50dc41cca2)

* vmware guidlines: adjust the location of cloud-config-vcenter.ini.template (#62970)

Update the location of the cloud-config-vcenter.ini.template template.
The file has been moved by: 2e7d36a3f9.

(cherry picked from commit 7ecfa4a471)

* Prefer https:// links in the docs site (#62939)

This is a follow-up of last year's 1a11cec. It deals with links which
at that point either were not present or did not support https://.

(cherry picked from commit c8315bfd60)

* fix minor typos (#62950)

(cherry picked from commit ad580a71c4)

* Modernize Vagrant documentation (#62923)
* By requiring a slightly newer Vagrant version (from 2015) we get the
  same generated Ansible inventory format is still used by today's
  version of Vagrant. That extended inventory format also has the
  benefit of allowing for simpler Ansible examples.
* Switching to a current and supported Ubuntu LTS version.

(cherry picked from commit 0d79013f51)

* add ios/iosxr deprecated modules (#62908)

(cherry picked from commit 6bbd9c9eca)
2019-10-08 19:33:58 -05:00
d29802ee46 Updated with slipped dates for the 2.9.0 release (#63243)
(cherry picked from commit 5997d33381)
2019-10-08 14:09:46 -07:00
0ff3bceb22 roadmap should reflect upstream release, not downstream (#61611)
(cherry picked from commit 0e1ec04efb)
2019-10-08 14:09:46 -07:00
6cdd8e5fc2 Add support for automation-hub authentication to ansible-galaxy (#63031)
Adds support for token authentication in Automation Hub. Fixes: ansible/galaxy-dev#96

(cherry picked from commit 239d639fee)
2019-10-08 08:13:38 -07:00
c4446a8f2e [stable-2.9] Fix ansible-test virtualenv real python search.
ansible-test now properly searches for `pythonX.Y` instead of `python` when looking for the real python that created a `virtualenv`.
(cherry picked from commit b91f452f4f)

Co-authored-by: Matt Clay <matt@mystile.com>
2019-10-08 08:11:26 -07:00
d69852c890 [stable-2.9] Install zip for unarchive test when using dnf.
(cherry picked from commit 86ae3cfa12)

Co-authored-by: Matt Clay <matt@mystile.com>
2019-10-08 08:10:53 -07:00
f004deaf91 [stable-2.9] Work around ssh-keygen issue in ansible-test. (#63211)
Newer versions of ssh-keygen create PEM keys that are not recognized by Paramiko.

Now ansible-test compensates for this by updating they keys it generates so Paramiko will recognize them.
(cherry picked from commit 022335669c)

Co-authored-by: Matt Clay <matt@mystile.com>
2019-10-08 07:43:30 -07:00
24e64d1ba1 [stable-2.9] Fix ansible-test integration temp dir location.
Previously the temporary directory used to run integration tests resided under the user's home directory. This prevented ansible-playbook from detecting the default collection when running tests.

Now the temporary directory is created within the collection to facilitate default collection detection.
(cherry picked from commit 4c79f1ec4d)

Co-authored-by: Matt Clay <matt@mystile.com>
2019-10-08 07:11:10 -07:00
52f52504fe Update Ansible release version to v2.9.0rc2.post0. 2019-10-03 18:27:23 -07:00
eac0319e7a New release v2.9.0rc2 2019-10-03 11:35:02 -07:00
e3b61c40bb IOS-XR: Fix iosxr_lag_interfaces intermittent failures (#62998)
* Fix iosxr_lag_interfaces intermittent failures

*  If the dictionary is read out of order from member
   the current logic in `diff_list_of_dicts` returns
   unwanted diff. Hence use `dict_diff` utils
   function instead of sets.

Remove zip() to make existing tests happy

Signed-off-by: NilashishC <nilashishchakraborty8@gmail.com>

* Address review comments

Signed-off-by: NilashishC <nilashishchakraborty8@gmail.com>
(cherry picked from commit 69317a9d3e)

Add changelog for iosxr_lag_interfaces fix
2019-10-03 11:24:27 -07:00
6d5cac5f51 [stable-2.9] Fix nxos_l3_interfaces module and tests (#62545)
* Fix nxos_l3_interfaces module and tests

* Use get_interface_type

* get_interface_type in utils lib

(cherry picked from commit 918f768890)
2019-10-02 17:36:04 -07:00
27ef947b84 Default collection install path to first path in COLLECTIONS_PATHS
(cherry picked from commit 70feb012b3)
2019-10-02 15:01:20 -07:00
42f16219b6 dnf - properly handle idempotent removal of wildcard globs (#63034)
Signed-off-by: Adam Miller <admiller@redhat.com>
2019-10-02 11:41:29 -07:00
66d4d8c494 Fix and reenable hcloud_network_info tests 2019-10-02 10:34:34 -07:00
ce7ebd30e8 [stable-2.9] Limit Shippable matrix check to ansible repo.
(cherry picked from commit ada02f1966)

Co-authored-by: Matt Clay <matt@mystile.com>
2019-10-01 11:53:18 -07:00
32c8de5797 [stable-2.9] Fixes to the rpm dependencies
* Remove duplicate bundled provides line in the rpm spec file
* Remove jmespath and passlib on RHEL7 as these are optional dependencies
  which aren't shipped with RHEL7
(cherry picked from commit 593d639)

Co-authored-by: Toshio Kuratomi <a.badger@gmail.com>
2019-09-30 22:52:03 -07:00
4dda11a770 [stable-2.9] Exclude tmp dir from ansible-test results copy.
This fixes test errors related to failures copying temporary test results files from a remote system back to the local system.

It also speeds up processing of test results and reduces network utilization by avoiding the temporary files.
(cherry picked from commit 3f2380ccce)

Co-authored-by: Matt Clay <matt@mystile.com>
2019-09-30 16:26:00 -07:00
042143177c docker_container: document some of the unexpected behaviors. (#62325) (#62944)
(cherry picked from commit fd627e3b78)
2019-09-30 15:06:12 -04:00
56054beac8 [stable-2.9] find - clarify description of 'contains' (#62445) (#62917)
(cherry picked from commit 2375fd0990)

Co-authored-by: Sam Doran <sdoran@redhat.com>
2019-09-30 15:01:46 -04:00
1902d17744 Improved docs on docker_swarm_service (#62712) (#62889)
* Improved docs on docker_swarm_service

Co-Authored-By: Piotr Wojciechowski <23406016+WojciechowskiPiotr@users.noreply.github.com>

Co-Authored-By: Felix Fontein <felix@fontein.de>
(cherry picked from commit d4064a965b)
2019-09-30 14:58:14 -04:00
2f0f076b71 Fix MSO examples (#62839)
Fix reported issues with the examples.
2019-09-30 14:51:45 -04:00
40c40a9653 Backport/2.9/docs2 (#62805)
* Update pip module docs (#62359)
* Clarifying pip module requirements in reference to #47361
* Further clarifying message with link to ansible_python_interpreter

(cherry picked from commit d3ec5ca80f)

* chore/doc-module: sts_assume_role.py (#62475)
Update `Example` section with with the correct module usage.

(cherry picked from commit a4a216640f)

* Improve dconf documentation to include conversion problems (#62316)

(cherry picked from commit 864928365e)

* Add examples for various inventory setups to the documentation (#62323)
* Updates docs/docsite/rst/user_guide/intro_inventory.rst, closes #12480.
* Use code-block and rename groups in inventory setup examples
* Fix group name in inventory setup example

Co-Authored-By: Sandra McCann <samccann@redhat.com>

(cherry picked from commit 7047b66d34)

* added networking porting guide info (#61999)
* Update docs/docsite/rst/porting_guides/porting_guide_2.9.rst

Co-Authored-By: Nathaniel Case <this.is@nathanielca.se>

(cherry picked from commit 6d35f9026f)

* [docs] split collections into user and dev guide sections (#62363)

(cherry picked from commit 7badeb6df0)

* fixed options (#62605)

(cherry picked from commit 170b4e63ff)

* ec2_vpc_subnet: Rename resource_tags > tags (#62663)

Most of the AWS module documentation refers to `tags` and not
`resource_tags`. This patch updates the documentation to match
other AWS module documentation. 😉

Signed-off-by: Major Hayden <major@redhat.com>
(cherry picked from commit cced1a3cd1)

* [Docs] Document the resource module builder (#62222)

(cherry picked from commit b17581a307)

* Fix link syntax and a typo in dev collections doc (#62650)

(cherry picked from commit 2969614c2c)

* hcloud_volume: clarify volume size units (#62771)

(cherry picked from commit 190b8fcd1c)

* ovirt_host update force doc (#62491)

(cherry picked from commit 3b2b418aad)

* update example document for zabbix_action module (#62667)

(cherry picked from commit 3299f29f7c)
2019-09-30 14:48:15 -04:00
633b089930 package_facts: improve return value documentation (#62725) (#62891)
* Improve documentation for package_facts.
* Add sample return value.

(cherry picked from commit 1520eba0a7)
2019-09-30 14:36:14 -04:00
1dcebfd7d0 fixes option names in examples (#62747)
(cherry picked from commit 00cf6d8e9a)
2019-09-30 14:32:12 -04:00
7ad4f6238c Improve type documentation. (#62178)
(cherry picked from commit fbf182c369)
2019-09-30 10:25:50 -07:00
9efac6864d docker_login: fix Python 3 problem in #60381 (#62621)
* Fix Python 3 problem: run_command() returns native strings, not byte strings.

* Add changelog.

(cherry picked from commit 2e5137078d)
2019-09-30 09:19:22 -07:00
b07ac9cb96 Changelog fragment 2019-09-30 09:18:26 -07:00
008bc53150 kubevirt: also add wait_sleep (#61020)
(cherry picked from commit cf86a5e07a)
2019-09-30 09:18:26 -07:00
988d369305 [stable-2.9] Fix ansible-test PYTHONPATH handling.
Running from an installed version of ansible-test now results in tests using a dedicated directory for PYTHONPATH instead of using the site-packages directory where ansible is installed.

This provides consistency with tests running from source, which already used a dedicated directory.

Resolves https://github.com/ansible/ansible/issues/62716
(cherry picked from commit 831e1bf2e0)

Co-authored-by: Matt Clay <matt@mystile.com>
2019-09-30 09:17:57 -07:00
2a68bc0c29 mongodb_replicaset/test: properly kill the nodes
The `pids` module returns the list of the PID in a `pids` key.

This change ensures we correctly wait for the end of the previous mongod
instances before we start the next ones.

In addition, we remove an unnecessary `ignore_errors`.

See: #61938

Original PR: https://github.com/ansible/ansible/pull/62627
(cherry picked from commit cee55ab718)
2019-09-24 11:28:52 -07:00
fc1d7f9e5a VMware: Remove mentions of enable_vsan from vmware_cluster_ha example (#62616)
* VMware: Remove mentions of enable_vsan from vmware_cluster_ha example
* Add changelog fragment

(cherry picked from commit 0c66e7ef10)
2019-09-20 12:32:12 -07:00
e44c77fe0a Update Ansible release version to v2.9.0rc1.post0. 2019-09-20 12:06:34 -07:00
6c3726f3e1 New release v2.9.0rc1 2019-09-20 09:21:38 -07:00
895d3c1c1e [stable-2.9] k8s: apply no longer the default behaviour (#62632) (#62666)
* [stable-2.9] k8s: apply no longer the default behaviour (#62632)

There are too many lingering uncertainties about the correctness of
apply behaviour. All tests seem to suggest it works, and it's definitely
performed well in real world application, but it may be a breaking
and unexpected change to default to apply

We will let apply bed in during 2.9 and allow people to opt in, we
may default to it in future (or not)
(cherry picked from commit bb0fa0a)

Co-authored-by: Will Thames <will@thames.id.au>
2019-09-20 09:02:41 -07:00
de3e76ad98 Fix test_galaxy failing test (#62624)
(cherry picked from commit 85eba9d860)
2019-09-19 13:37:17 -07:00
b443f980e7 New release v2.9.0rc1 2019-09-19 12:25:26 -07:00
eae2e0d1f4 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
(cherry picked from commit 4cc4c44dd0)
2019-09-19 12:12:48 -07:00
d58d2bc875 [Backport 2.9] vyos: Fix to give no traceback on empty config (#62568)
* vyosnoconfig tracebackfix (#62518)

* vyosnoconfig tracebackfix

Signed-off-by: rohitthakur2590 <rohitthakur2590@outlook.com>

* vyos noconfig tracebackfix test cases added

Signed-off-by: rohitthakur2590 <rohitthakur2590@outlook.com>

* test/integration/targets/vyos_lldp_global/tests/cli/empty_config.yaml

(cherry picked from commit b24f7d2800)

* empty config traceback fix

Signed-off-by: rohitthakur2590 <rohitthakur2590@outlook.com>
2019-09-19 12:03:43 -07:00
6dd81d3c46 nsupdate: Don't mention the Microsoft DNS server (#62330)
Microsoft's DNS server uses GSS-TSIG to secure Dynamic DNS
updates. That is a Kerberos based form of TSIG neither supported by
the Ansible nsupdate module nor the underlying dnspython module.

Related to #57294 and #62238.

(cherry picked from commit 70a33c3140)
2019-09-19 11:30:08 -07:00
7750d30eb4 temporarily disable hcloud_network_info tests
`hcloud_network_info` tests are currently broken in `stable-2.9`.

See: https://github.com/ansible/ansible/issues/62606
2019-09-19 10:11:02 -07:00
2abdb4ee7b Pull request for temp/backport-60947 (#62596)
* Check module names in action plugin without collection attached (#60947)

* Check for eos_config in action plugin by module name, not entire fqmn

* Modify toher action plugins to find module name

* Restore missing `not`

* Cover netconf plugin as well

* Whoops

(cherry picked from commit e89048f68a)

* Add changelog entry

Signed-off-by: Paul Belanger <pabelanger@redhat.com>
2019-09-19 10:04:02 -07:00
50782978c7 Backport/2.9/62571 (#62577)
* modify vmss to support specialized (#62571)

(cherry picked from commit 558ce6575d)

* add changelog

* additional change
2019-09-19 10:02:17 -07:00
227efbc7ae [Backport/2.9/61684]Update ce_ospf to fix bugs (#62597)
* Update ce_ospf to fix bugs

(cherry picked from commit 1583c5ead2)

* Update ce_ospf modified information
2019-09-19 07:39:24 -07:00
3d5367243b [Backport/2.9/62498]update ce_static_route to fix bugs (#62593)
* update ce_static_route to fix bugs

(cherry picked from commit 9a458d658f)

* Update ce_static_route modified information
2019-09-19 07:38:50 -07:00
34609a0973 Fix traceback empty config error to meaningful msg for IOS (#62572)
* Fix traceback empty config error to meaningful msg for IOS (#62538)

* fix empty config msg

* fix space

Signed-off-by: Sumit Jaiswal <sjaiswal@redhat.com>
(cherry picked from commit 35463d45f4)

* changelog
2019-09-19 07:33:26 -07:00
b8e905cd4d Backport/2.9/62559 (#62570)
* snapshot fix for backporting (#62559)

(cherry picked from commit 054519920e)

* changelog fragment
2019-09-19 07:27:34 -07:00
5a99d473d3 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>
(cherry picked from commit a684bb9f5b)
2019-09-18 21:10:06 -07:00
1bb6d3c21a [stable-2.9] Disable setting of -s in shebang
RPM builds on Fedora and RHEL create a python shebang line with -s

This is not good for ansible since ansible has a lot of optional
features which need extra dependencies installed.  If the user installs
those extra dependencies to their home directory or to /usr/local then
the -s will keep them from being used.
(cherry picked from commit bebb11b)

Co-authored-by: Toshio Kuratomi <a.badger@gmail.com>
2019-09-18 20:37:00 -07:00
6aa02a74fe [stable-2.9] cron - Only run get_bin_path() once (#62554)
(cherry picked from commit b7897e3a8d)

Co-authored-by: Sam Doran <sdoran@redhat.com>
2019-09-18 19:05:47 -07:00
b1ba759862 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

(cherry picked from commit 1c64dba3c9)
2019-09-18 19:04:51 -07:00
741b49a247 psexec - Fix kerb and interactive support (#62556)
(cherry picked from commit 064e443ea5)
2019-09-18 19:03:20 -07:00
9bbaa0d688 fix collection jinja2 cache issue (#62543)
* prevents premature lookup (and potential KeyError) of Jinja filter/test function cache that's not fully populated

(cherry picked from commit d0c7b42e58)
2019-09-18 19:02:32 -07:00
3d00ffc154 Add link to become plugins in become docs (#62462)
(cherry picked from commit d16ee65ecd)
2019-09-18 16:02:49 -07:00
7f7acd915a [stable-2.9] 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.
(cherry picked from commit 951a80c8b0)

Co-authored-by: Jean-Frédéric <JeanFred@users.noreply.github.com>
2019-09-18 16:01:55 -07:00
0b7fec8b11 Remove unsed / duplicate imports for iosxr module_utils (#61385)
(cherry picked from commit 5a60bdd308)
Signed-off-by: Paul Belanger <pabelanger@redhat.com>
2019-09-18 15:59:34 -07:00
74d33e5e44 Add hint for config option priority (#62463)
* Add hint for config option priority

* Fix some spelling issues

(cherry picked from commit bf5b6695ec)
2019-09-18 15:59:03 -07:00
cfd6b3d708 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

(cherry picked from commit bad338aca6)
2019-09-18 15:57:47 -07:00
bf5444ddae To fix delete to pass the right parameters wrt to Checkpoint modules (#62540)
* fix delete to pass the right parameters (#62525)


(cherry picked from commit 2232232b45)

* changelog
2019-09-18 13:19:05 -07:00
45f573d2ed PR to fix if equals error code command is not found (#62539)
* fix if equals error code if command not found (#62529)


(cherry picked from commit 55f285a384)

* changelog
2019-09-18 11:37:36 -07:00
26a615a6f8 PR to fix the traceback session uid error (#62527)
* fix session_uid (#62523)


(cherry picked from commit cf8e84fc62)

* changelog
2019-09-18 09:28:54 -07:00
a3ff8e0579 Add fix for specifying current dir in collections_paths (#62478)
(cherry picked from commit 2e1c6a7839)
2019-09-18 09:27:27 -07:00
b300cbf757 Pull request for temp/unused-import-backports (#62472)
* Remove unsed import for eos facts module (#61795)

Signed-off-by: Paul Belanger <pabelanger@redhat.com>
(cherry picked from commit f81b7dd10a)

* Remove unused import for cisco ios facts (#61790)

Signed-off-by: Paul Belanger <pabelanger@redhat.com>
(cherry picked from commit 44eaea9f80)

* Remove unsed import for junos facts (#61787)

This is no longer needed.

Signed-off-by: Paul Belanger <pabelanger@redhat.com>
(cherry picked from commit 7be672e1c2)

* Remove unused import from iosxr facts (#61785)

This is no longer needed and can be removed.

Signed-off-by: Paul Belanger <pabelanger@redhat.com>
(cherry picked from commit c723eb2f04)

* Remove unused import for vyos facts (#61784)

This is no longer needed and can be removed.

Signed-off-by: Paul Belanger <pabelanger@redhat.com>
(cherry picked from commit 736938625b)

* Add changelog entry

Signed-off-by: Paul Belanger <pabelanger@redhat.com>
2019-09-18 09:26:52 -07:00
ef94e3c72a [stable-2.9] Backport default-test-container updates. (#62473)
* Update default test container with Python 3.8b4 (#62100)

* [stable-2.9] test: bump default-test-container

VMware VSphere SDK needs an up to date version of `pip` for the
installation step. With the current image, we face the following error:

```
(...)
02:27 Collecting git+https://github.com/vmware/vsphere-automation-sdk-python.git (from -r /root/ansible/test/lib/ansible_test/_data/requirements/integration.cloud.vcenter.txt (line 2))
02:27   Cloning https://github.com/vmware/vsphere-automation-sdk-python.git to /tmp/pip-req-build-pm27t16b
02:33 Requirement already satisfied: pyvmomi in /usr/local/lib/python3.6/dist-packages (from -r /root/ansible/test/lib/ansible_test/_data/requirements/integration.cloud.vcenter.txt (line 1)) (6.7.1.2018.12)
02:33 Requirement already satisfied: lxml>=4.3.0 in /usr/local/lib/python3.6/dist-packages (from vSphere-Automation-SDK==1.4.0->-r /root/ansible/test/lib/ansible_test/_data/requirements/integration.cloud.vcenter.txt (line 2)) (4.4.0)
02:33 Processing ./\\localhost/tmp/pip-req-build-pm27t16b/lib/vapi-runtime/vapi_runtime-2.12.0-py2.py3-none-any.whl
02:33 Could not install packages due to an EnvironmentError: [Errno 2] No such file or directory: '/root/ansible/\\\\localhost/tmp/pip-req-build-pm27t16b/lib/vapi-runtime/vapi_runtime-2.12.0-py2.py3-none-any.whl'
```

Bump default-test-container to 1.9.3 to get an up to date release of
`pip` (was 19.0.2, is now 19.2.3)..
(cherry picked from commit b68f5b406a)

Co-authored-by: Gonéri Le Bouder <goneri@lebouder.net>

* 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-18 09:12:29 -07:00
82879b03f7 [Backport/2.9/61774]Update ce_stp to fix bugs (#62512)
* Update ce_stp to fix bugs

(cherry picked from commit c62a0b35c7)

* Update ce_stp modified information
2019-09-18 07:31:06 -07:00
c202f39f47 [Backport/2.9/61842]Update ce_snmp_target_host to fix bugs (#62509)
* Update ce_snmp_target_host to fix bugs

(cherry picked from commit 76016f9988)

* update ce_snmp_target_host to fix bugs
2019-09-18 07:30:14 -07:00
f45db211e7 [Backport/2.9/61843]Update ce_snmp_traps to fix bugs (#62507)
* Update ce_snmp_traps to fix bugs

(cherry picked from commit fd11b82272)

* update ce_snmp_traps to fix bugs
2019-09-18 07:28:27 -07:00
2549af3f23 [Backport/2.9/61995]Update ce_vxlan_arp to fix bugs (#62505)
* Update ce_vxlan_arp to fix bugs (#61995)

* Update ce_vxlan_arp to fix bugs

* Update ce_vxlan_arp to fix bugs

(cherry picked from commit 12512f7319)

* update ce_vxlan_arp to fix bugs
2019-09-18 07:27:51 -07:00
a0fb290a87 cloudformation_info - fix KeyError (#62290)
* cloudformation_info - fix KeyError

* changelog

(cherry picked from commit 66e5427ffb)
2019-09-18 07:27:00 -07:00
c0f2a2df2a [Backport/2.9/61996]update ce_vxlan_vap to fix bugs (#62503)
* Update ce_vxlan_vap to fix bugs

(cherry picked from commit 2db73601ba)

* update ce_vxlan_vap to fix bugs
2019-09-18 07:25:16 -07:00
ff9873beaa [stable-2.9] Stabilize nxos initiated copy for nxos_file_copy plugin (#62355)
* Retry spawn connection on failure

* Add debug logs

* Additional debug logs

* Close session before respawn attempt

* More debug info and increase loops

* Remove debug info and reset error dict on reconnect

* Add epdb debuger

* Add epdb debuger

* Add epdb debuger

* Wait before sending password and close pexpect session

* Fix comment typo

* Scrub error logs

* Scrub error logs

* Add more specific initial connect pattern

* Fix shippable errors

* Dont make remote_scp_server_password a hard requirement

* Add saftey check

(cherry picked from commit 97b15e9f0c)
2019-09-18 07:22:46 -07:00
6c3911b304 Fix network_cli exec_command connection init (#62344)
* Fix network_cli exec_command connection init

Fixes https://github.com/ansible/ansible/issues/61596

*  If `exec_command` method is invoked from module side
   on connection object to execute the command on target
   host check if connection is created if not create the
   connection.

* Fix review comment

(cherry picked from commit 74e4993628)
2019-09-18 07:15:50 -07:00
01a01186db [stable-2.9] Remove obsolete MANIFEST.in entries.
(cherry picked from commit 7d40f6d)

Co-authored-by: Matt Clay <matt@mystile.com>
2019-09-18 07:13:11 -07:00
303cc6aca5 [2.9] acme_* modules: bump acme-test-container version (#62448)
* Bump acme-test-container version. (#62381)

(cherry picked from commit d8d3790d6a)

* Add changelog fragment.
2019-09-18 07:11:42 -07:00
28055bbf8f Fix traceback error in IOS and IOSXR when ran with empty config (#62423)
* fix changelog

* Fix traceback error in IOS and IOSXR when ran without config (#62400)

* fixes issue 61321

* complete iosxr

* fix ios_vlans

Signed-off-by: Sumit Jaiswal <sjaiswal@redhat.com>
(cherry picked from commit 7a5a5e7c87)
2019-09-18 07:10:10 -07:00
37c64b3eb3 Pull request for temp/bgp_61761 (#62469)
* Make *_bgp modules collection safe (#61761)

Signed-off-by: NilashishC <nilashishchakraborty8@gmail.com>

* Add changelog entry

Signed-off-by: Paul Belanger <pabelanger@redhat.com>
2019-09-18 07:02:42 -07:00
4e323de7ef Remove bad sanity ignore entry. 2019-09-17 21:16:20 -07:00
5d4bcea149 [stable-2.9] Remove leading space in warning messages (#62002)
ci_complete
(cherry picked from commit ea6e96985a)

Co-authored-by: Sam Doran <sdoran@redhat.com>
2019-09-17 18:14:10 -07:00
0d79d993f7 [stable-2.9] Mark ansible-test cloud credentials as sensitive.
(cherry picked from commit 9f7b124a6f)

Co-authored-by: Matt Clay <matt@mystile.com>
2019-09-17 18:10:32 -07:00
d681c3b0bd Add implicit localhost hostvars note (#61956)
(cherry picked from commit b1afb37ac9)
2019-09-17 16:36:18 -07:00
f81eb42094 fixed build error for docs (#62356)
(cherry picked from commit 7a36606574)
2019-09-17 16:36:18 -07:00
0d56376a4e Fix os_keystone_endpoint endpoint_interface docs (#62283)
The os_keystone_endpoint module has two interface arguments -
'interface' for authentication, and 'endpoint_interface' for the
endpoint being registered. Currently the module documentation only
covers 'interface', when in fact it should cover 'endpoint_interface'
and pick up 'interface' from the standard OpenStack module parameter
documentation.

(cherry picked from commit 448a8c4e5f)
2019-09-17 16:36:18 -07:00
208ca6f4a2 Fix azure_rm_virtualmachinescalesetinstance_info doc error (#62335)
* update azure_rm_virtualmachinescalesetinstance doc to use correct module name in examples

(cherry picked from commit ac56d35e19)
2019-09-17 16:36:18 -07:00
fac9aaf9f1 Update mitogen link (#62247)
(cherry picked from commit 2d19150757)
2019-09-17 16:36:18 -07:00
034eae6332 Updating link for guest_id info (#61988)
(cherry picked from commit c324503f5a)
2019-09-17 16:36:18 -07:00
7e1060c716 Add some details to any_errors_fatal documentation (#62029)
(cherry picked from commit 09f1c286e0)
2019-09-17 16:36:18 -07:00
4881811d66 document suboptions for type:list options too (#62177)
(cherry picked from commit c1773d5d2b)
2019-09-17 16:36:18 -07:00
6f888687af sanity ignores for a collection need to go to tests/sanity/ (#62182)
collections use tests/ not test/ as the folder for tests

(cherry picked from commit 740ec90688)
2019-09-17 16:36:18 -07:00
2c8b706a0c typo: missing-subption-docs → missing-suboption-docs (#62180)
updates the name of the test and all ignore.txt entries

(cherry picked from commit 48a39f5616)
2019-09-17 16:36:18 -07:00
64a2e39c9e fix fact caching plugin name from json to jsonfile (#62198)
(cherry picked from commit dc7a765e57)
2019-09-17 16:36:18 -07:00
1a7e2e02f8 Docs formatting: recursively preprocess suboptions (#61900)
* Simplify code, move option massaging code into own function.
* Process suboptions recursively.

(cherry picked from commit 4393940a41)
2019-09-17 16:36:18 -07:00
c00357aa7d docs: avoid confusing double negation (#62143)
Avoid "no backward incompatible interface" term which uses a double
negation and replaces it with easier "backward compatible interface"
contruct.

(cherry picked from commit 179eb623d7)
2019-09-17 16:36:18 -07:00
afbfd3958e Elaborate on note that docker-priv only works with integration (#62035)
(cherry picked from commit f79d03d292)
2019-09-17 16:36:18 -07:00
4c8fa415b1 test: disable hcloud_floating_ip_info
Temporarily disable `hcloud_floating_ip_info`, this until #62414 is
resolved.

(cherry picked from commit edf15b346f)
2019-09-17 16:33:42 -07:00
cca87ffafb fix typos in network modules (#62320)
* fix typos in network modules
(cherry picked from commit f11429a80d)
2019-09-17 16:32:45 -07:00
ffbda8d153 WIP - Fix ansible-doc bugs and add integration tests. (#62461)
* Add integration tests for ansible-doc.

* Enable tests that now pass

* Cleanup processing of plugin docs

* Mostly separate the steps of processing plugin docs

  1) Acquire source data
  2) Transform and calculate additonal data
  3) Format data for output
  4) Output data

  format_plugin_doc() is still mixing transformation and formatting but
  that should be fixed in a devel-only change

* Raise exceptions in _get_plugin_doc() on errors.

* Remove check to exclude on blacklisted extensions.  We already request
  only .py files

* If there is no DOCUMENTATION entry in the plugin, raise an exception
  from _get_plugin_doc().  Everywhere we use _get_plugin_doc(), this is
  treated as an error

* If there is no ANSIBLE_METADATA raise an exception as well as
  displaying of docs assumes that this has been set.

* If there is neither DOCUMENTATION nor ANSIBLE_METADATA, warn about the
  lack of METADATA and error on the lack of DOCUMENTATION.  Lack of
  DOCUMENTATION is more important so it is what the user should see.

* Add a few special cases for backwards compat.  These should probably
  be made errors in 2.10:
  * no docs but has metadata shows no documentation rather than an error
  * empty plugin file shows no doumentation rather than an error

* Simplify backwards compatibility logic.

(cherry picked from commit 3b86dc3e12)
2019-09-17 16:32:04 -07:00
ffb3e19dc6 [stable-2.9] 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.
(cherry picked from commit 064e8e1ef4)

Co-authored-by: Matt Clay <matt@mystile.com>
2019-09-17 16:32:04 -07:00
997f272c4e hcloud_networ_info: be more resilient is network already exists
We may already have an existing network or subnet. This commit ensures
we don't raise an error in this case.
e.g: https://app.shippable.com/github/ansible/ansible/runs/143559/145/tests

(cherry picked from commit 459677877a)
2019-09-17 15:52:49 -07:00
51b8daa64d Fix ios_lldp_global enable to enabled raised in issue 61554 (#62440)
* fix ios_lldp_global (#62420)


(cherry picked from commit 9addad0f4a)

* changelog
2019-09-17 14:13:25 -07:00
ec841a086c [stable-2.9] Redact sensitive values by default in ansible-test
(cherry picked from commit 0631e057e9)

Co-authored-by: Matt Clay <matt@mystile.com>
2019-09-17 13:18:30 -07:00
0484e87cd4 [stable-2.9] Fix "JSON object must be str, bytes or bytearray, not list" (#62418)
* [stable-2.9] Fix "JSON object must be str, bytes or bytearray, not list" (#62350)
(cherry picked from commit 84d9b3e)

Co-authored-by: Nathaniel Case <ncase@redhat.com>

* Add changelog
2019-09-17 11:29:19 -07:00
b9e8a6a170 gather_facts action plugin: Fix loading network facts modules for smart gathering (#59856)
* fix smart gathering for network_os in gather_facts action plugin

Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>

* Fix detection of network_os for smart gathering

Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>

* Add unittest

Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>

* make pep8 happy

Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>
(cherry picked from commit 5cd3be9129)
2019-09-17 11:28:13 -07:00
d4e577bd6d nxos_telemetry replaced state (#62368)
(cherry picked from commit b0668e17ed)
2019-09-17 07:57:13 -07:00
7a668dab06 Backport PR for Check Point Unit tests for the following module from PR 62338 (#62390)
* Network and address range tests (#62338)

* commit network and address_range

* remove test_cp_mgmt_network from ignore.txt

(cherry picked from commit b4dcd7c835)

* changelog

* fix shippable

Signed-off-by: Sumit Jaiswal <sjaiswal@redhat.com>
2019-09-17 07:56:58 -07:00
99f22c1751 To fix ios_l3_interfaces resource module round trip failure backport for PR 61642 (#62399)
* To fix ios_l3_interfaces resource module round trip failure (#61642)

* fix 61396

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

* add ios_l3_interfaces rtt tests

* remove unnecessary config

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

* change test description

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

* remove rtt and move to new PR

(cherry picked from commit f9fd1f3626)

* fix changelog
2019-09-17 07:42:56 -07:00
bcd63a6c92 Backport PR for Check Point Unit tests for the following module from PR 62214 (#62405)
* Add unit tests for check_point ansible modules (#62214)

* Update test_cp_mgmt_network.py

* 18 tests

(cherry picked from commit 271825cfaf)

* changelog
2019-09-17 07:36:31 -07:00
fed6c0ace6 Backport PR for Check Point Unit tests for the following module from PR 62213 (#62386)
* Add unit tests for check_point ansible modules (#62213)

* Update test_cp_mgmt_network.py

* 17 tests

(cherry picked from commit c7f9c3f27e)

* changelog
2019-09-17 07:13:11 -07:00
a48f8f229e routeros_facts: fix for error when there's more than 10 interfaces (#62346)
* routeros_facts: fix for error when there's more than 10 interfaces (#61376)

* fix: proper regex for preprocessing routeros output

* test: regression test

* test: fix nondeterministic unit test

* changelog
2019-09-17 07:12:40 -07:00
4df7faa213 Backport PR for Check Point Unit tests for the following module from PR 62216 (#62389)
* changelog

* Forth pr 18 tests (#62216)

* Update test_cp_mgmt_network.py

* 18 tests

(cherry picked from commit ebdf78d6e4)

* fix eol

Signed-off-by: Sumit Jaiswal <sjaiswal@redhat.com>
2019-09-17 07:12:06 -07:00
347c10c5ff Backport PR for Check Point Unit tests for the following module from PR 62215 (#62388)
* Third pr 18 tests (#62215)

* Update test_cp_mgmt_network.py

* 18 tests

(cherry picked from commit 3a5c68205c)

* changelog
2019-09-17 07:11:03 -07:00
1148e68049 Backport PR for Check Point Unit tests for the following module from PR 62322 (#62385)
* Commands tests (#62322)

* commands tests

* add space in order to delete it and tun shipable tests again

* delete space in order to run shipable tests again

(cherry picked from commit 47cf4e6565)

* changelog
2019-09-17 07:10:21 -07:00
d009354c74 added file
Signed-off-by: Sumit Jaiswal <sjaiswal@redhat.com>
2019-09-16 22:41:32 -07:00
cc32fc0429 changelog 2019-09-16 22:41:32 -07:00
cfb1f33c79 changelog 2019-09-16 22:41:32 -07:00
e2aaf72d6a unique tests (#62328)
(cherry picked from commit 6bb8861b0e)
2019-09-16 22:41:32 -07:00
e4965be9af fix typos in storage modules (#62333)
(cherry picked from commit f44bfccb56)
2019-09-16 22:40:51 -07:00
e9a16d381d Change enable to enabled for junos_interfaces module (#62321)
Fixes #62319

Change `enable` option to `enabled` in junos_interfaces
and junos_lldp_interfaces
data model to be in sync with other network platform
resource modules added in 2.9 version.

(cherry picked from commit a9a5f4e40d)
2019-09-16 22:38:04 -07:00
54ea1353b3 [stable-2.9] Mark AWS credentials in ansible-test as sensitive.
This avoids displaying the credentials in CI when retrying tests at maximum verbosity.
(cherry picked from commit b73e7721df)

Co-authored-by: Matt Clay <matt@mystile.com>
2019-09-16 22:12:50 -07:00
7f2ba1aaf8 [stable-2.9] 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.
(cherry picked from commit 32d965e)

Co-authored-by: Matt Clay <matt@mystile.com>
2019-09-16 17:20:40 -07:00
34a48dc2ca Re-enable some docker_swarm tests. (#61875)
(cherry picked from commit 098a13dff4)
2019-09-16 17:18:11 -07:00
f4c1378ae5 Update junos_config.py (#62221)
Add the commands alias to match UX of IOS, EOS etc.

(cherry picked from commit 991b865cb6)
2019-09-16 17:13:38 -07:00
3765a08359 Handle cases where normal commit operation throws a prompt (#62132)
Signed-off-by: NilashishC <nilashishchakraborty8@gmail.com>
(cherry picked from commit f1766457a2)

Add changelog for iosxr prompt fix
2019-09-16 17:12:28 -07:00
20fee691e3 [stable-2.9] 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
(cherry picked from commit 7d51cac)

Co-authored-by: Matt Martz <matt@sivel.net>
2019-09-16 16:41:50 -07:00
f7fed1dacc Fix for junos cli_config replace option (#62131)
* Fix for junos cli_config replace option

*  For device that support replace option by loading
   configuration from a file on device `config` option
   is not required and value of `replace` option is the
   path of configuration file on device. This fix allows
   invoking run() function in cli_config if `config` option
   is None and `replace` option is not boolean

*  The command to replace running config on junos device
   is `load override <filename>` and not `load replace <filename>`
   This is fixed in the junos cliconf plugin.

* Add integration test

(cherry picked from commit 200ed25648)
2019-09-16 16:16:05 -07:00
9812e52682 [stable-2.9] VMware: Fix issue with order of changes in vmware_vcenter_statistics (61345) (#62088)
* VMware: Fix issue with order of changes in vmware_vcenter_statistics

* [WIP] VMware: Fix fragile sort order in vmware_vcenter_statistics (#62288)

* vmware_vcenter_statistics: Fix fragile sort order

* vmware_vcenter_statistics: Python 2.6 compatibility

(cherry picked from commit 3e4d5aeee3)
2019-09-16 15:45:35 -07:00
54f23c7ef7 Add proper hostname cleanup for nxos tests (#61810)
(cherry picked from commit c5a4086ed7)
2019-09-16 15:44:10 -07:00
773755de6b Remove choices from gather_network_resources facts and fix negated all, min (#61362)
* remove choices from gather_network_resources facts and allow negating subset without needing to add a new subset specific for negation

Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>

* negated all, min should not return any fact

Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>
(cherry picked from commit c1e02d5c7a)
2019-09-16 15:21:14 -07:00
dc2dd97e7d [stable-2.9] fix nxos_config tests for httpapi (#62082)
* fix nxos_config tests for httpapi

* Remove become parameter

(cherry picked from commit c4894b512d)
2019-09-16 15:06:59 -07:00
424feef990 Call get_capabilities to initiate device connection (#62103)
(cherry picked from commit b03091213d)
2019-09-16 15:00:28 -07:00
5aa859d0d7 [2.9] openssh_keypair: make sure public key has same permissions as private key (#62037)
* 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.

(cherry picked from commit c19cea9b03)

* openssh_keypair file permissions/ownership: add porting guide entry (#62176)

* Add porting guide entry for 2.9.

(cherry picked from commit 0e72cbd451)
2019-09-16 14:44:59 -07:00
8df2541983 Fix bfd cmd order and test issues (#61943)
(cherry picked from commit f582d74f7c)
2019-09-16 14:37:13 -07:00
6377e6c9e8 nxos_lacp_interfaces: fix integration test dependencies (#61947)
* nxos_lacp_interfaces: fix integration test dependencies

* Add conditional mode test to m/d/r tests

(cherry picked from commit 6e72893d78)
2019-09-16 14:35:44 -07:00
0b771869ea nxos_l2_interfaces: fix for integration tests failing to setup layer2 (#61887)
(cherry picked from commit c0f3777fe2)
2019-09-16 14:35:10 -07:00
87c9514565 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.

(cherry picked from commit 9b149917a6)
2019-09-16 14:33:21 -07:00
0666a2987d [stable-2.9] Connect before reading the prompt? (#61797) (#61883)
* [stable-2.9] Connect before reading the prompt? (#61797)
(cherry picked from commit a365e77)

Co-authored-by: Nathaniel Case <ncase@redhat.com>

* Add changelog

* Update changelogs/fragments/61797-netcli-get_prompt.yaml

Co-Authored-By: Toshio Kuratomi <a.badger@gmail.com>
2019-09-16 14:32:45 -07:00
1219d8381f 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.

(cherry picked from commit 1b2fd2cb5f)
2019-09-16 13:57:07 -07:00
15b3bab5b7 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

(cherry picked from commit 606e13919e)
2019-09-16 13:53:58 -07:00
01eef82ed9 hall: remove the module for supporting nonexistent messenger (#62152)
(cherry picked from commit 8b42de29fa)
2019-09-16 13:51:08 -07:00
ea548bbef5 Set no_log to True for junos_user encrypted_password (#62184)
Signed-off-by: NilashishC <nilashishchakraborty8@gmail.com>
(cherry picked from commit 4e6270750a)

Add changelog for junos_user encrypted_password no_log=True

Signed-off-by: NilashishC <nilashishchakraborty8@gmail.com>
2019-09-16 13:50:21 -07:00
e424b1b847 [stable-2.9] 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.
(cherry picked from commit cd4882e)

Co-authored-by: Matt Clay <matt@mystile.com>
2019-09-16 13:44:55 -07:00
c59cf1d148 [stable-2.9] 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.
(cherry picked from commit cdc4926)

Co-authored-by: Matt Clay <matt@mystile.com>
2019-09-16 13:43:12 -07:00
7dff7b916b [stable-2.9] 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
(cherry picked from commit 5be0668)

Co-authored-by: Matt Martz <matt@sivel.net>
2019-09-16 12:39:52 -07:00
9d6282e633 [stable-2.9] 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
(cherry picked from commit 7917d4def7)

Co-authored-by: Nathaniel Case <ncase@redhat.com>
2019-09-16 12:37:40 -07:00
f082d23eec Fix network resource module wording and typographical errors (#61613) (#61779)
(cherry picked from commit 39f35ac5bb)
2019-09-16 13:26:49 -05:00
9b04bf88e4 explicited RouterOS does not support connection: local (#62229)
(cherry picked from commit b8aa87bd06)
2019-09-16 11:03:43 -05:00
0f3011c231 elasticache_info: fix a typo (#62204) (#62254)
(cherry picked from commit a72ea8440a)
2019-09-16 10:34:22 -05:00
a90f23e2fd fix typos in web_infrastructure modules (#62202) (#62255)
(cherry picked from commit 655f771547)
2019-09-16 10:33:39 -05:00
0c39f2e682 fix typos in net_tools_modules (#62201) (#62261)
(cherry picked from commit 6936187bbe)
2019-09-16 10:32:12 -05:00
2467a5a4c1 fix typos in identity modules (#62200) (#62265)
(cherry picked from commit 742eebc92c)
2019-09-16 10:30:25 -05:00
01cc6a82d7 fix typos in commands modules (#62197) (#62269)
(cherry picked from commit 6691527799)
2019-09-16 10:28:05 -05:00
bdbecd298d fix typos in clustering modules (#62196) (#62271)
(cherry picked from commit dee529dc66)
2019-09-16 10:25:49 -05:00
f9b1e256dd Backport of 62336: fix typos in remote_management modules (#62339) 2019-09-16 10:15:41 -05:00
f273a766b3 Allow tower inventory plugin to accept integer inventory_id (#62157)
* Allow tower inventory plugin to accept integer inventory_id

* Use to_native for error messages, fix docs typo
2019-09-16 07:13:09 -07:00
148cdc1268 revert back to contiguous (#62301) (#62305)
(cherry picked from commit f6a51b3f07)
2019-09-13 16:13:08 -05:00
b6335a72f1 fix typos in cloud modules (#62194) (#62274)
* fix typos in cloud modules

* fix typos in cloud modules, fix ci tests

(cherry picked from commit 7e91998049)
2019-09-13 14:10:13 -05:00
3d2157973f Improve documentation on doc fragments (#62219) (#62291)
Add information and examples on how to use additional properties from a doc fragment
Add info about layering properties

(cherry picked from commit 9b348e690c)
(cherry picked from commit 5deb01c84d)
(cherry picked from commit 041c52d629)
2019-09-13 13:40:30 -05:00
6137cddce2 fix typos in modules (#62135) (#62169)
(cherry picked from commit 5eb5f74083)
2019-09-12 15:16:46 -05:00
80c39bd85b Fix typos in database modules and their integration tests (#62125) (#62172)
(cherry picked from commit bcc3620182)
2019-09-12 14:52:54 -05:00
5bcc1b6855 [backport][docs] Backportapalooza docs #2 (#62104)
* docs: Update apt_key.py, add requirements of gpg (#61552)

(cherry picked from commit 5d7d4a93c8)

* Proposals aren't really used much, delete reference from docs (#61800)

(cherry picked from commit 41055b5dc8)

* Update gitlab_hooks docs (#61837)

(cherry picked from commit 223dab99ea)

* Unify ios_logging and eos_logging documentation with accepted options (#61777)

(cherry picked from commit cc9adf7f1a)

* don't set default:None in documentation when there is no default (#61111), otherwise "None" will be rendered as a string on docsite

(cherry picked from commit 1aca1f86b6)

* Update mso_schema_template_deploy.py (#61849), correct module name in examples

(cherry picked from commit 394a05108d)

* Update hashi_vault.py documentation  with kv V2 example (#61221)

(cherry picked from commit 70f501d5c8)
2019-09-12 14:47:25 -05:00
7e3d322b54 Removed absent parameter from state due to risk 2019-09-11 19:13:17 -07:00
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
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
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
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
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
631d07b8d5 fix width (#61619)
(cherry picked from commit 1d40d2b572)
2019-09-11 14:02:29 -07:00
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
d99025fe8e Update playbooks_prompts.rst (#62003)
Fixed typo: "wierd" > "weird"
(cherry picked from commit e3ea89801b)
2019-09-11 14:02:29 -07:00
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
2538bd83f4 Update unit tests requirements/units.txt path (#61656)
(cherry picked from commit 615f9949c0)
2019-09-11 14:02:29 -07:00
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
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
f93068e49b Fix galaxy server reference in the docs (#61823)
(cherry picked from commit 2fbe4ca102)
2019-09-11 14:02:29 -07:00
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
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
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
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
6040b9f399 Docs - Add Meraki to platform option list (#61651)
(cherry picked from commit 54906a68fe)
2019-09-11 14:01:52 -07:00
706558d66b grafana_plugin: update documentation (#60600)
(cherry picked from commit 9c1dc0ea7f)
2019-09-11 14:01:52 -07:00
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
a8a7cc0e58 Fix documentation to reflect CLI usage for collections-path (#60164)
(cherry picked from commit f1180f3d3f)
2019-09-11 14:01:52 -07:00
d80de9d095 Remove unnecessary information (#61657)
(cherry picked from commit 4b9b5d3745)
2019-09-11 14:01:52 -07:00
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
fba6fbb4b9 Fix typesetting of "GitLab" (#61702)
(cherry picked from commit 7dbd6116d8)
2019-09-11 14:01:52 -07:00
cb4479d882 adding a collection local try section (#61626)
(cherry picked from commit bfaa29303b)
2019-09-11 14:01:52 -07:00
73f4acbd9f mysql_info: fix typo (#62067)
(cherry picked from commit e589e22b7e)
2019-09-11 12:33:50 -07:00
b109538a0f postgresql: fix typos in modules (#62065)
(cherry picked from commit 8b24fe1f0a)
2019-09-11 12:33:13 -07:00
886843807f Fix ansible-test coverage --all (#62115)
(cherry picked from commit 6fb1d56fdc)
2019-09-11 12:07:47 -07:00
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
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
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
307c8c6a49 Fix mysql.py logic related to 53326 (#61832)
(cherry picked from commit e4d4e49388)
2019-09-11 10:55:26 -07:00
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
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
427da1d213 win_become - don't dispose logon token until end (#61905)
(cherry picked from commit 6e8d430872)
2019-09-09 15:30:53 -07:00
e628c87b29 allow external collections under the ansible NS (#61908)
* fixes #59988

(cherry picked from commit 7f4328ad12)
2019-09-09 14:04:08 -07:00
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
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
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
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
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
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
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
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
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
93e8f4cef0 Fix failure due to API version check
(cherry picked from commit dfe02d1ff4)
2019-09-09 13:17:36 -07:00
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
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
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
7910f0f152 Update Ansible release version to v2.9.0b1.post0. 2019-09-05 14:44:49 -07:00
b108c59b89 New release v2.9.0b1 2019-09-05 11:46:29 -07:00
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
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
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
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
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
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
3bf9f57f43 ansible-galaxy fix --server option for roles (#61820)
(cherry picked from commit 3a7b77a94c)
2019-09-04 19:55:46 -07:00
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
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
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
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
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
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
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
fa3d52729c Backport/2.9/61691 (#61759)
* Fix Decode Bug in Py3

(cherry picked from commit 87642ac93e)

* Update fortios.py

(cherry picked from commit 416bc3c040)

* 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 7601b7fa0d)

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

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

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

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

* Suggested changes by Qalthos

(cherry picked from commit ae4bde8500)

* Suggested changes by Qalthos

(cherry picked from commit 63bea8e2a6)

* Retriggerting due to shippable failure
2019-09-04 12:04:33 -07:00
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
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
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
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
365acd0daa Correct indentation of the code in the example (#61622) (#61725) 2019-09-03 13:47:28 -05:00
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
53db5020b6 Update Fedora 29 test image
(cherry picked from commit 3d78dad84b)
2019-09-03 09:53:13 -07:00
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
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
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
a1715ee1b2 postgresql modules: explicit defaults for bool params (#61538) (#61679)
(cherry picked from commit a6d9401c88)
2019-09-03 11:38:10 -05:00
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
e9310c1a44 [stable-2.9] Fix ansible-test coverage path handling. (#61528) (#61593)
* [stable-2.9] Fix ansible-test coverage path handling. (#61528)

* Fix ansible-test coverage path handling.
* Split CI unit tests into two groups.
(cherry picked from commit e4e5005640)

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

* Add changelog fragment.
2019-08-30 09:44:21 -07:00
72d93259e7 [stable-2.9] 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.
(cherry picked from commit 4063d58339)

Co-authored-by: Matt Clay <matt@mystile.com>
2019-08-30 07:57:47 -07:00
c6996727ba Skip certain tests on 2016 (#61585)
(cherry picked from commit 3bd69a47ec)
2019-08-30 07:55:11 -07:00
a271cb6136 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

(cherry picked from commit 951dac7691)
2019-08-29 23:33:14 -07:00
391a67401d New release v2.9.0b1 2019-08-29 22:33:55 -07:00
a8023c52d9 Galaxy refactory 2.9 (#61581)
* Refactor galaxy collection API for v3 support (#61510)

* Refactor galaxy collection API for v3 support

* Added unit tests for GalaxyAPI and starting to fix other failures

* finalise tests

* more unit test fixes

(cherry picked from commit a7fd6e99d9)

* Added changelog fragment
2019-08-29 22:31:17 -07:00
d82e61c939 New release v2.9.0b1 2019-08-29 18:55:35 -07:00
7c342183c5 Update changelog url 2019-08-29 14:37:43 -07:00
3694 changed files with 61665 additions and 26669 deletions

View File

@ -0,0 +1,233 @@
trigger:
batch: true
branches:
include:
- devel
- stable-*
pr:
autoCancel: true
branches:
include:
- devel
- stable-*
schedules:
- cron: 0 7 * * *
displayName: Nightly
always: true
branches:
include:
- devel
- stable-*
variables:
- name: checkoutPath
value: ansible
- name: coverageBranches
value: devel
- name: pipelinesCoverage
value: coverage
- name: entryPoint
value: test/utils/shippable/shippable.sh
- name: fetchDepth
value: 500
resources:
containers:
- container: default
image: quay.io/ansible/azure-pipelines-test-container:1.9.0
pool: Standard
stages:
- stage: Sanity
dependsOn: []
jobs:
- template: templates/matrix.yml
parameters:
nameFormat: Test {0}
testFormat: sanity/{0}
targets:
- test: 1
- test: 2
- test: 3
- test: 4
- test: 5
- stage: Units
dependsOn: []
jobs:
- template: templates/matrix.yml
parameters:
nameFormat: Python {0}
testFormat: units/{0}
targets:
- test: 2.6
- test: 2.7
- test: 3.5
- test: 3.6
- test: 3.7
- test: 3.8
groups:
- 1
- 2
- stage: Windows
dependsOn: []
jobs:
- template: templates/matrix.yml
parameters:
nameFormat: Server {0}
testFormat: windows/{0}
targets:
- test: 2012
- test: 2012-R2
- test: 2016
- test: 2019
groups:
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- stage: Network
dependsOn: []
jobs:
- template: templates/matrix.yml
parameters:
nameFormat: Python {0}
testFormat: network/{0}
targets:
- test: ''
- stage: Remote
dependsOn: []
jobs:
- template: templates/matrix.yml
parameters:
targets:
- name: OS X 10.11
test: osx/10.11
- name: RHEL 7.9
test: rhel/7.9
- name: RHEL 8.2
test: rhel/8.2
- name: FreeBSD 11.1
test: freebsd/11.1
- name: FreeBSD 12.0
test: freebsd/12.0
groups:
- 1
- 2
- 3
- 4
- stage: Docker
dependsOn: []
jobs:
- template: templates/matrix.yml
parameters:
testFormat: linux/{0}
targets:
- name: CentOS 6
test: centos6
- name: CentOS 7
test: centos7
- name: CentOS 8
test: centos8
- name: Fedora 30
test: fedora30
- name: Fedora 31
test: fedora31
- name: openSUSE 15 py2
test: opensuse15py2
- name: openSUSE 15 py3
test: opensuse15
- name: Ubuntu 16.04
test: ubuntu1604
- name: Ubuntu 18.04
test: ubuntu1804
groups:
- 1
- 2
- 3
- 4
- stage: AWS
dependsOn: []
jobs:
- template: templates/matrix.yml
parameters:
nameFormat: Python {0}
testFormat: aws/{0}
targets:
- test: 2.7
- test: 3.6
groups:
- 1
- 2
- stage: vCenter
dependsOn: []
jobs:
- template: templates/matrix.yml
parameters:
nameFormat: Python {0}
testFormat: vcenter/{0}/1
targets:
- test: 2.7
- test: 3.6
- stage: CloudStack
dependsOn: []
jobs:
- template: templates/matrix.yml
parameters:
nameFormat: Python {0}
testFormat: cs/{0}/1
targets:
- test: 2.7
- test: 3.6
- stage: Tower
dependsOn: []
jobs:
- template: templates/matrix.yml
parameters:
nameFormat: Python {0}
testFormat: tower/{0}/1
targets:
- test: 2.7
- test: 3.6
- stage: Cloud
dependsOn: []
jobs:
- template: templates/matrix.yml
parameters:
nameFormat: Python {0}
testFormat: cloud/{0}/1
targets:
- test: 2.7
- test: 3.6
- stage: Hetzner
dependsOn: []
jobs:
- template: templates/matrix.yml
parameters:
nameFormat: Python {0}
testFormat: hcloud/{0}/1
targets:
- test: 2.7
- test: 3.6
- stage: Summary
condition: succeededOrFailed()
dependsOn:
- Sanity
- Units
- Windows
- Network
- Remote
- Docker
- AWS
- vCenter
- CloudStack
- Tower
- Cloud
- Hetzner
jobs:
- template: templates/coverage.yml

View File

@ -0,0 +1,20 @@
#!/usr/bin/env bash
# Aggregate code coverage results for later processing.
set -o pipefail -eu
agent_temp_directory="$1"
PATH="${PWD}/bin:${PATH}"
mkdir "${agent_temp_directory}/coverage/"
options=(--venv --venv-system-site-packages --color -v)
ansible-test coverage combine --export "${agent_temp_directory}/coverage/" "${options[@]}"
if ansible-test coverage analyze targets generate --help >/dev/null 2>&1; then
# Only analyze coverage if the installed version of ansible-test supports it.
# Doing so allows this script to work unmodified for multiple Ansible versions.
ansible-test coverage analyze targets generate "${agent_temp_directory}/coverage/coverage-analyze-targets.json" "${options[@]}"
fi

View File

@ -0,0 +1,60 @@
#!/usr/bin/env python
"""
Combine coverage data from multiple jobs, keeping the data only from the most recent attempt from each job.
Coverage artifacts must be named using the format: "Coverage $(System.JobAttempt) {StableUniqueNameForEachJob}"
The recommended coverage artifact name format is: Coverage $(System.JobAttempt) $(System.StageDisplayName) $(System.JobDisplayName)
Keep in mind that Azure Pipelines does not enforce unique job display names (only names).
It is up to pipeline authors to avoid name collisions when deviating from the recommended format.
"""
from __future__ import (absolute_import, division, print_function)
__metaclass__ = type
import os
import re
import shutil
import sys
def main():
"""Main program entry point."""
source_directory = sys.argv[1]
if '/ansible_collections/' in os.getcwd():
output_path = "tests/output"
else:
output_path = "test/results"
destination_directory = os.path.join(output_path, 'coverage')
if not os.path.exists(destination_directory):
os.makedirs(destination_directory)
jobs = {}
count = 0
for name in os.listdir(source_directory):
match = re.search('^Coverage (?P<attempt>[0-9]+) (?P<label>.+)$', name)
label = match.group('label')
attempt = int(match.group('attempt'))
jobs[label] = max(attempt, jobs.get(label, 0))
for label, attempt in jobs.items():
name = 'Coverage {attempt} {label}'.format(label=label, attempt=attempt)
source = os.path.join(source_directory, name)
source_files = os.listdir(source)
for source_file in source_files:
source_path = os.path.join(source, source_file)
destination_path = os.path.join(destination_directory, source_file + '.' + label)
print('"%s" -> "%s"' % (source_path, destination_path))
shutil.copyfile(source_path, destination_path)
count += 1
print('Coverage file count: %d' % count)
print('##vso[task.setVariable variable=coverageFileCount]%d' % count)
print('##vso[task.setVariable variable=outputPath]%s' % output_path)
if __name__ == '__main__':
main()

View File

@ -0,0 +1,24 @@
#!/usr/bin/env bash
# Check the test results and set variables for use in later steps.
set -o pipefail -eu
if [[ "$PWD" =~ /ansible_collections/ ]]; then
output_path="tests/output"
else
output_path="test/results"
fi
echo "##vso[task.setVariable variable=outputPath]${output_path}"
if compgen -G "${output_path}"'/junit/*.xml' > /dev/null; then
echo "##vso[task.setVariable variable=haveTestResults]true"
fi
if compgen -G "${output_path}"'/bot/ansible-test-*' > /dev/null; then
echo "##vso[task.setVariable variable=haveBotResults]true"
fi
if compgen -G "${output_path}"'/coverage/*' > /dev/null; then
echo "##vso[task.setVariable variable=haveCoverageData]true"
fi

View File

@ -0,0 +1,27 @@
#!/usr/bin/env bash
# Upload code coverage reports to codecov.io.
# Multiple coverage files from multiple languages are accepted and aggregated after upload.
# Python coverage, as well as PowerShell and Python stubs can all be uploaded.
set -o pipefail -eu
output_path="$1"
curl --silent --show-error https://ansible-ci-files.s3.us-east-1.amazonaws.com/codecov/codecov.sh > codecov.sh
for file in "${output_path}"/reports/coverage*.xml; do
name="${file}"
name="${name##*/}" # remove path
name="${name##coverage=}" # remove 'coverage=' prefix if present
name="${name%.xml}" # remove '.xml' suffix
bash codecov.sh \
-f "${file}" \
-n "${name}" \
-X coveragepy \
-X gcov \
-X fix \
-X search \
-X xcode \
|| echo "Failed to upload code coverage report to codecov.io: ${file}"
done

View File

@ -0,0 +1,15 @@
#!/usr/bin/env bash
# Generate code coverage reports for uploading to Azure Pipelines and codecov.io.
set -o pipefail -eu
PATH="${PWD}/bin:${PATH}"
if ! ansible-test --help >/dev/null 2>&1; then
# Install the devel version of ansible-test for generating code coverage reports.
# This is only used by Ansible Collections, which are typically tested against multiple Ansible versions (in separate jobs).
# Since a version of ansible-test is required that can work the output from multiple older releases, the devel version is used.
pip install https://github.com/ansible/ansible/archive/devel.tar.gz --disable-pip-version-check
fi
ansible-test coverage xml --stub --venv --venv-system-site-packages --color -v

View File

@ -0,0 +1,34 @@
#!/usr/bin/env bash
# Configure the test environment and run the tests.
set -o pipefail -eu
entry_point="$1"
test="$2"
read -r -a coverage_branches <<< "$3" # space separated list of branches to run code coverage on for scheduled builds
export COMMIT_MESSAGE
export COMPLETE
export COVERAGE
export IS_PULL_REQUEST
if [ "${SYSTEM_PULLREQUEST_TARGETBRANCH:-}" ]; then
IS_PULL_REQUEST=true
COMMIT_MESSAGE=$(git log --format=%B -n 1 HEAD^2)
else
IS_PULL_REQUEST=
COMMIT_MESSAGE=$(git log --format=%B -n 1 HEAD)
fi
COMPLETE=
COVERAGE=
if [ "${BUILD_REASON}" = "Schedule" ]; then
COMPLETE=yes
if printf '%s\n' "${coverage_branches[@]}" | grep -q "^${BUILD_SOURCEBRANCHNAME}$"; then
COVERAGE=yes
fi
fi
"${entry_point}" "${test}" 2>&1 | "$(dirname "$0")/time-command.py"

View File

@ -0,0 +1,25 @@
#!/usr/bin/env python
"""Prepends a relative timestamp to each input line from stdin and writes it to stdout."""
from __future__ import (absolute_import, division, print_function)
__metaclass__ = type
import sys
import time
def main():
"""Main program entry point."""
start = time.time()
sys.stdin.reconfigure(errors='surrogateescape')
sys.stdout.reconfigure(errors='surrogateescape')
for line in sys.stdin:
seconds = time.time() - start
sys.stdout.write('%02d:%02d %s' % (seconds // 60, seconds % 60, line))
sys.stdout.flush()
if __name__ == '__main__':
main()

View File

@ -0,0 +1,39 @@
# This template adds a job for processing code coverage data.
# It will upload results to Azure Pipelines and codecov.io.
# Use it from a job stage that completes after all other jobs have completed.
# This can be done by placing it in a separate summary stage that runs after the test stage(s) have completed.
jobs:
- job: Coverage
displayName: Code Coverage
container: default
workspace:
clean: all
steps:
- checkout: self
fetchDepth: $(fetchDepth)
path: $(checkoutPath)
- task: DownloadPipelineArtifact@2
displayName: Download Coverage Data
inputs:
path: coverage/
patterns: "Coverage */*=coverage.combined"
- bash: .azure-pipelines/scripts/combine-coverage.py coverage/
displayName: Combine Coverage Data
- bash: .azure-pipelines/scripts/report-coverage.sh
displayName: Generate Coverage Report
condition: gt(variables.coverageFileCount, 0)
- task: PublishCodeCoverageResults@1
inputs:
codeCoverageTool: Cobertura
# Azure Pipelines only accepts a single coverage data file.
# That means only Python or PowerShell coverage can be uploaded, but not both.
# Set the "pipelinesCoverage" variable to determine which type is uploaded.
# Use "coverage" for Python and "coverage-powershell" for PowerShell.
summaryFileLocation: "$(outputPath)/reports/$(pipelinesCoverage).xml"
displayName: Publish to Azure Pipelines
condition: gt(variables.coverageFileCount, 0)
- bash: .azure-pipelines/scripts/publish-codecov.sh "$(outputPath)"
displayName: Publish to codecov.io
condition: gt(variables.coverageFileCount, 0)
continueOnError: true

View File

@ -0,0 +1,55 @@
# This template uses the provided targets and optional groups to generate a matrix which is then passed to the test template.
# If this matrix template does not provide the required functionality, consider using the test template directly instead.
parameters:
# A required list of dictionaries, one per test target.
# Each item in the list must contain a "test" or "name" key.
# Both may be provided. If one is omitted, the other will be used.
- name: targets
type: object
# An optional list of values which will be used to multiply the targets list into a matrix.
# Values can be strings or numbers.
- name: groups
type: object
default: []
# An optional format string used to generate the job name.
# - {0} is the name of an item in the targets list.
- name: nameFormat
type: string
default: "{0}"
# An optional format string used to generate the test name.
# - {0} is the name of an item in the targets list.
- name: testFormat
type: string
default: "{0}"
# An optional format string used to add the group to the job name.
# {0} is the formatted name of an item in the targets list.
# {{1}} is the group -- be sure to include the double "{{" and "}}".
- name: nameGroupFormat
type: string
default: "{0} - {{1}}"
# An optional format string used to add the group to the test name.
# {0} is the formatted test of an item in the targets list.
# {{1}} is the group -- be sure to include the double "{{" and "}}".
- name: testGroupFormat
type: string
default: "{0}/{{1}}"
jobs:
- template: test.yml
parameters:
jobs:
- ${{ if eq(length(parameters.groups), 0) }}:
- ${{ each target in parameters.targets }}:
- name: ${{ format(parameters.nameFormat, coalesce(target.name, target.test)) }}
test: ${{ format(parameters.testFormat, coalesce(target.test, target.name)) }}
- ${{ if not(eq(length(parameters.groups), 0)) }}:
- ${{ each group in parameters.groups }}:
- ${{ each target in parameters.targets }}:
- name: ${{ format(format(parameters.nameGroupFormat, parameters.nameFormat), coalesce(target.name, target.test), group) }}
test: ${{ format(format(parameters.testGroupFormat, parameters.testFormat), coalesce(target.test, target.name), group) }}

View File

@ -0,0 +1,45 @@
# This template uses the provided list of jobs to create test one or more test jobs.
# It can be used directly if needed, or through the matrix template.
parameters:
# A required list of dictionaries, one per test job.
# Each item in the list must contain a "job" and "name" key.
- name: jobs
type: object
jobs:
- ${{ each job in parameters.jobs }}:
- job: test_${{ replace(replace(replace(job.test, '/', '_'), '.', '_'), '-', '_') }}
displayName: ${{ job.name }}
container: default
workspace:
clean: all
steps:
- checkout: self
fetchDepth: $(fetchDepth)
path: $(checkoutPath)
- bash: .azure-pipelines/scripts/run-tests.sh "$(entryPoint)" "${{ job.test }}" "$(coverageBranches)"
displayName: Run Tests
- bash: .azure-pipelines/scripts/process-results.sh
condition: succeededOrFailed()
displayName: Process Results
- bash: .azure-pipelines/scripts/aggregate-coverage.sh "$(Agent.TempDirectory)"
condition: eq(variables.haveCoverageData, 'true')
displayName: Aggregate Coverage Data
- task: PublishTestResults@2
condition: eq(variables.haveTestResults, 'true')
inputs:
testResultsFiles: "$(outputPath)/junit/*.xml"
displayName: Publish Test Results
- task: PublishPipelineArtifact@1
condition: eq(variables.haveBotResults, 'true')
displayName: Publish Bot Results
inputs:
targetPath: "$(outputPath)/bot/"
artifactName: "Bot $(System.JobAttempt) $(System.StageDisplayName) $(System.JobDisplayName)"
- task: PublishPipelineArtifact@1
condition: eq(variables.haveCoverageData, 'true')
displayName: Publish Coverage Data
inputs:
targetPath: "$(Agent.TempDirectory)/coverage/"
artifactName: "Coverage $(System.JobAttempt) $(System.StageDisplayName) $(System.JobDisplayName)"

2
.github/BOTMETA.yml vendored
View File

@ -1569,8 +1569,6 @@ files:
notified: mattclay
hacking/report.py:
notified: mattclay
shippable.yml:
notified: mattclay
macros:
module_utils: lib/ansible/module_utils
modules: lib/ansible/modules

View File

@ -2,7 +2,6 @@ include README.rst
include COPYING
include SYMLINK_CACHE.json
include requirements.txt
include shippable.yml
recursive-include docs *
exclude docs/docsite/rst_warnings
recursive-exclude docs/docsite/_build *
@ -20,13 +19,11 @@ recursive-include lib/ansible/config *.yml
recursive-include licenses *.txt
recursive-include packaging *
recursive-include test/ansible_test *.py Makefile
recursive-include test/cache .keep
recursive-include test/integration *
recursive-include test/lib/ansible_test/config *.template
recursive-include test/lib/ansible_test/_data *.cfg *.ini *.json *.ps1 *.psd1 *.py *.sh *.txt *.yml coveragerc inventory
recursive-include test/lib/ansible_test/_data/injector ansible ansible-config ansible-connection ansible-console ansible-doc ansible-galaxy ansible-playbook ansible-pull ansible-test ansible-vault pytest
recursive-include test/lib/ansible_test/_data/sanity/validate-modules validate-modules
recursive-include test/results .keep
recursive-include test/sanity *.json *.py *.txt
exclude test/sanity/code-smell/botmeta.*
recursive-include test/units *

View File

@ -301,7 +301,7 @@ rpm: rpmcommon
--define "_srcrpmdir %{_topdir}" \
--define "_specdir $(RPMSPECDIR)" \
--define "_sourcedir %{_topdir}" \
--define "_rpmfilename $(RPMNVR).%%{ARCH}.rpm" \
--define "_rpmfilename %%{NAME}-%%{VERSION}-%%{RELEASE}.%%{ARCH}.rpm" \
--define "__python `which $(PYTHON)`" \
--define "upstream_version $(VERSION)" \
--define "rpmversion $(RPMVERSION)" \

View File

@ -84,7 +84,7 @@ and has contributions from over 4000 users (and growing). Thanks everyone!
License
=======
GNU General Public License v3.0
GNU General Public License v3.0 or later
See `COPYING <COPYING>`_ to see the full text.
@ -92,8 +92,8 @@ See `COPYING <COPYING>`_ to see the full text.
:target: https://pypi.org/project/ansible
.. |Docs badge| image:: https://img.shields.io/badge/docs-latest-brightgreen.svg
:target: https://docs.ansible.com/ansible/latest/
.. |Build Status| image:: https://api.shippable.com/projects/573f79d02a8192902e20e34b/badge?branch=devel
:target: https://app.shippable.com/projects/573f79d02a8192902e20e34b
.. |Build Status| image:: https://dev.azure.com/ansible/ansible/_apis/build/status/CI?branchName=stable-2.9
:target: https://dev.azure.com/ansible/ansible/_build/latest?definitionId=20&branchName=stable-2.9
.. |Chat badge| image:: https://img.shields.io/badge/chat-IRC-brightgreen.svg
:target: https://docs.ansible.com/ansible/latest/community/communication.html
.. |Code Of Conduct| image:: https://img.shields.io/badge/code%20of%20conduct-Ansible-silver.svg

2174
changelogs/.changes.yaml Normal file

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -7,7 +7,9 @@ new_plugins_after_name: removed_features
sections:
- ['major_changes', 'Major Changes']
- ['minor_changes', 'Minor Changes']
- ['breaking_changes', 'Breaking Changes / Porting Guide']
- ['deprecated_features', 'Deprecated Features']
- ['removed_features', 'Removed Features (previously deprecated)']
- ['security_fixes', 'Security Fixes']
- ['bugfixes', 'Bugfixes']
- ['known_issues', 'Known Issues']

View File

@ -0,0 +1,2 @@
bugfixes:
- postgresql_pg_hba - fix a crash when a new rule with an 'options' field replaces a rule without or vice versa (https://github.com/ansible-collections/community.general/issues/1108).

View File

@ -0,0 +1,2 @@
bugfixes:
- "puppet - fix command line construction for check mode and ``manifest:`` (https://github.com/ansible/ansible/issues/60576)."

View File

@ -0,0 +1,2 @@
security_fixes:
- kubectl - connection plugin now redact kubectl_token and kubectl_password in console log (https://github.com/ansible-collections/community.kubernetes/issues/65) (CVE-2020-1753).

View File

@ -0,0 +1,3 @@
bugfixes:
- azure_rm inventory plugin - update to fetch availability zone information of VM in hostvars.
(https://github.com/ansible-collections/azure/issues/161)

View File

@ -0,0 +1,2 @@
bugfixes:
- display correct error information when an error exists in the last line of the file (https://github.com/ansible/ansible/issues/16456)

View File

@ -0,0 +1,2 @@
bugfixes:
- postgres_user - remove false positive ``no_log`` warning for ``no_password_changes`` option (https://github.com/ansible/ansible/issues/68106).

View File

@ -0,0 +1,2 @@
bugfixes:
- ec2_group - Fixes error handling during tagging failures (https://github.com/ansible-collections/amazon.aws/issues/210).

View File

@ -0,0 +1,2 @@
bugfixes:
- mysql_user - fix the error No database selected (https://github.com/ansible/ansible/issues/68070).

View File

@ -0,0 +1,4 @@
bugfixes:
- >
pause - Fix indefinite hang when using a pause task on a background
process (https://github.com/ansible/ansible/issues/32142)

View File

@ -0,0 +1,2 @@
minor_changes:
- debconf - add a note about no_log=True since module might expose sensitive information to logs (https://github.com/ansible/ansible/issues/32386).

View File

@ -0,0 +1,3 @@
---
bugfixes:
- To fix ios_vlans vtp version 2 issue (https://github.com/ansible-collections/cisco.ios/pull/38)

View File

@ -0,0 +1,2 @@
bugfixes:
- facts - account for Slackware OS with ``+`` in the name (https://github.com/ansible/ansible/issues/38760)

View File

@ -0,0 +1,2 @@
bugfixes:
- docker_machine - fallback to ip subcommand output if IPAddress is missing (https://github.com/ansible-collections/community.general/issues/412).

View File

@ -0,0 +1,2 @@
minor_changes:
- vmware_guest_custom_attributes - Fixed issue when trying to set a VM custom attribute when there are custom attributes with the same name for other object types (https://github.com/ansible-collections/community.vmware/issues/412).

View File

@ -0,0 +1,2 @@
bugfixes:
- postgresql_set - return a message instead of traceback when a passed parameter has not been found (https://github.com/ansible-collections/community.postgresql/issues/41).

View File

@ -0,0 +1,3 @@
bugfixes:
- postgresql_ping - fix crash caused by wrong PgSQL version parsing (https://github.com/ansible-collections/community.postgresql/issues/40).
- postgresql_info - fix crash caused by wrong PgSQL version parsing (https://github.com/ansible-collections/community.postgresql/issues/40).

View File

@ -0,0 +1,3 @@
---
bugfixes:
- To fix ios_l3_interfaces Loopback issue (https://github.com/ansible-collections/cisco.ios/pull/45)

View File

@ -0,0 +1,2 @@
bugfixes:
- postgresql_query - fix decimal handling (https://github.com/ansible-collections/community.postgresql/issues/45).

View File

@ -0,0 +1,3 @@
---
bugfixes:
- copy - Fixed copy module not working in case that remote_src is enabled and dest ends in a / (https://github.com/ansible/ansible/pull/47238)

View File

@ -0,0 +1,2 @@
security_fixes:
- aws_secret - flag the ``secret`` parameter as containing sensitive data which shouldn't be logged (https://github.com/ansible-collections/community.aws/pull/471) (CVE-2021-3447).

View File

@ -0,0 +1,2 @@
bugfixes:
- postgresql_query - fix datetime.timedelta type handling (https://github.com/ansible-collections/community.postgresql/issues/47).

View File

@ -0,0 +1,4 @@
---
bugfixes:
- apt - Fixed the issue the cache being updated while auto-installing its
dependencies even when ``update_cache`` is set to false.

View File

@ -0,0 +1,2 @@
bugfixes:
- "jenkins_job module: xml config encoding bugfix on python3"

View File

@ -0,0 +1,2 @@
bugfixes:
- Provide more information in AnsibleUndefinedVariable (https://github.com/ansible/ansible/issues/55152)

View File

@ -0,0 +1,2 @@
bugfixes:
- "Working implementation for editing Cisco IOS macros(https://github.com/ansible/ansible/pull/55220)"

View File

@ -0,0 +1,3 @@
---
bugfixes:
- hashi_vault - Handle equal sign in key=value (https://github.com/ansible/ansible/issues/55658).

View File

@ -0,0 +1,2 @@
bugfixes:
- rabbitmq_publish - Fix to ensure the module works correctly for pika v1.0.0 and later. (https://github.com/ansible/ansible/pull/61960)

View File

@ -0,0 +1,6 @@
bugfixes:
- synchronize - fix password authentication on Python 2 (https://github.com/ansible/ansible/issues/56629)
- >
AnsibleModule.run_command() - set ``close_fds`` to ``False`` on Python 2 if ``pass_fds`` are passed to
``run_command()``. Since ``subprocess.Popen()`` on Python 2 does not have the ``pass_fds`` option,
there is no way to exclude a specific list of file descriptors from being closed.

View File

@ -0,0 +1,2 @@
bugfixes:
- yum - fix yum list crashing if repoquery (used internally) prints errors in stdout (https://github.com/ansible/ansible/issues/56800)

View File

@ -0,0 +1,2 @@
bugfixes:
- Remove the unnecessary warning about aptitude not being installed (https://github.com/ansible/ansible/issues/56832).

View File

@ -0,0 +1,2 @@
bugfixes:
- vmware - Ensure we can use the modules with Python < 2.7.9 or RHEL/CentOS < 7.4, this as soon as ``validate_certs`` is disabled.

View File

@ -1,8 +1,8 @@
bugfixes:
- ce_dldp - tag named data of a xpath is unnecessay for old sotfware version to find a element from xml tree, but element can not be found with 'data' tag for new version, so remove.
- ce_dldp_interface - tag named data of a xpath is unnecessay for old sotfware version to find a element from xml tree, but element can not be found with 'data' tag for new version, so remove.
- ce_dldp - tag named data of a xpath is unnecessary for old software version to find a element from xml tree, but element can not be found with 'data' tag for new version, so remove.
- ce_dldp_interface - tag named data of a xpath is unnecessary for old software version to find a element from xml tree, but element can not be found with 'data' tag for new version, so remove.
- ce_vxlan_arp - override 'get_config' to show specific configuration.
- ce_vxlan_gateway - override 'get_config' to show specific configuration.
- ce_vxlan_global - Netwrok_cli and netconf should be not mixed together, otherwise something bad will happen. Function get_nc_config uses netconf and load_config uses network_cli.
- ce_vxlan_tunnel - Netwrok_cli and netconf should be not mixed together, otherwise something bad will happen. Function get_nc_config uses netconf and load_config uses network_cli.
- ce_vxlan_vap - tag named data of a xpath is unnecessay for old sotfware version to find a element from xml tree, but element can not be found with 'data' tag for new version, so remove.
- ce_vxlan_global - Network_cli and netconf should be not mixed together, otherwise something bad will happen. Function get_nc_config uses netconf and load_config uses network_cli.
- ce_vxlan_tunnel - Network_cli and netconf should be not mixed together, otherwise something bad will happen. Function get_nc_config uses netconf and load_config uses network_cli.
- ce_vxlan_vap - tag named data of a xpath is unnecessary for old software version to find a element from xml tree, but element can not be found with 'data' tag for new version, so remove.

View File

@ -1,2 +1,2 @@
bugfixes:
- Remove lingering ansible vault cipher (AES) after it beeing removed in #44320
- Remove lingering ansible vault cipher (AES) after it was removed in #44320

View File

@ -1,5 +1,5 @@
bugfixes:
- Fixed ce_bgp,first the pattern to be searched is need to change, otherwise there is no data to be found.then after running a task with this module,it will not show 'changed' correctly.
- Fixed ce_bgp_af,'changed' of module run restult is not showed, however the module run correctly,and update coommands of result is not correct.
- Fixed ce_bgp_af,'changed' of module run result is not showed, however the module runs correctly,and updates commands if result is not correct.
- Fixed ce_bgp_neighbor, find specify bgp as information, as number is necessary and so on.
- Fixed ce_bgp_neighbor_af,update commands should be showed correctly, and xml for filter and edit are also re-factor as the software version upgrade and update.

View File

@ -0,0 +1,3 @@
---
bugfixes:
- Support check mode in NXOS BGP modules (https://github.com/ansible/ansible/pull/57360).

View File

@ -0,0 +1,5 @@
bugfixes:
- Strategy - When building the task in the Strategy from the Worker,
ensure it is properly marked as finalized and squashed. Addresses an
issue with ``ansible_failed_task``.
(https://github.com/ansible/ansible/issues/57399)

View File

@ -0,0 +1,2 @@
bugfixes:
- vmware_vcenter_statistics - Fix some corner cases like increasing some interval and decreasing another at the same time.

View File

@ -0,0 +1,2 @@
bugfixes:
- ec2_asg - regression bug, when an existing autoscaling group was updated and but the launch config of existing instances was deleted.

View File

@ -0,0 +1,2 @@
bugfixes:
- win_acl - Fixed error when setting rights on directory for which inheritance from parent directory has been disabled.

View File

@ -0,0 +1,2 @@
bugfixes:
- nmcli - typecast parameters to string as required (https://github.com/ansible/ansible/issues/59095).

View File

@ -0,0 +1,2 @@
bugfixes:
- copy - recursive copy with ``remote_src=yes`` now recurses beyond first level. (Fixes https://github.com/ansible/ansible/issues/58284)

View File

@ -0,0 +1,2 @@
bugfixes:
- "win_find - Get-FileStat used [int] instead of [int64] for file size calculations"

View File

@ -0,0 +1,3 @@
---
bugfixes:
- terraform - adding support for absolute paths additionally to the relative path within project_path (https://github.com/ansible/ansible/issues/58578)

View File

@ -0,0 +1,2 @@
bugfixes:
- junos_user - fixed issue with adding multiple values for a Junos account with aggregate mode

View File

@ -0,0 +1,2 @@
bugfixes:
- Fix for performance regression in handler invocation (https://github.com/ansible/ansible/issues/59017)

View File

@ -3,6 +3,6 @@ minor_changes:
- zabbix_template - new parameter `dump_format` allows user to specify in which format (JSON or XML) should a template be exported from Zabbix
- zabbix_template - it is no longer accepted to provide parameters `template_name` and `template_groups` when using `template_json`
- zabbix_template - parameters `template_name`, `template_json` and `template_xml` are now mutually exclusive
- zabbix_template - parameter `template_groups` is now required when passing `template_name` and template is being created for the fisrt time. Not required when template is being updated.
- zabbix_template - parameter `template_groups` is now required when passing `template_name` and template is being created for the first time. Not required when template is being updated.
- zabbix_template - now allows import of multiple templates at once when using `template_json` or `template_xml` parameters
- zabbix_template - template can now be updated with just a `clear_templates` parameter without requiring any additional parameters to be passed (see examples of the module)

View File

@ -0,0 +1,2 @@
bugfixes:
- profile_tasks - typecast result before slicing it (https://github.com/ansible/ansible/issues/59059).

View File

@ -0,0 +1,2 @@
bugfixes:
- "ovirt - add suport for search with space"

View File

@ -0,0 +1,2 @@
bugfixes:
- Use hostnamectl command to get current hostname for host while using systemd strategy (https://github.com/ansible/ansible/issues/59438).

View File

@ -0,0 +1,2 @@
bugfixes:
- CLI - the `ANSIBLE_PLAYBOOK_DIR` envvar or `playbook_dir` config can now substitute for the --playbook-dir arg on CLIs that support it (https://github.com/ansible/ansible/issues/59464)

View File

@ -0,0 +1,2 @@
bugfixes:
- pulp_repo - the ``client_cert`` and ``client_key`` options were used for both requests to the Pulp instance and for the repo to sync with, resulting in errors when they were used. Use the new options ``feed_client_cert`` and ``feed_client_key`` for client certificates that should only be used for repo synchronisation, and not for communication with the Pulp instance. (https://github.com/ansible/ansible/issues/59513)

View File

@ -0,0 +1,2 @@
bugfixes:
- cron and cronvar - use get_bin_path utility to locate the default crontab executable instead of the hardcoded /usr/bin/crontab. (https://github.com/ansible/ansible/pull/59765)

View File

@ -0,0 +1,5 @@
bugfixes:
- >
group - The group module was not correctly detecting whether a local
group is existing or not with local set to yes if the same group
exists in a non local group repository e.g. LDAP. (https://github.com/ansible/ansible/issues/58619)

View File

@ -1,3 +1,3 @@
minor_changes:
- Add ability to force a protection group snapshot to immeadiatley replicate to a remote array (if configured)
- Add ability to force a protection group snapshot to immediately replicate to a remote array (if configured)
- Add support for `check_mode`

View File

@ -0,0 +1,2 @@
bugfixes:
- decouple k8s_scale from the k8s module utils so that it doesn't complain about missing arguments

View File

@ -0,0 +1,3 @@
---
bugfixes:
- To fix ios_l2_interfaces facts parsing issue (https://github.com/ansible-collections/cisco.ios/pull/59)

View File

@ -0,0 +1,2 @@
bugfixes:
- Fix Python3 compatibility for vmware_export_ovf module.

View File

@ -0,0 +1,3 @@
bugfixes:
- Fix deprecation warning on GitLab modules
- Fix requirements on non required module parameters

View File

@ -0,0 +1,3 @@
---
bugfixes:
- route53 - improve handling of octal encoded characters

View File

@ -0,0 +1,2 @@
bugfixes:
- k8s - ensure that apply works with check mode. Bumps minimum openshift version for apply to 0.9.2.

View File

@ -0,0 +1,2 @@
bugfixes:
- aws_acm_info - fix `KeyError` failure when retrieving keys with a `Failed` status (https://github.com/ansible-collections/community.aws/issues/198)

View File

@ -0,0 +1,2 @@
bugfixes:
- plugins-netconf-ce - to get attribute 'set-id' from rpc-reply.

View File

@ -0,0 +1,2 @@
bugfixes:
- ce_bgp - update to fix some bugs - When the vrf_name parameter is in the module and the configuration is repeatedly sent to the device, the module displays change = True. (https://github.com/ansible/ansible/pull/60573)

View File

@ -0,0 +1,2 @@
bugfixes:
- ce_bgp_neighbor - update to fix some bugs - Add some update statements. (https://github.com/ansible/ansible/pull/60934)

View File

@ -0,0 +1,2 @@
bugfixes:
- mysql_user - fix overriding password to the same (https://github.com/ansible-collections/community.general/issues/543).

View File

@ -0,0 +1,2 @@
bugfixes:
- ce_bgp_neighbor_af - update to fix some bugs - Add some update statements. (https://github.com/ansible/ansible/pull/60937)

View File

@ -0,0 +1,3 @@
---
bugfixes:
- Check action plugin names for network (eos, ios, iosxr, junos, netconf, nxos) modules properly load with collections.

View File

@ -0,0 +1,2 @@
bugfixes:
- "docker_compose - fix issue where docker deprecation warning results in ansible erroneously reporting a failure"

View File

@ -0,0 +1,2 @@
bugfixes:
- ce_evpn_global - update to fix some bugs - Modify the configured query statement and replace get_config with exec_command. (https://github.com/ansible/ansible/pull/61013)

View File

@ -0,0 +1,2 @@
bugfixes:
- lxd_container - enables to set keys not present in existing config

View File

@ -0,0 +1,2 @@
bugfixes:
- ce_evpn_bgp - update to fix some bugs - Modify the configured query statement and replace get_config with exec_command. (https://github.com/ansible/ansible/pull/61136)

View File

@ -0,0 +1,2 @@
bugfixes:
- ce_evpn_bgp_rr - update to fix some bugs - Modify the configured query statement and replace get_config with exec_command. (https://github.com/ansible/ansible/pull/61168)

View File

@ -0,0 +1,3 @@
bugfixes:
- To rename CheckPoint to Check_Point due to CP legal reasons.
(https://github.com/ansible/ansible/pull/61172).

View File

@ -0,0 +1,2 @@
bugfixes:
- ce_info_center_global- update to fix some bugs - Add some update statements. (https://github.com/ansible/ansible/pull/61283)

View File

@ -0,0 +1,3 @@
---
bugfixes:
- tower inventory plugin - fix TypeError when giving inventory_id as integer (https://github.com/ansible/ansible/issues/61333)

View File

@ -0,0 +1,2 @@
bugfixes:
- ce_interface_ospf- update to fix some bugs - Add some update statements. (https://github.com/ansible/ansible/pull/61431)

View File

@ -0,0 +1,2 @@
bugfixes:
- ce_mtu- update to fix some bugs - Contrast before and after adding configuration. (https://github.com/ansible/ansible/pull/61442)

View File

@ -0,0 +1,2 @@
bugfixes:
- "fixed issues when using net_get & net_put before the persistent connection has been started"

View File

@ -0,0 +1,4 @@
bugfixes:
- ansible-inventory - Properly hide arguments that should not be shown
(https://github.com/ansible/ansible/issues/61604)
- ansible-inventory - Restore functionality to allow ``--graph`` to be limited by a host pattern

View File

@ -0,0 +1,2 @@
bugfixes:
- ansible-galaxy - Fix url building to not truncate the URL (https://github.com/ansible/ansible/issues/61624)

View File

@ -0,0 +1,3 @@
---
bugfixes:
- "To fix ios_l3_interfaces resource module round trip failure(https://github.com/ansible/ansible/pull/61642)"

View File

@ -0,0 +1,2 @@
bugfixes:
- ce_netstream_export- update to fix some bugs - Modify the configured query statement and replace get_config with exec_command. (https://github.com/ansible/ansible/pull/61652)

Some files were not shown because too many files have changed in this diff Show More