Commit graph

997 commits

Author SHA1 Message Date
Mariusz Mazur
01c6915eba Backport/2.8/57163 (#57173)
* kubevirt_pvc: improve failure handling (#57163)


(cherry picked from commit cac34ac568)

* kubevirt_pvc: changelog fragment
2019-05-30 10:16:01 -07:00
Tim Hunter
7d0237f4db update pkg_mgr.py for Amazon Linux support (#56618)
(cherry picked from commit 4c00fc7b32)
2019-05-30 10:11:41 -07:00
szymon3
f79af725fc Backport/2.8/56912 (#57161)
* Update rabbitmq_queue.py (#56912)

change description for when `state=absent`

(cherry picked from commit 00067c8d54)

* Add changelog fragment for PR 56912
2019-05-30 09:47:02 -05:00
Ondra Machacek
4591f36dcd kubevirt_vm: Improve create VM from template (#56833)
* kubevirt_vm: Improve create VM from template

* kubevirt_vm: Fix checking of VM update

* kubevirt: Fix RS and presets template parameters

* kubevirt_vm: simplify previous change + update comments (#56897)
2019-05-30 07:41:39 -07:00
Rohit
77e50980b5 Nxos facts fix backport (#57150)
* text format fan info mismatch and module info check (#57009)

Signed-off-by: rohitthakur2590 <rohitthakur2590@outlook.com>
(cherry picked from commit b143918f30)

* nxos facts fix backport to stable 2.8

Signed-off-by: rohitthakur2590 <rohitthakur2590@outlook.com>
2019-05-30 06:24:59 -07:00
Nathan Swartz
0365d73102 Backport/2.8/57135 (#57137)
* Fix netapp_e_iscsi_target chap secret size and clearing functionality.

* Add changelogs fragment for PR #57135
2019-05-29 11:55:59 -07:00
ShachafGoldstein
f511bec4ff Win_hostname module: Change name check to WMI (#56420)
* Change name check to WMI

* Changelog fragment

* Fixed per review

(cherry picked from commit 94566ed79c)
2019-05-28 17:17:11 -07:00
Felix Fontein
0d48ead822 docker_container: fix container creation with networks_cli_compatible=yes (#56687)
* Fix behavior.

* Add changelog.

* Add simple test to prevent #56620.

(cherry picked from commit d8dcd20294)
2019-05-28 17:14:09 -07:00
Tyler Hartley
0128006023 Make second group match of ufw status output optional (#56678)
* Make second group match of ufw status output optional

Fixes #56674

* Fix comparison logic.

* Add changelog fragment

(cherry picked from commit 1d22909f7c)
2019-05-28 16:28:33 -07:00
Bharat Kunwar
7d9aa0d829 Apply tags conditionally so that the module does not throw up an erro… (#56710)
* Apply tags conditionally so that the module does not throw up an error when using an older distro of openstacksdk

(cherry picked from commit c517538bd81149f5b507617e5f3385f98ec4642a)

* Update 56575-os_stack-apply_tag_conditionally_to_fix_the_module.yaml
2019-05-28 16:21:24 -07:00
Yury V. Zaytsev
776aa014ac route53_facts: add check mode support (#56900)
* route53_facts: add check mode support

* route53_facts: add changelog fragment mentioning check mode support

* route53_facts: alter changelog fragment type from `minor_changes` to `bugfixes`

* Update changelogs/fragments/56900-route53-facts-check-mode.yaml

Co-Authored-By: Felix Fontein <felix@fontein.de>
2019-05-28 15:37:26 -07:00
Klaus Frank
64890cc456 [2.8] VMware: Fix python 3 incompatibility
Add Python2 and Python3 compatible `string.translate` for hostname customization.

Fixes: #54118
(cherry picked from commit 8f89d1d3da)
2019-05-28 15:29:21 -07:00
Lukas Kämmerling
116262e5e8 Backport hcloud_volume attach step should be idempotent 2019-05-28 15:06:19 -07:00
Felix Fontein
0a624eaad3 [2.8] [docker_network] Fix idempotency when using aux_addresses in ipam_config (#56972)
* [docker_network] Fix idempotency when using aux_addresses in ipam_config (#56901)

* [docker_network] Fix idempotency when using aux_addresses in ipam_config

Mismatch between keys returned by Docker API (AuxilliaryAddresses) vs
expected by Ansible module (aux_addresses) resulted in tasks always
have status 'changed'. The existing code normalizing one set of
keys to another missed this special case where converting
CamelCase to lowercase is not sufficent.

Please see
https://github.com/moby/moby/blob/master/api/types/network/network.go
for reference.

* Correct keywords formatting in changelog file

Co-Authored-By: Felix Fontein <felix@fontein.de>
(cherry picked from commit 37df89b2d8)

* docker_network: Integration tests for IPAM config idempotence (#56975)

Integration tests for pull request #56901 which fixes found issues with idempotence.

(cherry picked from commit 6a50c6aae4)
2019-05-28 15:01:52 -07:00
Felix Fontein
4388886d48 docker conncetion plugin: accept 'dev' as 'newest version' (#56947)
* Accept 'dev' as 'newest version'.

* Add changelog.

* Fix YAML.

(cherry picked from commit 2f523ad08e)
2019-05-28 15:00:10 -07:00
Nathaniel Case
5a1985cb06 [stable-2.8] eos_l2_interface handle "Interface does not exist" (#56787) (#56982)
* [stable-2.8] eos_l2_interface handle "Interface does not exist" (#56787)

* Quick and dirty attempt to handle eapi error

* Well this should probably change

* Hopefully this works correctly?

* Fix check_rc handling with httpapi

* Add tests that should hopefully cover the error

* Fix warnings

* Improve tests.
(cherry picked from commit cebb363fcc)

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

* Add changelog

* Remove backport overreach

* Fix debug statements in new tests while I'm here
2019-05-28 07:18:11 -07:00
Nathaniel Case
d617e6cd84 [stable-2.8] eos_config: Fix test issues (#56180) (#56916)
* [stable-2.8] eos_config: Fix test issues (#56180)

* Alter tests to pass

* Change diff_against to make changed work again

* Add another diff_against

* Expose supports_sessions across all EOS connection types

* Change session warning to failure

* supports_sessions needs to be a method to survive the rpc boundary

* Alter tests to match
(cherry picked from commit 0bead36)
2019-05-24 14:27:59 -07:00
Nathaniel Case
39c5758a87 [stable-2.8] Don't detect update if vrf not set. (#56235) (#56421)
* [stable-2.8] Don't detect update if vrf not set. (#56235)
(cherry picked from commit ea41bbc)
2019-05-24 14:27:32 -07:00
Nathaniel Case
92e4a98219 [stable-2.8] Don't fail trying to read boot image without enable (#56126) (#56134)
* [stable-2.8] Don't fail trying to read boot image without enable (#56126)

Also add a message when network_os_image can't be acquired.
(cherry picked from commit 3d9da0c)

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

* Add changelog

* Fix changelog
2019-05-24 11:54:22 -07:00
Brian Coca
9844ea49c5 Always keep subset data for callbacks (#56881)
results were only being preserved during no_log
  fixes #56704

(cherry picked from commit 4adb7cfb5f)
2019-05-24 11:33:00 -07:00
Martin Krizek
eb9d192130 yum: handle "_none_" value for proxy (#56725)
* yum: handle "_none_" value for proxy

Fixes #56538

* Fix sanity check

(cherry picked from commit 7b9d7e6b5c)
2019-05-24 10:52:35 -07:00
Sam Doran
bd011688dd [stable-2.8] Ensure uri module always returns status even on failure (#56240)
- Also return url and update docs for other values to indicate they are only returned on success.
- Add integration tests
- Use info variable for common return values
- Use -1 as default status rather than None. This is lines up with with existing code in urls.py
- Add unit tests to ensure status and url are returned on failure
(cherry picked from commit 8f4f3750fe)

Co-authored-by: Sam Doran <sdoran@redhat.com>
2019-05-24 10:52:05 -07:00
Swartz, Nathan
e71b4e2e57 Fix workload profileId indexing in netapp_e_volume module
This commit reflects the changes in PR #56747 in the devel branch
2019-05-24 10:50:48 -07:00
Brian Coca
73484808c8 Preserve ssh error (#56460)
* Preserve ssh error

* more details on fail

* removed redundant caption to errors

(cherry picked from commit 22b9525aa9)
2019-05-24 10:28:13 -07:00
Will Thames
c52335a616 Make ansible adhoc work with include_role (#56163)
* Make ansible adhoc work with include_role

Fix logic condition so that include_role works
without

```
ERROR! 'async_val' is not a valid attribute for a IncludeRole

The error appears to be in 'None': line 0, column 0, but may
be elsewhere in the file depending on the exact syntax problem.

(could not open file to display line)
```

* Add include_role test for adhoc

(cherry picked from commit cd95843ea5)
2019-05-24 10:26:45 -07:00
Brian Coca
53cfa05568 Prevent vars premature templating (#56117)
Avoid premature vars templating
  * added tests
  * avoid 'is template' warning in vars, since we want them for latter templating

(cherry picked from commit 1da47bfa8c)
2019-05-24 10:25:42 -07:00
Andrey Klychkov
206087e342 Backport/2.8/56703 (#56829)
* postgresql_db: bugfix 56703 (#56734)

(cherry picked from commit f9108e23e7)

* postgresql_db bugfix (backport/2.8/56703)
2019-05-24 09:31:47 -07:00
Felix Fontein
6c078e18a8 openssl_pkcs12: fix crash due to wrong path used for loading key in check mode (#56808)
* Used wrong path for private key.

* Add changelog.

(cherry picked from commit 391a1042c2)
2019-05-24 09:31:22 -07:00
Andrey Klychkov
3115c95b4c postgresql_ping: fixed a typo in the module documentation (Backport/2.8/56608) (#56842)
* Fix typo in pg server ping (#56608)

(cherry picked from commit 52a89b290f)

* postgresql_ping: fix typo (backport/2.8/56608)
2019-05-23 13:58:31 -05:00
Brian Coca
bc8f317637 fix collection adjacent loading with --playbook-dir (#56194)
* added inventory adjacent test

(cherry picked from commit 69b2d7e0f3)
2019-05-22 15:04:44 -07:00
Dag Wieers
40b3619c9a ACI: Do not encode query_string (backport) (#56784)
* Revert "ACI: Implement encoded query_string"

This reverts commit 1690af04fe42c657cbf0092d18c86bb517fe86a7.

* Add changelog fragment
2019-05-22 15:02:03 -07:00
Anil Kumar Muraleedharan
ed0e874e47 Backport/2.8/55954 (#56810)
* Update cnos_vrf.py Backport coverity fix

(cherry picked from commit ac546457c8bdda12707738dfaa843bf4d791339d)

* Adding change log fragmet.

* Update cnos_vrf.py

* Merge issue rectified

* Update cnos_vrf.py
2019-05-22 15:00:30 -07:00
Matt Martz
f35a37f289 [stable-2.8] Whitelist listen as a valid keyword on TaskInclude (#56586) (#56597)
* [stable-2.8] Whitelist listen as a valid keyword on TaskInclude (#56586)

* Whitelist listen as a valid keyword on TaskInclude. Fixes #56580

* Move 'listen' to HandlerTaskInclude

* Remove trailing newline
(cherry picked from commit 576593e)

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

* Improvement on setting VALID_INCLUDE_KEYWORDS on HandlerTaskInclude (#56801)


(cherry picked from commit 8bb3274711)
2019-05-22 14:58:30 -07:00
Gonéri Le Bouder
a42c9d17de vmware_vm_facts: fix the support with regular ESXi
Ensure the module still work with the ESXi where CustomFieldsManager
does not exist.

From: https://www.vmware.com/support/developer/converter-sdk/conv60_apireference/vim.CustomFieldsManager.html

    The CustomFieldsManager object is used to add and remove custom fields to
    managed entities.
    The custom fields values set on managed entities are available through the
    customValue property and through the summary objects for VirtualMachine
    and HostSystem. They are not available directly through this managed object.
    This functionality is only available through VirtualCenter.

Fixes: #56071

(cherry picked from commit cf78759f5b)
2019-05-22 13:36:28 -07:00
Brian Coca
a5dc9ff8b4 preserve underlying block building error (#56465)
fixes #56462

(cherry picked from commit 8fe9618c84)
2019-05-22 13:27:51 -07:00
Martin Krizek
0176c8893b yum: fix false error msg about autoremove support (#56459)
* yum: fix false error msg about autoremove support

(cherry picked from commit a68ac729ea)
2019-05-22 13:24:04 -07:00
Ganesh Nalawade
3a3314e9ff Fix netconf_config backup string issue (#56188)
* Fixes Netconf_config single parameter bug (#56138)

* Fixes Netconf_config single parameter bug
Fixes 56022

fixed get_config to not require multiple parameters to just run a backup

* Add Integration test for netconf_config
Associated with #56022

tests backup through netconf only using one parameter.

* Added debug to the begin and end of file

* Fix formatting of save config.  #56022

* removed blank line at end: #56022

(cherry picked from commit 647ed207af)

* Fix netconf_config backup string issue (#56175)

*  Convert the ElementTree object to string
   before dumping the configuration in file.

(cherry picked from commit 9c5745ad21)
2019-05-22 13:01:09 -07:00
Matt Martz
b2364fe748 [stable-2.8] Don't rely on netloc for determining hostname and port, just use hostname and port (#56270)
* Add changelog fragment
* Fix IPv6 address parsing for py2.6, and add tests
* make sure hostname isn't None
(cherry picked from commit 493cf81)

Co-authored-by: Matt Martz <matt@sivel.net>
2019-05-22 11:44:19 -07:00
Martin Krizek
f0e5f2cad0 2.8: Move update_cache to after self.yum_baseurl definition (#56613) (#56705)
* Move update_cache to after self.yum_baseurl definition (#56613)


(cherry picked from commit e13566140a)

* Add changelog
2019-05-22 11:41:12 -07:00
Will Thames
171ef3e337 Allow python_requirements_facts to have dashes (#56683)
* Allow python_requirements_facts to cope with packages with dashes

```
python_requirements_facts:
  dependencies:
    - kubernetes-validate
```

should work as expected

(cherry picked from commit 5b3305c71505ffd4b0fd7dc5a6a17a4d5cb4cd77)

* Allow python_requirements_facts to cope with packages with dashes (#56166)

* Allow python_requirements_facts to cope with packages with dashes

```
python_requirements_facts:
  dependencies:
    - kubernetes-validate
```

should work as expected

* Ensure tests run for python_requirements_facts

(cherry picked from commit 8e1dd58c2b)
2019-05-22 10:08:01 -07:00
Kevin Breit
42fb862605 meraki_switchport - Improve reliability (#54275)
* Rewrite much of the execution of meraki_switchport
- Previous versions had problems with idempotency and allowed_vlans

* Modified payload creation
- Parameter map is used
- propsed is created using .copy()
- Much cleaner this way

* Add whitespace for lint

* Add bugfix snippet for changelog

(cherry picked from commit d59eb9edab)
2019-05-22 09:47:36 -07:00
Rohit
314049aa71 Asa config fix28 backport (#56562)
* asa_config fix (#56559)

Signed-off-by: Rohit Thakur <rohitthakur2590@outlook.com>
(cherry picked from commit 06c050e9bd)

* asa_config_content_fix

Signed-off-by: Rohit Thakur <rohitthakur2590@outlook.com>
2019-05-22 09:44:59 -07:00
Matt Martz
2f767bda9b [stable-2.8] When not using file_per_task, make sure we don't prematurely close the perf files (#56477)
* When not using file_per_task, make sure we don't prematurely close the perf files

* add changelog fragment
(cherry picked from commit 867e357)

Co-authored-by: Matt Martz <matt@sivel.net>
2019-05-22 09:44:05 -07:00
Andrey Klychkov
ecef18d744 Backport/2.8/55514 (#56686)
* postgresql modules: move connect_to_db and get_pg_version to module_utils/postgres.py (#55514)

* postgresql modules: move connect_to_db, get_pg_version to module_utils

* postgresql modules: move connect_to_db, get_pg_version to module_utils 2

* postgresql modules: move connect_to_db, get_pg_version to module_utils 3

(cherry picked from commit 316d1db29f)

* postgresql modules: move connect_to_db and get_pg_version to module_utils/postgres.py Backport/2.8/55514
2019-05-22 06:46:48 -07:00
Martin Krizek
411371a756 dnf: fix wildcard matching for state: absent (#56013)
* dnf: fix wildcard matching for state: absent

Fixes #55938

* Add changelog...

* Fix sanity check failure...

(cherry picked from commit 826b99d4bd)
2019-05-21 15:10:00 -07:00
xuxiaowei0512
235aa2b85b 2.8 backport :fix bugs for ce (#54750) (#55861)
* fix bugs for ce (#54750)

* Update ce.py

            while to_text(out, errors='surrogate_then_replace').strip().endswith(']'):
                display.vvvv('wrong context, sending exit to device', self._play_context.remote_addr)
                conn.exec_command('return')
                out = conn.get_prompt()

connetion has no send_command function and ce device has no 'exit' command to return user-view(a correct context),but 'return' .command.

* Add files via upload

Some bugs fix.

* Add files via upload

fix some bugs

* fix a bug for ce_command

Running a command with prompt via ce_command, It doesn't work.The reason is that the key word for network_cli recognition is answer not response.

* fix bugs

fix bugs for ce modules

* Update ce.py

* Delete ce_ftp.py

need modify

* Delete ce_lacp.py

* Add files via upload

* Delete ce_aaa_server.py

* Delete ce_aaa_server_host.py

* Compatible with Python 3

Compatible with Python 3 and fix bugs for ce

* Update ce_aaa_server.py

* Add files via upload

modify doc

* Add files via upload

Compatible with Python 3 and fix bugs

* Add files via upload

Compatible with Python 3 and fix bugs

* Add files via upload

Cancellation of change

* Update ce_netconf.py

It is a bug that response has no xml attribute:line 183

* Add files via upload

* Add files via upload

Compatible with Python 3 and fix bugs

* updatp ce_config.py

a bug for this module.

(cherry picked from commit 1017f15c38)
2019-05-21 15:05:15 -07:00
Jordan Borean
c82a27b89e winrm - fix failure parsing for send input errors (#56245)
(cherry picked from commit fd65f037f8)
2019-05-21 15:01:00 -07:00
Sumit Jaiswal
a52bce11d2 Backport to fix nios member module param bug fix (#56387)
* Update nios_member.py (#54419)

* Update nios_member.py

* Update api.py

* Update nios_member.py

* Update nios_member.py

* Update api.py

(cherry picked from commit 25f485f79d)

* nios_member param fix

Signed-off-by: Sumit Jaiswal <sjaiswal@redhat.com>
2019-05-21 14:40:15 -07:00
Tzur Eliyahu
51fb908369 Backport/2.8/56357 (#56367)
* IBM_Storage: fixed a bug which caused several of our modules to pass unwanted arguments and fail

(cherry picked from commit 13f5cf4e82638be0f75205d1262a05a5c487d839)

* IBM_Storage: Added a changelog for 56357 bug

(cherry picked from commit 0de770e748923441bedef331ed60c17cd1dd1d00)
2019-05-21 14:30:55 -07:00
Chris Van Heuveln
bf8a838702 nxos_snmp_user: platform fixes for get_snmp_user (#55832)
* nxos_snmp_user: platform fixes for get_snmp_user

snmp user output behavior varies quite a bit for the different nxos platforms and required several workarounds:

- N5K/N6k
 - These platforms do not support structured output for `show snmp user`.
 - The current code lands in an `except` clause when the output is not structured; so I added a new `get_non_structured_snmp_user` method to scrape the state from the regular cli output if it's present.

- N9K-F
 - The `group` data in the JSON output is different for this platform; it has a different key (just `group` instead of `TABLE_groups` or `group_names`) and it is not indexed
 - For a single group the value is a string, for multiple groups it's a list

- sanity
 - N5K/N6K/N9K-F platforms will reject `no snmp user <name> <role>` when it's the last role defined for the user.
 - workaround is to use `nxos_user` to remove the user

- Changes validated on:
 - `N3K, N3K-F, N35, N6K, N7K, N9K, N9K-F`
 - `6.0(2)A8`
 - `7.0(3)I2, 7.0(3)I4, 7.0(3)I5, 7.0(3)I6, 7.0(3)I7`
 - `7.3(2)D1`
 - `7.3(3)N1, 7.3(4)N1`
 - `8.3(2)`
 - `9.2(2), 9.2(3)`

* fix lint warning

(cherry picked from commit 8c56c116e5)
2019-05-21 14:23:30 -07:00