Commit graph

44794 commits

Author SHA1 Message Date
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
Sandra McCann
4ef102ae79 Correct repository name to install (#56991) (#57078)
(cherry picked from commit e17434c19f)
2019-05-28 14:33:11 -05:00
Sandra McCann
4b1c9c1b29 fixed doc build errors (#56735) (#57080)
(cherry picked from commit ac22cd31b6)
2019-05-28 14:32:47 -05: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
Martin Krizek
0a3410f5c6 ansible-test: prefer shlex.quote (#56823)
(cherry picked from commit 484c023316)
2019-05-26 08:53:13 -07:00
Paul Belanger
cb6ece6b4e [stable-2.8] Don't validate ip address for mgmt interface (#56136)
It is possible the EOS appliance doesn't have an IP address on the
management1 interface, instead just check we have found that interface.

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

Co-authored-by: Paul Belanger <pabelanger@redhat.com>
2019-05-24 14:29:01 -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
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