Commit graph

4276 commits

Author SHA1 Message Date
Felix Fontein
fd04094bde acme_*: new test container, tests for IP certificates (#57530)
* Bump container version.

* Use new URLs.

* Add IP certificate tests.

* Disable IPv6 IP from IP certificate.

Background: in CI, the ACME test container apparently has no IPv6 support.
Without IPv6 support, Pebble can't connect to validate, and thus validation
fails.

(cherry picked from commit c50a75a41e)
2019-06-17 18:27:47 -07:00
Martin Krizek
0690aab25d Actually run valid_include_keywords test (#57687)
(cherry picked from commit e8948f7655)
2019-06-17 18:27:02 -07:00
Paul Belanger
07806f36b6 Remove hardcoded ansible user for junos_user integration tests (#56452)
It is possible we are using a different username then 'ansible' for
testing junos. By using ansible_user_id, this should be a more dynamic
check.

Depends-On: https://github.com/ansible/ansible/pull/57639
Depends-On: https://github.com/ansible/ansible/pull/57638
Signed-off-by: Paul Belanger <pabelanger@redhat.com>
2019-06-17 15:46:33 -07:00
Sebastiaan Mannem
7b73604058 Issue 56430 (#57147)
* Adding integration test for 127.0.0.1/32 and ::1/128.

* Making sure file is not corrupted when render fails

* Fixes #56430

* Adding changelog for MR 57147/Issue 56430
2019-06-17 13:01:08 -07:00
Paul Belanger
57e323dd8f Fix ios_smoke failure
Set ansible_buffer_read_timeout to be larger then
ansible_command_timeout, as both appliance / controller are on the same
physical network and we are not triggering ansible_command_timeout.

Signed-off-by: Paul Belanger <pabelanger@redhat.com>
2019-06-17 12:55:30 -07:00
Sumit Jaiswal
7f1888cef4 PR to fix the IOS_NTP integration TC failure (#57481)
* ios_ntp tc fail

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

* ios_ntp tc fail

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

* fix for local connection

Signed-off-by: Sumit Jaiswal <sjaiswal@redhat.com>
Signed-off-by: Paul Belanger <pabelanger@redhat.com>
2019-06-17 12:55:30 -07:00
Paul Belanger
545b5af2fb ios_ntp: Switch interface to GigabitEthernet0/1 for tests (#56964)
* ios_ntp: Switch interface to GigabitEthernet0/1 for tests

Lets use an interface we know that exists for testing, in some cases
Loopback0 maybe not be configured.

Signed-off-by: Paul Belanger <pabelanger@redhat.com>

* ios_ntp: properly register result variable for testing

This is currently broken, and tests don't work. Fix this by properly
registering the result variable.

Signed-off-by: Paul Belanger <pabelanger@redhat.com>
2019-06-17 12:55:30 -07:00
Paul Belanger
b381967194 Fix syntax issue with ios_ntp tests
This was missing a yaml anchor.

Signed-off-by: Paul Belanger <pabelanger@redhat.com>
2019-06-17 12:55:30 -07:00
Paul Belanger
ac2f1c4a26 ansible-test: use become for connection=local on ios_user
ios_user requires escalated privledges, rather then doing this in the
inventory, we can just add it into the playbook tasks.

Also add missing provider settings for authorize.

Signed-off-by: Paul Belanger <pabelanger@redhat.com>
2019-06-17 12:55:30 -07:00
Abhijeet Kasurde
034d030a89 [2.8] VMware: Fix vmware_guest_move undefined VM name error
* Updated testcase
* Added check mode support
* Added check for mutual exclusive for Name and UUID

Fixes: #57580

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
(cherry picked from commit 00604d3f2c)
2019-06-17 12:51:13 -07:00
Sloane Hertel
01386cca4a preserve same order as inventory manager when using host lookup (#57769)
* preserve same order as inventory manager when using host lookup (#55331)

* preserve same order as inventory manager when using inventory_hostnames lookup

add a test

* move generic code

(cherry picked from commit afb5e02c19)

* changelog
2019-06-17 11:22:21 -07:00
Martin Krizek
ea735a1602 Fix --diff to produce output when creating a new file (#57744)
* Fix --diff to produce output when creating a new file

Fixes #57618

* Make the check more defensive

(cherry picked from commit 1fa7bfcd5d)
2019-06-14 19:23:08 -07:00
Ian Wienand
daef4d9c95 openssh_keypair: make fingerprint result a string (#57295)
The extant documentation says that the fingerprint return value is a
single string, but it is currently being returned as a split list.
Convert the returned value to a string as documented, and add some
basic test-case coverage for the return values.

(cherry picked from commit 6f06fc9945)
2019-06-11 19:54:54 -07:00
Jordan Borean
074b71f7fe win_chocolatey - honour version when bootstrapping chocolatey and fix package listing - 2.8 (#57380)
* win_chocolatey - honour version when bootstrapping chocolatey and fix package listing (#57208)

* win_chocolatey - honour version when bootstrapping chocolatey

* skip upgrade all step

* Fix install latest step

* Remove test changes now that Chocolatey is released

* tweak the package version detection

(cherry picked from commit b5b75daaa5)

* removed disabled alias
2019-06-11 19:54:11 -07:00
Trishna Guha
b8a41594fc nxos_snmp_user, nxos_snmp_host integration test fixes. (#57201) (#57443)
* Fix nxos_snmp tests

* Add imagetag check for nxos_snmp_user test

(cherry picked from commit 87422ea7e7)
2019-06-11 19:53:28 -07:00
Trishna Guha
736e26f019 Fix nxos_vtp_version test (#57358) (#57445)
(cherry picked from commit 870d8bf10b)
2019-06-11 19:52:19 -07:00
Trishna Guha
b428d36724 nxos_install_os: Fix nxapi local failures (#55993) (#57446)
* nxos_install_os: Fix nxapi local failures (#55993)

* Fix nxapi failures

* Remove logit debug calls

* Remove msg_timestamps

* Fix code alignment issue

(cherry picked from commit 7c73dd3e78)

* changelog

Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>
2019-06-11 19:51:50 -07:00
Trishna Guha
30aba1a7fd nxos_vlan purge fix 2.8 (#57442)
* nxos_vlan: fix broken purge behavior (issue #57101) (#57229)

* nxos_vlan: fix broken purge behavior (issue #57101)

Symptoms/Analysis:
- `nxos_vlan` `purge: true` would fail when `purge` was trying to delete all unspecified vlans, including vlan 1.
- `nxos` devices do not allow removing vlan 1 and raise a cli exception error
- Previous fix #55144 caused a side effect when `purge` was used: vlan changes specified by `aggregate` were ignored; e.g.
 - vlan 4 is not present; playbook specifies `aggregate: { vlan: 4 }, purge: true`
 - results in proper purging but vlan 4 is not created

Solutions:
- ignore vlan 1 when purging
- remove the `not purge` check from state present logic

Added additional unit tests and integration tests.
Tested against all regression platforms.

* PEP fixes

* Add agg_show_vlan_brief.txt fixture

* Add warning for removing vlan 1

* change method name check

(cherry picked from commit 6bb13bbb84)

* changelog

Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>
2019-06-11 19:50:35 -07:00
Sloane Hertel
95b1b42d4f improve conditional warnings (#57190)
* Fix order for warning on templated conditionals

Fix bare variable warnings when the variable is a boolean

* changelog

* Add tests for cases that should and should not give warnings

If the behavior may change when the default behavior for CONDITIONAL_BARE_VARS becomes False there should be a warning. Boolean type conditionals will not change in behavior so don't warn.

* oops, forgot to add files

* typo

(cherry picked from commit 21cd24a0dd)
2019-06-11 19:44:01 -07:00
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