Commit Graph

1953 Commits (4d675b6d876219780f234360b02ddee1ef3a0df1)

Author SHA1 Message Date
Matt Davis 6832d8bf6a New release v2.9.3 5 years ago
Matt Clay a951e007df [stable-2.9] Ignore warnings in ansible-test environment check.
(cherry picked from commit 3db1ac4f56)

Co-authored-by: Matt Clay <matt@mystile.com>
5 years ago
Matt Clay 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>
5 years ago
Rémi REY d97a9a75bd Fix callback set_options issue with collections (#66128)
Fixes: #66127
(cherry picked from commit 7888eafb82)
5 years ago
Ganesh Nalawade 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)
5 years ago
Ganesh Nalawade 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)
5 years ago
Trishna Guha 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>
5 years ago
Mike Wiebe 247c73432e Fix nxos_user roles bug (#65962)
(cherry picked from commit c2fed8603c)

Add changelog for nxos_user roles fix
5 years ago
Chris Van Heuveln 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>
5 years ago
Nilashish Chakraborty 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>
5 years ago
Nilashish Chakraborty 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>
5 years ago
Nilashish Chakraborty 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>
5 years ago
Nilashish Chakraborty 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>
5 years ago
Nilashish Chakraborty 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>
5 years ago
GomathiselviS 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
5 years ago
Andrew Klychkov 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)
5 years ago
Ganesh Nalawade 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)
5 years ago
Andrew Klychkov a45659652d postgresql_schema: use query_params with cursor object (#65679) 5 years ago
Martin Nečas 508ebf295b backport of ovirt_vm template clone check (#65702)
* backport of ovirt_vm template clone check

* update change log

* update change log 2
5 years ago
Lénaïc Huard 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)
5 years ago
Martin Nečas 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
5 years ago
DaveD 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)
5 years ago
Egor Zaitsev 95b7bc15a0 routeros_command – add support for dot in username (#66293)
* routeros_command – add support for dot in username (#65905)

* chore: changelog
5 years ago
Adam Miller 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>
5 years ago
Jill R 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
5 years ago
Mads Jensen e842c9a151 Use a context manager in docker.ImageManager. (#65609)
Co-Authored-By: Felix Fontein <felix@fontein.de>
(cherry picked from commit 965474841f)
5 years ago
Christophe Drevet-Droguet 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)
5 years ago
Adam 06044aa3b8 #58578 support absolute paths additionally (#58812)
* support absolute paths additionally

* add changelog

* rename changelog

* fix changelog to bugfix

(cherry picked from commit e711d01ed1)
5 years ago
Matt Martz 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>
5 years ago
Sam Doran 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>
5 years ago
Marc Hörsken 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>
5 years ago
Jordan Borean 44a5b20c67 ansible-galaxy - expand User-Agent string for Galaxy endpoints (#65578)
(cherry picked from commit eaba5572cd)
5 years ago
Jordan Borean 57b09d0684 win_uri win_get_url - Fix up redirection defaults (#65584)
(cherry picked from commit 9a81f5c3b7)
5 years ago
Jordan Borean e577e8f30b display - Fix up tracebacks on 3rd party loggers when log path is set (#65582)
(cherry picked from commit b782227642)
5 years ago
Jordan Borean 66f089de4b ansible-galaxy ignore empty server_list (#65986)
* ansible-galaxy ignore empty server_list

(cherry picked from commit aba8f12495)
5 years ago
Jordan Borean ab441a2784 Make sure warnings are printed during fact gathering (#66258)
(cherry picked from commit d3427bb860)
5 years ago
Felix Fontein 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>
5 years ago
Jill R 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>
5 years ago
Felix Fontein 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)
5 years ago
Ganesh Nalawade 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)
5 years ago
Ganesh Nalawade 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
5 years ago
Nilashish Chakraborty 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>
5 years ago
Andrew Klychkov 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
5 years ago
Felix Fontein 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)
5 years ago
Andrew Klychkov d706059006 Backport of 65787 - postgresql_sequence: use query parameters with cursor object 5 years ago
Andrew Klychkov 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>
5 years ago
John Chen 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>
5 years ago
Abhijeet Kasurde 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>
5 years ago
parmsib 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)
5 years ago
Matt Davis b148d06bda Update 64902-fix-allow-duplicates-in-single-role.yml 5 years ago
Kiyo Nagamine 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)
5 years ago
Felix Fontein 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)
5 years ago
Marcel 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)
5 years ago
Felix Fontein 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)
5 years ago
Guillaume Martinez 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
5 years ago
Ian Wienand 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)
5 years ago
Sam Doran 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>
5 years ago
Sam Doran 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>
5 years ago
Hannes Ljungberg 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)
5 years ago
Ganesh Nalawade 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
5 years ago
Abhijeet Kasurde 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)
5 years ago
Adam Miller 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>
5 years ago
Matt Clay 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>
5 years ago
Dusan Matejka 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
5 years ago
Matt Clay 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>
5 years ago
Matt Davis f2285203dc New release v2.9.2 5 years ago
Nilashish Chakraborty 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>
5 years ago
Andrey Klychkov 6012f1ef67 Backport of 65310: postgresql_owner: use query_params with cursor (#65322) 5 years ago
chkp-orso 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
5 years ago
Felix Fontein 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)
5 years ago
Matt Martz 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
5 years ago
Will Thames 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
5 years ago
Andrey Klychkov 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
5 years ago
tcraxs 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)
5 years ago
Jordan Borean 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)
5 years ago
Abhijeet Kasurde 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)
5 years ago
Andrey Klychkov 4b9644c00b Backport of 64661, postgres.py: add query_params (#65034) 5 years ago
Andrey Klychkov 7b18723858 Fix postgres_user not commiting changes when groups is set (#64835) 5 years ago
Dusan Matejka 9e023a91a6 zabbix_action module no longer requires event_source and esc_period arguments when state is absent (#64736)
(cherry picked from commit d8e014980f)
5 years ago
Abhijeet Kasurde 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)
5 years ago
Jordan Borean 1c2f36d4d9 ansible-galaxy - Add User-Agent to requests (#65438) (#65441)
(cherry picked from commit 8648003c1f)
5 years ago
Felix Fontein b133384895 openssh_keypair: fix idempotence issue (#65017) (#65128)
* Fix idempotence issue.

* Add changelog.

(cherry picked from commit b36f572256)
5 years ago
Felix Fontein 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)
5 years ago
Jordan Borean 03b5a6f5d6 galaxy - print HTTP reason on unknown error (#65273) (#65439)
(cherry picked from commit 6586b7132c)
5 years ago
Jordan Borean 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)
5 years ago
Felix Fontein 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)
5 years ago
Felix Fontein 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)
5 years ago
Abhijeet Kasurde 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)
5 years ago
Satyajit Bulage 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)
5 years ago
Xu Yuandong 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)
5 years ago
Felix Fontein a4e055e0cd docker_container and docker_network: avoid None errors (#65018) (#65235)
* Avoid None errors.

* Add changelog.

(cherry picked from commit 63b94fca7e)
5 years ago
Felix Fontein 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)
5 years ago
Felix Fontein 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)
5 years ago
Ganesh Nalawade 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)
5 years ago
Jordan Borean 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)
5 years ago
Jie (Link) Zheng 0cec26f4eb Fix py2/py3 compability issue for httpapi plugin fortios (#64982) (#65091)
(cherry picked from commit bc479fcafc)
5 years ago
Matt Clay 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>
5 years ago
Abhijeet Kasurde 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)
5 years ago
Jordan Borean 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)
5 years ago
Martin Krizek 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)
5 years ago
Jordan Borean 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)
5 years ago
Jordan Borean 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)
5 years ago
Jordan Borean 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)
5 years ago
Michael Shen 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
5 years ago
Xu Yuandong 04d32c503f Backport/2.9/64351 Doc notes 6 (#64351) (#64949)
* Doc notes 6 cloudengine (#64351)

(cherry picked from commit 25e03b1e75)

* add a change log
5 years ago
Xu Yuandong 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
5 years ago
Xu Yuandong 19447485b8 Backport/2.9/64927 Doc notes 4 (#64927) (#64951)
* Doc notes 4 cloudengine (#64927)

(cherry picked from commit 2ccdf29b5b)

* add a change log
5 years ago
Xu Yuandong 039dc88b10 Backport/2.9/64348 Doc notes 3 (#64348) (#64947)
* Doc notes 3 (#64348)

(cherry picked from commit ad0769c095)

* add a change log
5 years ago
Xu Yuandong 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
5 years ago
Xu Yuandong 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
5 years ago
Matt Davis 6c051b0241 New release v2.9.1 5 years ago
Gonéri Le Bouder 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)
5 years ago
Nathaniel Case 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
5 years ago
Jordan Borean 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)
5 years ago
Jordan Borean 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)
5 years ago
Jordan Borean 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)
5 years ago
Sumit Jaiswal 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
5 years ago
Andrea Tartaglia 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)
5 years ago
Matt Martz 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>
5 years ago
Nilashish Chakraborty 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
5 years ago
Nilashish Chakraborty 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
5 years ago
Pilou 5ca92a848c package_facts: check 'vital' and 'automated' values ('pkg' manager) (#62766) (#62825)
(cherry picked from commit 278398555d)
5 years ago
Sam Doran 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>
5 years ago
Abhijeet Kasurde 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)
5 years ago
Xu Yuandong 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)
5 years ago
yanzhangi 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
5 years ago
Sumit Jaiswal 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
5 years ago
Sam Doran cdc6577395 [stable-2.9] syslogger - disable check mode (#63646) (#63750)
(cherry picked from commit dcec3d000e)

Co-authored-by: Sam Doran <sdoran@redhat.com>
5 years ago
Ganesh Nalawade 2822744c68 dest lives in 4 different places depending on exeuction type (#62444) (#63283)
(cherry picked from commit d4ad541eee)
5 years ago
Martin Nečas 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
5 years ago
Martin Nečas 7df4550611 Ovirt disk correct fcp host backport (#63898)
* ovirt disk correct fcp host (#63857)

* add changelog
5 years ago
Abhijeet Kasurde 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)
5 years ago
Martin Nečas 49f1760fea Ovirt correct resloving false atrs backport (#63953)
* ovirt correct resolving nested atributes which are false (#63908)

* add changelog
5 years ago
Rémi REY c65e003796 Fix grafana_datasource fails when name with spaces (#63987)
(cherry picked from commit df6b7bf77f)
5 years ago
Ganesh Nalawade 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)
5 years ago
Sumit Jaiswal 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
5 years ago
Sloane Hertel 153f8341a5 Use templating in HostVarsVars __repr__ (#64282)
* Fix HostVarsVars templating

* Add some tests for HostVars and HostVarsVars templating

* changelog

(cherry picked from commit 371d7aae31)
5 years ago
richardsonky 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
5 years ago
Martin Nečas cf31833a48 [2.9] Ovirt vm cpu treads docs backport (#64413)
* ovirt_vm: update cpu_threads docs (#64380)

* add changelog
5 years ago
Martin Nečas 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
5 years ago
Jordan Borean 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>
5 years ago
Felix Fontein 64665ffcc9 ansible-test: bumping ACME test container version (#64424)
* Bumping ACME test container version.

* Add changelog.

(cherry picked from commit f4ff45dcd4)
5 years ago
Martin Krizek 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)
5 years ago
Matt Martz 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>
5 years ago
n0trax 270f851e7a Replace clear() method for backward compatibility. (#64504)
(cherry picked from commit 27d3dd58a4)
5 years ago
Andrey Klychkov 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)
5 years ago
Abhijeet Kasurde 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)
5 years ago
Kiyo Nagamine cef3036179 [2.9] Fixed tiny typo in interpreter_discovery.rst
Added missing '/'

(cherry picked from commit 84bffff96a)
5 years ago
Jeff Geerling 209865502a Fixes #56832: Remove warning when falling back to apt-get if aptitude is missing. (#61782)
(cherry picked from commit a6ec6c3175)
5 years ago
Paul Belanger 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>
5 years ago
Martin Krizek 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
5 years ago
Matt Martz 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
5 years ago
PRASOON KARUNAN V 46b79e386c change $partition variable name to $ansible_partition (#63968)
* change $partition variable name to $ansbile_partition

* Added changelog fragment

(cherry picked from commit 8b13836b1f)
5 years ago
Dusan Matejka 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
5 years ago
Abhijeet Kasurde 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)
5 years ago
Felix Fontein 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)
5 years ago
Felix Fontein 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)
5 years ago
Felix Fontein 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)
5 years ago
Abhijeet Kasurde 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)
5 years ago
Sam Doran 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>
5 years ago
Sam Doran 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>
5 years ago
Robert Osowiecki 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)
5 years ago
Felix Fontein 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)
5 years ago
Roman 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)
5 years ago
Felix Fontein 02f45f45d7 Backportable subset of: openssl_csr: deprecate version option (#63432) (#63674)
Cherry-picked from ba686154b9.
5 years ago
Guillaume Martinez 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
5 years ago
Jordan Borean 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
5 years ago
Matt Clay 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>
5 years ago
Matt Clay 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>
5 years ago
Matt Clay 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>
5 years ago
Matt Clay 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>
5 years ago
Matt Clay 0586d2c630
Merge pull request #63537 from mattclay/backport-d829a50-stable-2.9
[stable-2.9] Fix use of deprecated function in xml module.
5 years ago
Matt Clay 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>
5 years ago
Matt Clay 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>
5 years ago
Matt Clay 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>
5 years ago
Xu Yuandong 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)
5 years ago
Sam Doran 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>
5 years ago
Sam Doran 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>
5 years ago
Xu Yuandong 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.
5 years ago
Felix Fontein 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.
5 years ago
Felix Fontein 80233545cc docker_node_info: improve error handling (#63418)
* Improve error handling for get_service_inspect().

* Add changelog fragment.

(cherry picked from commit d753168e9d)
5 years ago
Sam Doran 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>
5 years ago
yanzhangi 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
5 years ago
dgeo 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
5 years ago
Sam Doran a0fb10c2ab [stable-2.9] package_facts - use AnsibleModule.warn() for warnings
(cherry picked from commit 2b1e24fc49)

Co-authored-by: Sam Doran <sdoran@redhat.com>
5 years ago
Felix Fontein 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)
5 years ago
Xu Yuandong 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)
5 years ago
James Cassell 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)
5 years ago
aliaksandr-dounar-epam 125f7e8db1 issue #61672 backporting in Ansible 2.9 5 years ago
Andrey Klychkov cc244f4e03 lineinfile - fix bug with insertbefore/insertafter and firstmatch (#63194)
(cherry picked from commit 3b18337cac)
5 years ago
Xu Yuandong 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)
5 years ago
yanzhangi 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
5 years ago
yanzhangi 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
5 years ago
kr3ator 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
5 years ago
yanzhangi 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
5 years ago
yanzhangi 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)
5 years ago
yanzhangi 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
5 years ago
yanzhangi 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)
5 years ago
yanzhangi 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
5 years ago
yanzhangi 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
5 years ago
yanzhangi 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)
5 years ago
yanzhangi 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
5 years ago
yanzhangi 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)
5 years ago
yanzhangi 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)
5 years ago
yanzhangi 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)
5 years ago
zhangyan 71743d3456 Update ce_bgp modified information 5 years ago
Felix Fontein 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)
5 years ago
Dag Wieers 9fd70e3f3c Fix whitespace issue in filter (backport 2.9)
This fixes reported issue #60276

This is a backport of #62768
5 years ago
Felix Fontein 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)
5 years ago
Michael Scherer 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)
5 years ago
Felix Fontein de4d3dc34d ACME modules: make compatible to Buypass ACME v1 CA, and fix bug in ACME v1 account update (#61693)
(cherry picked from commit c6dcf78f53)
5 years ago
Toshio Kuratomi 24325a05df New release v2.9.0 5 years ago
Sandra McCann 891d801905 fixed changelog spelling issues (#64106) 5 years ago
Alicia Cozine 381ca99de7
fix spelling issues (#64103) (#64107)
(cherry picked from commit 26236f474b)
5 years ago
Matt Davis 149ff0d3ad New release v2.9.0rc5 5 years ago
Matt Clay 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)
5 years ago
Matt Clay 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>
5 years ago
Toshio Kuratomi 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>
5 years ago
Toshio Kuratomi 289cdb6ea0 New release v2.9.0rc4 5 years ago
Matt Clay 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>
5 years ago
Toshio Kuratomi 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)
5 years ago
Toshio Kuratomi 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>
5 years ago
Matt Martz 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>
5 years ago
Sam Doran 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>
5 years ago
Adam Miller d59de7123a adapt to firewalld 0.7.0 for RHEL 8.1 Beta, Fedora 31+
Fixes #63254

Signed-off-by: Adam Miller <admiller@redhat.com>
5 years ago
Matt Martz 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
5 years ago
Toshio Kuratomi 40f415ba35 New release v2.9.0rc3 5 years ago
Matt Davis 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)
5 years ago
Matt Davis 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
5 years ago
Adrian Likins 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)
5 years ago
Jill R 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
5 years ago
Sam Doran 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)
5 years ago
Matt Davis 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)
5 years ago
Adrian Likins 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)
5 years ago
Matt Clay 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>
5 years ago
Matt Clay 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>
5 years ago
Matt Clay 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>
5 years ago
Toshio Kuratomi eac0319e7a New release v2.9.0rc2 5 years ago
Nilashish Chakraborty 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
5 years ago
Mike Wiebe 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)
5 years ago
chouseknecht 27ef947b84 Default collection install path to first path in COLLECTIONS_PATHS
(cherry picked from commit 70feb012b3)
5 years ago
Adam Miller 42f16219b6 dnf - properly handle idempotent removal of wildcard globs (#63034)
Signed-off-by: Adam Miller <admiller@redhat.com>
5 years ago
Matt Clay 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>
5 years ago
Sam Doran 56054beac8 [stable-2.9] find - clarify description of 'contains' (#62445) (#62917)
(cherry picked from commit 2375fd0990)

Co-authored-by: Sam Doran <sdoran@redhat.com>
5 years ago
Felix Fontein 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)
5 years ago
Mariusz Mazur b07ac9cb96 Changelog fragment 5 years ago
Matt Clay 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>
5 years ago
Mario Lenz 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)
5 years ago
Toshio Kuratomi 6c3726f3e1 New release v2.9.0rc1 5 years ago
Toshio Kuratomi 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>
5 years ago
Toshio Kuratomi b443f980e7 New release v2.9.0rc1 5 years ago
Sloane Hertel 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)
5 years ago
Rohit 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>
5 years ago
Paul Belanger 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>
5 years ago
Zim Kalinowski 50782978c7 Backport/2.9/62571 (#62577)
* modify vmss to support specialized (#62571)

(cherry picked from commit 558ce6575d)

* add changelog

* additional change
5 years ago
yanzhangi 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
5 years ago
yanzhangi 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
5 years ago
Sumit Jaiswal 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
5 years ago
Zim Kalinowski b8e905cd4d Backport/2.9/62559 (#62570)
* snapshot fix for backporting (#62559)

(cherry picked from commit 054519920e)

* changelog fragment
5 years ago
Will Thames 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)
5 years ago
Sam Doran 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>
5 years ago
Matt Clay 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)
5 years ago
Jordan Borean 741b49a247 psexec - Fix kerb and interactive support (#62556)
(cherry picked from commit 064e443ea5)
5 years ago
Matt Davis 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)
5 years ago
Jean-Frédéric 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>
5 years ago
Paul Belanger 0b7fec8b11 Remove unsed / duplicate imports for iosxr module_utils (#61385)
(cherry picked from commit 5a60bdd308)
Signed-off-by: Paul Belanger <pabelanger@redhat.com>
5 years ago
Jordan Borean 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)
5 years ago
Sumit Jaiswal 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
5 years ago
Sumit Jaiswal 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
5 years ago
Sumit Jaiswal 26a615a6f8 PR to fix the traceback session uid error (#62527)
* fix session_uid (#62523)


(cherry picked from commit cf8e84fc62)

* changelog
5 years ago
Jordan Borean a3ff8e0579 Add fix for specifying current dir in collections_paths (#62478)
(cherry picked from commit 2e1c6a7839)
5 years ago
Paul Belanger 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>
5 years ago
Matt Clay 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.
5 years ago
yanzhangi 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
5 years ago
yanzhangi 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
5 years ago
yanzhangi 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
5 years ago
yanzhangi 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
5 years ago
Sloane Hertel a0fb290a87 cloudformation_info - fix KeyError (#62290)
* cloudformation_info - fix KeyError

* changelog

(cherry picked from commit 66e5427ffb)
5 years ago
yanzhangi 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
5 years ago
Mike Wiebe 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)
5 years ago
Ganesh Nalawade 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)
5 years ago
Felix Fontein 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.
5 years ago
Sumit Jaiswal 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)
5 years ago
Paul Belanger 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>
5 years ago
Sam Doran 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>
5 years ago
Matt Clay 0d79d993f7 [stable-2.9] Mark ansible-test cloud credentials as sensitive.
(cherry picked from commit 9f7b124a6f)

Co-authored-by: Matt Clay <matt@mystile.com>
5 years ago
Matt Clay 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>
5 years ago
Sumit Jaiswal 51b8daa64d Fix ios_lldp_global enable to enabled raised in issue 61554 (#62440)
* fix ios_lldp_global (#62420)


(cherry picked from commit 9addad0f4a)

* changelog
5 years ago
Matt Clay 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>
5 years ago
Nathaniel Case 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
5 years ago
Trishna Guha 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)
5 years ago
Mike Wiebe d4e577bd6d nxos_telemetry replaced state (#62368)
(cherry picked from commit b0668e17ed)
5 years ago
Sumit Jaiswal 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>
5 years ago
Sumit Jaiswal 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
5 years ago
Sumit Jaiswal 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
5 years ago
Sumit Jaiswal 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
5 years ago
Egor Zaitsev 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
5 years ago
Sumit Jaiswal 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>
5 years ago
Sumit Jaiswal 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
5 years ago
Sumit Jaiswal 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
5 years ago