Commit graph

4257 commits

Author SHA1 Message Date
Matt Clay
208bb48942 Revert "Disable the rabbitmq tests for now"
This reverts commit 5f47ab958f.

(cherry picked from commit 047fd3cfbc)
2019-06-10 14:46:47 -07:00
Matt Clay
0812a08ea3 [stable-2.8] Use bintray to install erlang for rabbitmq tests.
(cherry picked from commit b2791718e5)

Co-authored-by: Matt Clay <matt@mystile.com>
2019-06-10 14:46:47 -07:00
Matt Clay
318f46c829 Revert "Temp disable podman_image_info tests."
This reverts commit f6600b5b99.
2019-06-10 14:44:47 -07:00
Toshio Kuratomi
a31a8c2a53 [stable-2.8] Disable the rabbitmq tests for now
The erlang-solutions repository is broken for Ubuntu18 (They did not
sign their repository metadata).  For now, disable the rabbitmq tests
which depend upon that.  I'll open a PR with a revert of this commit.
We can watch it to see when it passes in Ci to know that the
erlang-soutions repository has been fixed
(cherry picked from commit 5f47ab9)

Co-authored-by: Toshio Kuratomi <a.badger@gmail.com>
2019-06-06 15:22:38 -07:00
Matt Clay
f6600b5b99 Temp disable podman_image_info tests.
The fix in https://github.com/ansible/ansible/pull/57433 is required for tests to pass.
2019-06-05 15:04:57 -07:00
Jordan Borean
77e88ae5d4 Mark win_chocolatey as unstable in 2.8 until next release 2019-06-05 06:15:05 -07:00
Felix Fontein
5c88199db3 [2.8] docker_image: fix compatibility bugs (#57085)
* docker_image: fix default handling of old docker-build options nocache and rm (#56610)

* Fix usage of nocache parameter.

* Fix defaults.

* Add changelog.

(cherry picked from commit 56e2d48612)

* docker_image: fix module failing when build option is used without specifying path (#56940)

* Fix module failing when build option is used without specifying path.

* Add changelog.

(cherry picked from commit 86928a5f74)

* Extend docker_image tests. (#57090)


(cherry picked from commit c54d79bc13)
2019-06-03 09:34:58 -07:00
Felix Fontein
059589794e Fix assignments in docker tests. (#57249)
(cherry picked from commit 7cd229aa97)
2019-06-03 09:31:15 -07:00
Rohit
3ae459b3b4 Vyos interface desc fix28 (#57228)
* vyos interfacefix and  test cases

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

* backport 28

Signed-off-by: rohitthakur2590 <rohitthakur2590@outlook.com>
2019-06-03 09:21:12 -07:00
Daniel Mellado Area
e826eca1f2 Fix junos_facts test (#57065)
This commit fixes a non-passing junos_facts integration test, as it was
using a non-ordered frozenset to assert its result.

(cherry picked from commit 0ada6b8d8d)
2019-05-30 11:12:27 -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
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
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
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
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
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
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
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
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
Martin Krizek
fc7fb9d7c9 yum: use Custom Group in integration tests (#56439)
(cherry picked from commit 77f997474a)
2019-05-22 13:31:28 -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
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
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
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
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
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
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
Chris Van Heuveln
46f185c217 nxos_snmp_traps: fix 'group: all' for N35 platforms (#55995)
* nxos_snmp_traps: fix 'group: all' for N35 platforms

- `group: all` attempts to enable traps for all features defined in the module's `feature_list`

- `N35` platforms do not support `snmp-server enable traps bfd`; so removing `bfd` from the `feature_list` for that platform

- Minor cleanup in `sanity.yaml` test file

* whitespace lint fix

(cherry picked from commit 0e0c2a7db7)
2019-05-21 09:37:43 -07:00
Mike Wiebe
79ec0ec78f nxos_interface: Fix admin_state check for n6k (#55673)
* Fix admin_state check for n6k

* Fix rx and tx_rate intent check test

(cherry picked from commit bceca72eb7)
2019-05-21 09:37:17 -07:00
Trishna Guha
4f37ce32f3 nxos_vlan fix 2.8 backport (#56211)
* nxos_vlan: vlan names containing regex ctl chars should be escaped (#55463)

The `nxos_vlan` module may raise with regex error `sre_constants.error: multiple repeat` in the non_structured codepath if the device has existing vlan names with certain regex control characters; e.g.

```
VLAN Name                             Status    Ports
---- -------------------------------- --------- -------------------------------
1    default                          active    Eth1/3
14   my-vlan-name-is-***              active
```

(cherry picked from commit de8ce08fd8)

* fix nxos_vlan mode idempotence bug (#55144)

* fix nxos_vlan mode idempotence bug

Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>

* Fix CI failure

Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>
(cherry picked from commit 57e0567310)

* nxos_vlan fix 2.8 backport

Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>
2019-05-21 09:36:30 -07:00
Chris Van Heuveln
a85461e569 nxos_acl: some platforms/versions raise when no ACLs are present (#55609)
* `nxos_acl` may fail with `IndexError: list index out of range` while attempting to delete a non-existent ACL.

The failure occurs when the `acl` var is an empty list.

* nxos_acl: catch 501 'Structured output unsupported' when no ACLs present

With some older image versions, `show ip access-list | json` will raise a 501 error indicating `'Structured output unsupported'` when there are no access-lists configured. This change turns off the `check_rc` and then looks for the failure condition.

* Fix kwarg

* Fix lint issues

(cherry picked from commit 869fdcd7d4)
2019-05-21 07:56:55 -07:00
Felix Fontein
a07ed8530f openssl_certificate: fix passphrase handling for cryptography backend (#56155)
* Make sure passphrase is bytes string.

* Fix typo.

* Add more passphrase tests.

* Fix test names.

* Add changelog.

(cherry picked from commit 7a957ba64a)
2019-05-20 19:22:28 -07:00
NilashishC
7333af4fbb Skip iosxr_bgp tests if device is not running XR 6.1.3
Signed-off-by: NilashishC <nilashishchakraborty8@gmail.com>
(cherry picked from commit 1b0683e9059857845f465f59e171552bf7397144)
2019-05-20 19:09:02 -07:00
Nathaniel Case
c3e2f9f536 eos_bgp needs become: yes (#56131)
We don't specify that in hostvars, so add it to the tests

(cherry picked from commit d39be3d3e0)
2019-05-20 19:08:13 -07:00
Strahinja Kustudic
cf611c8a8e Backport/2.8/55695 (#56254)
* sysctl will now return an error if the value is invalid

sysctl can fail to set a value even if it returns an exit status 0. More
details: https://bugzilla.redhat.com/show_bug.cgi?id=1264080. Because of
this in case of an invalid value or a read-only file system, sysctl
module would return OK, even though it didn't set anything. To be sure
that sysctl correctly applied the changes we also need to check the
output of stderr.

(cherry picked from commit 0432b7f2522dbf82c4fabdb3fd17f7ac83f34e62)

* Run sysctl with LANG=C

Because we are parsing sysctl stderr we need to make sure that errors
are persistent across different system language settings.

(cherry picked from commit a16128f778b1e7574c5986aed26e146ac0561533)

* Add changelog fragment for sysctl

(cherry picked from commit 3ad9d4d83c1d2bbfccefb8388904c596d98f8731)
2019-05-20 18:10:15 -07:00
Paul Belanger
9eecd869f0 Fix vyos_command integration test (#56091)
This has been broken for some time, but only noticed recently.  Because
vyos_command isn't supported on ansible_connection=local, update our
testing to account for that.

Signed-off-by: Paul Belanger <pabelanger@redhat.com>
(cherry picked from commit 59d20e004e)
2019-05-20 17:11:17 -07:00
Felix Fontein
1769d9aebe oom_killer and oom_score_adj are available since docker-py 1.8.0. (#56012)
* oom_killer and oom_score_adj are available since docker-py 1.8.0.

* Add changelog.

(cherry picked from commit f692261ea0)
2019-05-20 09:31:55 -07:00
Andrey Klychkov
f7dd79a439 postgresql SSL related tests, Backport/2.8/55288 (#55801)
* postgresql SSL related tests (#55288)

* postgresql SSL tests

* postgresql SSL tests, added link to officiall doc

(cherry picked from commit f8c47262c4)

* postgresql SSL related tests: added changelog fragment
2019-05-20 09:28:34 -07:00
flowerysong
00b4a52633 Fix loading namespaced doc_fragments from collections (#55249)
* Fix loading namespaced doc_fragments

The syntax for specifying a different fragment name was already
using '.' as a separator, so the code needed to be tweaked to
avoid choking on names like `testns.testcoll.fragname` and
`testns.testcoll.fragname.altvar`.

`get_plugin_class()` returns 'docfragment' for the fragment loader;
mangling `subdir` provides consistent alignment with the normal plugin
directory names and avoids needing special handling of plugin types
with 'module' in the name.

* Add changelog entry

(cherry picked from commit 2ef8b297ff)
2019-05-20 09:27:38 -07:00
Felix Fontein
4818ec2823 docker_container: use restart() API function instead of stop/start sequence (#55894)
* Improve container restart.

* Adjust tests.

* Add changelog.

* Quote options.

* Move tests for restart/recreate options to start/stop tests.

* Fix changelog name.

(cherry picked from commit 95d1564f70)
2019-05-20 09:26:00 -07:00
Jordan Borean
c99ee40812 win_acl - fix network path qualifier parsing (#55970)
(cherry picked from commit cc3b8b9f72)
2019-05-17 23:19:57 -04:00
Matt Martz
2611867fd1 [stable-2.8] Bump erlang ping to 1:20.3.8.18-1
(cherry picked from commit 4b00141)

Co-authored-by: Matt Martz <matt@sivel.net>
2019-05-16 12:00:23 -04:00
Matt Clay
e925dd7713 [stable-2.8] Disable failing hcloud integration tests.
(cherry picked from commit 87d42ca11c)

Co-authored-by: Matt Clay <matt@mystile.com>
2019-05-09 10:03:32 -07:00