Commit graph

4737 commits

Author SHA1 Message Date
Nilashish Chakraborty
72ad0dd4ec Fix ios_logging idempotence CP into 2.5 (#41120)
* Fixes to ios_logging (#41029)

* Logging size may not show up in config

* This is much simpler

* Avoid repetition in tests

* Both options of buffered are optional

(cherry picked from commit 92a95368fe)

* Added changelog
2018-06-07 17:05:47 -07:00
Jordan Borean
60ab7b2807 winrm: fix up unit tests (#41112) (#41211)
(cherry picked from commit ad8e13e9f8)
2018-06-06 15:57:00 -07:00
Matt Martz
959821f40e Backport #40833 for 2.5 - synchronize _remote_is_local (#40917)
* Use _remote_is_local=True for local connection in synchronize (#40833)

* All instances of local connection should use _remote_is_local=True. Fixes #40551

* Switch to instance attribute for synchronize

* Add test that shows that synchronize _remote_is_local addresses tmpdir building

(cherry picked from commit ad7ba91f75)

* Add changelog entry for #40833
2018-05-30 17:28:23 -04:00
Brian Coca
5a77aceae5 fix 'doas' become_method support, previously committed patch not submitted to devel branch (#37511) (#40896)
* fix become_method 'doas' support by properly specifying becomecmd

a repatch of https://github.com/ansible/ansible/pull/13451/ which was never committed to 'devel' branch.

* fix play_context test for become_method doas to match new becomecmd

(cherry picked from commit be3670f528)
2018-05-30 16:03:58 -04:00
Sloane Hertel
b1c4d6310d Fix broken aws_ses_identity test - backport #39560 (#40350)
* Fix failing aws_ses_identity integration tests (#39560)

* Fix failing aws_ses_identity integration tests

Reduce boilerplate with yaml anchor

* remove unstable test alias

* Update feedback forwarding check to use desired state rather than
repeated API calls.

(cherry picked from commit 571c183f59)

* changelog
2018-05-30 10:43:02 -07:00
Matt Clay
48f6670b49 Fix FreeBSD package install in test setup.sh.
(cherry picked from commit c3d3b6cedc)
2018-05-30 09:26:04 -07:00
Trishna Guha
8e8b469416
nxos bugfixes 2.5.4 cherry-pick (#40861)
* Fix legacy Nexus 3k integration test and module issues. (#40322)

* Add setup ignore_errors for nxos_config test

* Fix parse_fan_info for n3k

* Skip bidir tests for N3k

* Omit vni config for n3k

* Skip unsupported nxos_vrf_af test on N3K

* Add legacy N3K platform tag

(cherry picked from commit 63e16431b7)

* Skip N35 and N3L platforms for nxos_evpn_global test (#40333)

(cherry picked from commit ad69ef88e7)

* add normalize_interface in module_utils and fix nxos_l3_interface module (#40598)

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

* nxos_interface: Disable switchport for loopback/svi (#40314)

* nxos_interface: Disable switchport for loopback/svi

* Replace interface_type with get_interface_type(name)

(cherry picked from commit d04a989bd2)

* fixes bug with matching nxos prompts (#40655)

This change addresses an issue where the prompt matching regular
expressions would not match a prompt if the hostname starts with a
numeric value.  Before this change, the connection would fail with a
socket.timeout() error.  This change updates the termnal_stdout_re
values to now check for a number.

See Github issue #38639

(cherry picked from commit d829ff6993)

* fix nxos_vrf and migrate get_interface_type to module_utils (#40825)

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

* nxos_vlan fix

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

* changelog nxos bugfixes 2.5.4

Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>
2018-05-30 11:21:53 +05:30
Yuwei Zhou
5f384ec0a6 Fix #26755 by ensuring that the first nic in the nic list is primary (#38994) (#40781) 2018-05-29 10:28:54 +08:00
Nathaniel Case
d6a07186fd
Backport ios test fixes to 2.5 (#40662)
* Ios test fixes (#40503)

* Return messages generated from edit_config to module

* This does not seem to work that way

* Change test IP addresses to not conflict with device config

(cherry picked from commit eb818df1ec)

* Search all assigned ipv6 addresses instead of just the first (#40533)

* Search all assigned ipv6 addresses instead of just the first

* Add test for idempotency with multiple ipv6 addresses assigned

(cherry picked from commit e8d02a3a0f)

* Fix ios test pt. 2 (#40628)

* Add missing idempotence assert

* Remove dhcp with other addresses on ipv6

(cherry picked from commit f88412b7cd)
2018-05-24 10:22:46 -04:00
Sviatoslav Sydorenko
0b080de855
[2.5] Fix ios_vlan to correctly identify unmodified config when having long interface names (#40145) (#40656)
Change the command to get the interface in a vlan "show vlan" => "show vlan brief"
Change the parsing of the return command of the switch.
The return of the ios command is fixed so i cut with fix number of carracter.
Adding looking for the next line to add the forgeted interfaces.
(cherry picked from commit 3903ca5)

Co-authored-by: pierremahot <pierre.mahot@orange.fr>
2018-05-24 15:55:13 +02:00
Jordan Borean
a63b6d363b
winrm: add better exception handling for krb5 auth with pexpect (#39930) (#40634)
* winrm: add better exception handling for krb5 auth with pexpect

* Added changelog fragment

* Added exception handler in case kinit path isn't valid, added test cases

* fixed for Python 2 compatibility

(cherry picked from commit 5e28e282a5)
2018-05-24 07:17:21 +10:00
Sviatoslav Sydorenko
2cb9f7f5b9
[backport] Detect separate git dir and set git config path value appropriately
PR #38016

Co-authored-by: Sviatoslav Sydorenko <wk.cvs.github@sydorenko.org.ua>
(cherry picked from commit 0a701ff)

Co-authored-by: Senya <senya@riseup.net>
2018-05-23 21:01:07 +02:00
Sam Doran
dbcecb64b8
Fix ctrl+c in pause module and add tests (#40134) (#40480)
Backport # 40134 - Ensure Ctrl+C interrupt for pause module works in all cases
2018-05-22 13:11:21 -04:00
Sam Doran
9bef06ccd9
Add better error messages and checking to known_hosts (#38307) (#40502)
(cherry picked from commit 13aff08748)
2018-05-22 12:42:39 -04:00
Nathaniel Case
7df6df9017
Ios fixes 2.5 (#40543)
* Ios test fixes (#40503)

* Return messages generated from edit_config to module

* This does not seem to work that way

* Change test IP addresses to not conflict with device config

* Add test for idempotency with multiple ipv6 addresses assigned
2018-05-22 12:00:29 -04:00
Sam Doran
e877469533
Do not join flag parameters in iptables module (#36658) (#40501)
* Do not join flag parameters

This put a comma between every character of the tcp flag parameters, resulting in a bad iptables command.

Fixes #36490

* Use suboptions to ensure tcp_flags options are lists

* Add unit tests for tcp_flags

* Add example of how to use tcp_flags

(cherry picked from commit c9d3bb59a4)
2018-05-22 11:29:33 -04:00
Jordan Borean
9d8d1de182
winrm: source user from options than remote_user (#40467) (#40516)
* winrm: source user from options than remote_user (#40467)

* winrm: source user from options than remote_user

* fixed up mock for kerberos import

* Added changelog fragment

* get hostname from option as well

(cherry picked from commit 1ac180c74d)

* Also removed uneeded method that wasn't backported
2018-05-22 10:46:13 +10:00
Jordan Borean
6eb0af96de
win_environment: Added explicit check for null, empty string with state=present (#40468) (#40508)
* win_environment: Added explicit check for null, empty string with state=present

* Added changelog fragment

(cherry picked from commit db195831fd)
2018-05-22 07:15:34 +10:00
John R Barker
54413642db
removed_in: 2.6 is valid (#40399) (#40407)
(cherry picked from commit fe4368ce15)
2018-05-18 16:23:50 +01:00
Julien PRIGENT
b4a4f0f605 ec2_vpc_route_table: Update matching_count parsing on find_subnets fu… (#38707) (#39899)
* ec2_vpc_route_table: Update matching_count parsing on find_subnets function and tests

* ec2_vpc_route_table: Update matching_count parsing on find_subnets function

(cherry picked from commit 1905a6e8fb)
2018-05-16 22:44:32 -07:00
Matt Clay
f86f51a8e1 Fix uri test on Python 2.6.
(cherry picked from commit 5c124876fa)
2018-05-16 15:34:29 -07:00
John R Barker
f791ec285c
Backport/2.5/37461 (#40252)
* Fixing lack of failure when uploaded source is invalid (#37461)

Checking the response status for 400 and throwing exception.
Unit tests updated.

Fixes #37406
(cherry picked from commit 5e990301bb)

* changelog
2018-05-16 20:23:09 +01:00
Matt Clay
a8628898ff Add missing test network prefixes. 2018-05-16 11:23:17 -07:00
Ganesh Nalawade
f5463f9099
Fix junos_config confirm timeout issue (#40238) (#40255)
* Fix junos_config confirm timeout issue

* Fix unit test

* Update changelog

(cherry picked from commit 865f2c5990)
2018-05-16 20:55:13 +05:30
John R Barker
4924398e0f
Network requirements to be installed by ansible-test (#40042) (#40250)
Previously the test framework (DCI, Zuul) were installing the various
dependencies, this meant the list of what was required was duplicated.

Having everything defined in ansible-test makes it easier for people to
run tests locally.

Also this allows the test to work correctly on Python 2 & Python 3
(cherry picked from commit 27942d937f)
2018-05-16 15:25:44 +01:00
Trishna Guha
f1fc7cf384
nxos_snapshot fix cherry-pick (#40231)
* save_snapshot_locally nxos_snapshot (#40227)

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

* update changelog

Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>
2018-05-16 16:22:47 +05:30
Trishna Guha
299047d963
cherry-pick stable-2.5 (#40177)
* Fix nxos terminal plugin regex (#39659)

Fix nxos terminal plugin regex to match
command prompt without newline character as prefix

(cherry picked from commit 0ac222d68b)

* remove purge from nxos_logging doc, argspec (#39947)

* remove purge from nxos_logging doc, argspec

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

* shippable

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

* IT cases for nxos_logging (#39929)

* IT cases for nxos_logging

* review comment

(cherry picked from commit 2557c0662a)

* fix nxos_ping issues (#40028)

(cherry picked from commit 6fac574f17)

* Fix vxlan_vtep_vni tests (#39968)

(cherry picked from commit 0407c51447)

* ios cliconf plugin fix regex for version (#40066)

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

* update changelog

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

* shippable

Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>
2018-05-16 12:19:39 +05:30
Matt Clay
f6cbb45b39 Disable failing etcd3 integration test.
(cherry picked from commit 00d10e1d78)
2018-05-15 23:31:07 -07:00
Martin Krizek
274fea3f5f Backport: Fix nested noop block padding in dynamic includes (#40182)
* Fix nested noop block padding in dynamic includes (#38814)

* Fix nested noop block padding in dynamic includes

* Address issues from the review

* Fix typo

(cherry picked from commit 5dd8977cfa)

* Add changelog/fragment for 38814
2018-05-15 15:04:28 -04:00
Sloane Hertel
bc73fba58f
backport ec2_vpc_subnet fix and custom waiters from PRs 37534/38473/39171/38960 (#39440)
* [cloud] Make ec2_vpc_route_table wait for the route to propagate (#35975)

* Stabilize ec2_vpc_route_table

Wait for route table to be present before attempting to use it

Sleep before getting the final state of the route table in case modifications are incomplete

* Conditionally wait if changes were made

* Simplify logic

(cherry picked from commit 8fb31ac2f01e7c75d5181510290c99aee22be7ef)

* Route custom waiter (#36922)

This creates a way for us to use boto3's data-driven waiter support to use custom waiters where Boto3 hasn't implemented them yet.

The only waiter implemented so far is for VPC Route Tables to check that they exist, and this replaces some custom retry code.
(cherry picked from commit a40bce2bcbd5a40aee0de2b6ab5f6197bb1c5237)

* Use NormalizedOperationMethod to catch ClientErrors so the waiter can handle them properly (#37356)

(cherry picked from commit c9e8aca26cfc7559e7e8c7970acf06cd30cc7629)

* [cloud] Add custom waiters to stabilize ec2_vpc_subnet module - Fixes #36083 (#37534)

* stabilize ec2_vpc_subnet module

* Add waiters for ec2_vpc_subnet

Clean up integration tests

* Reenable CI for stabilized ec2_vpc_subnet tests

* rename waiters

* Use module_json_aws where applicable

Handle WaiterError first if waiting failed

* Fix traceback when tagging with keys/values that look like booleans

* Fix check mode with tags

* Add integration tests for tags that look like booleans and check mode

* Add waiter for deleting subnet

* Sleep a few seconds after using aws command line

(cherry picked from commit ea943e454c783c6b0ffb91b78131f27cd9bce269)

* Fix sporadic errors in ec2_vpc_subnet integration tests (#38473)

(cherry picked from commit 46f13d343786fa3985cc16cc770762984c7884ac)

* [aws] Skip ec2_vpc_subnet waiters for old botocore versions (#39171)

 Fix ec2_vpc_subnet for botocore versions that do not accept the WaiterConfig parameter
(cherry picked from commit 6b91dae21c20006677e1e4adf2a9ff7ad55ca49c)

* [aws] Increase possible wait time for nonmonotonic subnet attributes (#38960)

(cherry picked from commit c4f010704890581a4974e83af03c2e81fb29e58e)

* changelog
2018-05-15 14:51:43 -04:00
Nathaniel Case
abb0f4498f Pick 2.5 (#40167)
* Fixes to improve ios_system idempotency (#38303)

Added detection of additional formatting for domain_name, domain_search,
lookup_source, and lookup_enabled on some software versions. In each
case they failed to detect existing commands with a '-' in it.

Fix: #38301
(cherry picked from commit 67acffb5f2)

* Nxos fixes (#40117)

* Alter nxos_nxapi tests to test the right thing

* Defend #40027

(cherry picked from commit f04c876ecd)
2018-05-15 22:03:51 +05:30
Jesse Pretorius
a55fd1e415 apt: better error msg when update_cache fails (#37410) (#40143)
(cherry picked from commit a6d31b6fb1)
2018-05-15 17:43:48 +02:00
Ganesh Nalawade
d00b63e103
Fix eos_eapi integration test failure (#40132) (#40133)
(cherry picked from commit dda351ca6c)
2018-05-15 11:28:59 +05:30
Jordan Borean
920c9e447b
win_template: fix issue where dest was specified as a directory (#39887) (#40125)
(cherry picked from commit d6eb642e88)
2018-05-15 10:57:20 +10:00
Jordan Borean
470f77e6dd
become win: better error messages and docs update (#39936) (#40122)
* become win: better error messages and docs update

* Fix syntax error and added changelog fragment

(cherry picked from commit e0813d7d47)
2018-05-15 10:49:36 +10:00
Matt Clay
82abfa7ddf Mark the azure_rm_storageblob test unstable.
(cherry picked from commit 2de6734ce4)
2018-05-10 11:04:10 -07:00
zikalino
41532a2667 trying to fix storage blob timing issue
(cherry picked from commit 7284d40049)
2018-05-10 07:36:50 -07:00
Yuwei Zhou
3de89da6f0 Backport: Fixes some NIC bugs (#39213) (#39266)
* cherry-pick 1ecd2c9dcdb6df9baada84d220dddda3423137c2

* Create azure_rm_networkinterface-fix-creation-ignore-nsg-name.yaml
2018-05-10 19:43:26 +10:00
Matt Clay
1ecfca84e6 Make docs-build sanity test disabled by default.
(cherry picked from commit a7d7df1450)
2018-05-09 21:55:11 -07:00
Matt Clay
651efdad1d Move lookups tests to group1.
(cherry picked from commit dec4f10c21)
2018-05-09 16:55:25 -07:00
Matt Clay
1fd024984b Overhaul httptester support in ansible-test. (#39892)
- Works with the --remote option.
- Can be disabled with the --disable-httptester option.
- Change image with the --httptester option.
- Only load and run httptester for targets that require it.

(cherry picked from commit c1f9efabf4)
2018-05-09 16:55:25 -07:00
Sam Doran
a8c823e813 Ensure timezone tests reset system timezone to original value (#39326)
(cherry picked from commit fda67bae50)
2018-05-09 16:01:12 -07:00
Robin Roth
f4dc8596fa Install git in pip tests (#39460)
* Install git in pip tests

* Ignore MacOSX

(cherry picked from commit 90354d282d)
2018-05-09 11:44:08 -07:00
Matt Clay
3fcb758a9c Remove CI group from unsupported tests.
(cherry picked from commit 0e344b225a)
2018-05-09 10:31:31 -07:00
Matt Clay
d24be2c6c6 Remove unnecessary destructive aliases.
(cherry picked from commit 6a1cb25c99)
2018-05-09 10:31:31 -07:00
Matt Clay
8d8409141a Mark unsupported vmware tests.
(cherry picked from commit 8e6fd48087)
2018-05-09 10:31:31 -07:00
Sam Doran
511d3110f7
Only change expiration date if it is different (#38885) (#39575)
* Only change expiration date if it is different

Modify user_info() method to also return the password expiration.
Compare current and desired expiration times and only change if they are different.

* Improve formatting on user tests

* Add integration test for expiration

* Add changelog fragment

* Improve integration test

Skip macOS and use getent module for validating expiration date.

* Fix expiration change for FreeBSD

* Don't use datetime since the total_seconds method isn't available on CentOS 6

* Use better name for expiration index field

Use separate tasks for verifying expiration date on BSD

* Use calendar.timegm() rather than time.mktime()

calendar.timegm() is the inverse of time.gmtime() and returns a timestamp in UTC not localtime
Add tests that change the system timezone away from UTC

* Mark tests as destructive and use test for change status

* Fix account expiration for FreeBSD

Use DATE_FORMAT when setting expiration date on FreeBSD. Previously the argument passed to -e was an integer of days since epoch when the account will expire which was inserted directly into master.passwd. This value is interpreted as seconds since epoch by the system, meaning the account expiration was actually set to a few hours past epoch.

Greatly simply comparing desired  and current expiration time by using the first three values of the struct_time tuple rather than doing a whole bunch of manipulations of the seconds since epoch.

(cherry picked from commit 5a6bdef76b)
2018-05-09 10:45:48 -04:00
Martin Krizek
c485c439c7
Backport: apt: mark installed packages manual (#37751) (#39411)
(cherry picked from commit 00d9345158)
(cherry picked from commit 687f3bbef3)
2018-05-09 12:27:04 +02:00
Matt Clay
df72a1d644 Move pyvmomi install into cloud test plugin.
(cherry picked from commit a5b8085113)
2018-05-08 12:27:37 -07:00
Nathaniel Case
f654d47c01
Remove provider (and transport, where applicable) from consideration when not using connection=local (#39555) (#39861)
* Remove provider (and transport, where applicable) from consideration

* Add tests that misplaced transport does not fail task

(cherry picked from commit c6270e15a6)
2018-05-08 12:54:03 -04:00