Commit graph

44585 commits

Author SHA1 Message Date
Sam Doran
0a40b0ed45 [stable-2.8] Update instructions for running module directly (#56883)
The internals of AnsiballZ changed silghtly
(cherry picked from commit 50b1a66649)

Co-authored-by: Sam Doran <sdoran@redhat.com>
2019-05-24 12:08:49 -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
Matt Martz
20d17fe0ea [stable-2.8] Validate types before asserting lengths (#56882)
(cherry picked from commit 9c5b721)

Co-authored-by: Matt Martz <matt@sivel.net>
2019-05-24 11:33:24 -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
Alicia Cozine
5f67bd5ef9
CLI docs include license not copyright (#56871) (#56874)
(cherry picked from commit fc94d79c47)
2019-05-23 17:18:50 -05: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
Sandra McCann
9ec7cdc4b0 Update RHEL repo for Ansible 2.8 (#56859) (#56868)
(cherry picked from commit 3129fc0b17)
2019-05-23 13:56:45 -05:00
Sandra McCann
48189b95cd Copyright fix for 2018 (#56860) (#56869)
* update copyright in footer

* remove extraneous copyright from cli commands

(cherry picked from commit f9b43a0f68)
2019-05-23 13:55:46 -05:00
Jordan Borean
8881adc098 [stable-2.8] win_get_url: ignore defender false positive in tests (#56812)
(cherry picked from commit 124400f319)

Co-authored-by: Jordan Borean <jborean93@gmail.com>
2019-05-22 23:57:38 -07:00
Brian Coca
c92257daeb fix bad rename in cp conflict fix 2019-05-22 15:04:44 -07: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
Martin Krizek
fc7fb9d7c9 yum: use Custom Group in integration tests (#56439)
(cherry picked from commit 77f997474a)
2019-05-22 13:31: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
Chris Van Heuveln
e6ed517eed nxos_snmp_traps:sanity: skip idempotency tests for I7 image bug (#55618)
This is a sanity test cleanup to handle a known image bug with (N9K) I7 images.
The I7 image fails to enable some snmp trap link configs causing an idempotency failure in the sanity, so we're skipping the idempotence tests that involve this bug.

Tested on N9K images: 9.2(2), 7.0(3)I7.

(cherry picked from commit 4d46f44ff2)
2019-05-22 13:25:29 -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
Felix Fontein
e63818b7d0 Clarify that GPLv3+ module_utils need core team approval (#56740) (#56759)
* Clarify that GPLv3+ module_utils need core team approval.

* Update docs/docsite/rst/dev_guide/shared_snippets/licensing.txt

Co-Authored-By: Sam Doran <sdoran@redhat.com>

* More 'module_util' -> 'file in module_utils'.

(cherry picked from commit 53ec9c8019)
2019-05-22 14:51:37 -05:00
Felix Fontein
2c495821c2 Update get_certificate.py (#56594) (#56758)
* Update get_certificate.py with an example to calculate number of days until cert expires from get_certificate result.

* Update lib/ansible/modules/crypto/get_certificate.py

Co-Authored-By: Felix Fontein <felix@fontein.de>
(cherry picked from commit cb9be4ddaf)
2019-05-22 14:51:09 -05: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
Chris Van Heuveln
faee6a3676 nxos_bgp_neighbor_af:sanity:6k: skip soft-reconfig 'always' test (#55661)
N5K / N6K do not support the `always` keyword on the `soft-reconfig in` configuration.

(cherry picked from commit 4798368b13)
2019-05-21 14:33:17 -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
5e2aa93f7d nxos_snmp_host:sanity:6k: Add platform excludes for sanity tests (#55664)
N6K should be present wherever N5K is included/excluded.

(cherry picked from commit 91d187f780)
2019-05-21 14:28:08 -07:00
Chris Van Heuveln
c74fd2e1ce nxos_ospf_vrf:sanity: ignore no default-metric idempotence tests when I7 images (#55615)
* nxos_ospf_vrf:sanity: ignore no default-metric idempotence tests when I7 images

This is a sanity test cleanup to handle a known image bug with (N9K) I7 images.
The I7 image rejects 'no default-metric' configs, so we're skipping the idempotence
tests that involve this bug.

Tested on N9K images: 9.2(2), 7.0(3)I7, 7.0(3)I2

* simplify check for I7

(cherry picked from commit a568e018be)
2019-05-21 14:24:00 -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
Abhijeet Kasurde
f279ce5209 [2.8] VMware: vmware_guest_disk support for use_instance_uuid
All vmware_guest_* module support for use_instance_uuid from Ansible 2.8,
somehow vmware_guest_disk missed from this change.
This fix adds support for use_instance_uuid in vmware_guest_disk.

Fixes: #56021

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
(cherry picked from commit 7e6be4e634)
2019-05-21 14:23:13 -07:00
Sumit Jaiswal
1e0f140238 Backport PR for fixing IOS static route TC CI failure (#56294)
* To fix IOS static route CI failure (#56292)

* ios static failure

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

* fix CI failure

Signed-off-by: Sumit Jaiswal <sjaiswal@redhat.com>
(cherry picked from commit 3fdc4ba6b4)

* adding BP changelog

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

* adding endline in changelog

Signed-off-by: Sumit Jaiswal <sjaiswal@redhat.com>
2019-05-21 14:22:04 -07:00
Mike Wiebe
17dacf757b nxos_vtp_*: Fixes n6k issues (#55737)
* Add n6k support for nxos_vtp_domain

* Add n6k support for nxos_vtp_version

* Add n6k support for nxos_vtp_password

* Fix shippable error

(cherry picked from commit d55c0cf8dc)
2019-05-21 14:19:59 -07:00
Bojan Vitnik
d73b8d66ae [2.8] XenServer: Minor changes and fixes in xenserver_guest (#55678)
Backport of #55678 to stable-2.8.

* XenServer: Minor changes and fixes in xenserver_guest

 - xenserver_guest module: ignore wait_for_ip_address when
   state=absent (fixes #55348). Module docs are updated to reflect this.
 - xenserver_guest module: show proper error message when maximum number
   of network interfaces is reached and multiple network interfaces are
   added at once (fix for changes introduced in #54697).
 - xenserver_guest module: fixed a bug in reconfigure() where VM would
   be powered off even though check mode is used when reconfiguration
   needs VM to be powered off.

* Added changelog fragment

(cherry picked from commit 2a39dc84b7)
2019-05-21 09:38:22 -07:00