Commit graph

182 commits

Author SHA1 Message Date
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
Brian Coca
be46ea7bf2 use correct object in error
fixes #40453

(cherry picked from commit 0339c8037b)
2018-05-30 12:53:15 -04: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
Benoit Dunand-Laisin
116a504825 Fixes #24241 Module always updates installed plugins (#40645)
* Update jenkins_plugin.py

When setting state=latest, plugin are always updated because old sha1 is bytes and and is compared to new sha1 which is str (so it always detecting a sha1 change)

* Add changelog
2018-05-25 10:09:17 -04:00
Sam Doran
b20b29ac0a
Insert set commands if a delete command is entered (#40666) (#40672)
(cherry picked from commit 8b4e36e711)
2018-05-24 13:21:16 -04:00
Martin Krizek
18581adbb5
Backport: apt: don't markmanual if apt-mark is not installed (#40605)
(cherry picked from commit a3cfe0d72f)
2018-05-24 09:27:38 +02:00
Jordan Borean
12ac23bad3
Win get url auth 2.5 (#40642)
* Fixed WebRequest init (#40641)


(cherry picked from commit 4fbdc1a497)

* Added changelog fragment
2018-05-24 14:42:39 +10:00
Matt Martz
fac5a14ded Backport #40500 for 2.5 - synchronize fixes (#40545)
* Group logic detecting user, ensure rsync_opts is a list if omitted. Fixes #40483

(cherry picked from commit ea176427b4)

* Add changelog for #40500
2018-05-24 12:04:18 +10: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
Sam Doran
02e66617f2
Make xenserver_facts actually work (#35821) (#40552)
* Get the str value of xmlrpc.client.DateTime

* get_all_records should be used instead of get_all

* Facts returned with 'ansible_facts'

* Remove some redundant code

* Add cheese as maintainer

* Add changelog entry

(cherry picked from commit d45b044992)
2018-05-22 14:01:19 -04: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
4c279f5e45
EdgeOS module improvements (#39530) (#40548)
* Update docs and use to_text on strings

* Add warning to use network_cli

(cherry picked from commit d5dbd8c76d)
2018-05-22 12:52:57 -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
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
Artem Goncharov
13c88fe2d2 fixes issue 39472: (#40379)
With python 3.6 spwd.getspnam returns PermissionError instead of
KeyError if user does not have privileges

(cherry picked from commit 0023b1ee9eca1286493c56ce5e1aa1b2272c3e39)
2018-05-22 11:29:00 -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
Ryan S. Brown
d0cf81883c Move EC2 ASG changelog entry to correct directory 2018-05-18 13:57:52 -04:00
Matt Davis
778cb5bd8b New release v2.5.3 2018-05-17 16:29:23 -07:00
Sloane Hertel
84f9303c52 aws_ec2: tag values as hostnames - backport #35880 (#40325)
* aws_ec2 inventory: add support for tag values as hostnames (#35880)

(cherry picked from commit b345b79dcd)

* changelog
2018-05-17 08:59:20 -07:00
Sloane Hertel
ae2453850e aws_ec2 inventory plugin: backport/2.5/40240 (#40277)
* Add fallback check for IAM role temp creds (#40240)

* Add fallback check for IAM role temp creds

(cherry picked from commit d5a5e37fcf)

* changelog

* Fix changelog

* Fix fix changelog
2018-05-16 22:47:07 -07:00
Jordan Borean
8f09190100
win_updates: fix typo with download failure and whitelist on multiple updates (#40283) (#40292)
(cherry picked from commit 837aada4a8)
2018-05-17 08:55:21 +10: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
Trishna Guha
2fec98aa5d
nxos bugfix changelog 2.5.3 (#40263)
Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>
2018-05-16 22:17:52 +05:30
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
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
Sloane Hertel
fe56d68c70
aws_s3: fix uploading from the target - backport #39023 (#40192)
* [aws_s3] Fix uploading src option on the target machine to a bucket (#39023)

* Fix backward compatibility for uploading src option on the target machine to a bucket

* Allow the module to handle errors for nonexistent files

(cherry picked from commit b8a93c12e2)

* changelog
2018-05-15 16:39:04 -04:00
Brian Coca
e3b35d96be document lookup errors optoin (#39645)
* document lookup errors optoin

* changed to doc

* updated as per feedback

(cherry picked from commit 32c2aae258)
2018-05-15 15:30:12 -04: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
Ricardo Carrillo Cruz
3115f31655 Cherry pick iosxr admin fix (#40108)
* Exit admin mode properly on iosxr_config (#39594)

Fixes #38811

When using 'admin' in iosxr-config, we need to pass an end
to config terminal session but also pass exit so we exit admin
mode.

(cherry picked from commit 56c5567912)

* Add bugfix fragment
2018-05-15 10:50:42 -07:00
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
Dag Wieers
096757a6a3 Ensure remove files work when file was already removed
If a file disappears when you are removing it, this will ensure it
doesn't fail and continues as expected.

(cherry picked from commit 6a08b16c37)

Add changelog for file removal race

(cherry picked from commit 7c9122a89d)
2018-05-14 14:28:37 -07:00
Toshio Kuratomi
c833b096fa
Fix encoding issue when parsing plugin examples (#39872)
This caused a non-fatal traceback when building, for example, the module
documentation for the debug module.

(cherry picked from commit 3e64036684)
2018-05-14 14:28:03 -07:00
Abhijeet Kasurde
bd27c950f3
Fix unset ansible_virtualization_role (#39514) (#39885)
Error was:
AttributeError("'str' object has no attribute 'startwith'",)

Closes #39138

(cherry picked from commit 2397ca1a7e)
2018-05-14 15:15:46 +05:30
John R Barker
7764d9ce45
"route" has to be the first option in ufw command (#31756) (#40019)
* "route" has to be the first option in ufw command (#31756)

For supporting deletion of ufw routes, route option has to be placed before delete option
(cherry picked from commit 21004d86f9)

* Changelog
2018-05-12 16:07:54 +01:00
John R Barker
6a46e3a44b
Backport/2.5/37847Fix interfaces_file to accept allow-* (#37847 (#40008)
* Fix interfaces_file to accept allow-* (#37847)

(cherry picked from commit 5ac41ee8d8)

* interfaces-file
2018-05-11 15:25:04 +01:00
Brian Coca
448999f10e fix keyword doc generation
* use aliases when they exist
  * fix hardcoded loop attributes handling

(cherry picked from commit 19fee0ef41)
2018-05-10 16:45:08 -04:00
Brian Coca
0cd5457ea2 remove properties from vars in include_role (#38968)
* remove properties from vars in include_role
* also from_ args

(cherry picked from commit b9f7f582d1)
2018-05-10 16:44:02 -04: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
Chris Alfonso
fb669f76fb Backport/2.5/39027 (#39091)
* nios lookup errors out when there are no results #37970 (#39027)

* Update nios.py

* Update nios.py

* Update nios.py

* nios lookup errors out when there are no results #37970  Open

Indentation failure issue resolved

* Returning empty list instead of None

In case of no results, res will be returned as an empty list instead of None (implementing ganeshrn comment)

(cherry picked from commit fd50248463)

* Adding changelog mesage for nios lookup error
2018-05-10 10:08:44 +01:00
Trishna Guha
fb26f6107d
nxos module doc fragment for authorize,auth_pass (#39946)
Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>
2018-05-10 13:34:10 +05:30
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
Abhijeet Kasurde
894830326a
Don't update cpu/memory allocation in configspec if there is no change. (#39865)
Fixes #38941

(cherry picked from commit 0296c8466a)
2018-05-09 18:37:03 +05:30
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
Trishna Guha
fb5bc5d513
nxos on_become terminal plugin stable_2.5 (#39852)
* nxos enable mode (#39355)

* nxos enable mode

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

* fix prompt

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

* Add authorize,auth_pass

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

* remove byte string from exec_cli_command

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

* Add on_become test

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

* removed_in_version

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

* nxos on_become changelog

Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>
2018-05-08 15:52:09 +05:30
Deepak Agrawal
c23aa1c9ce
show version brief does not work on iosxr virtual (#39847)
* show version brief does not work on iosxr virtual (#37609)

* show version brief does not work on iosxr virtual

* ci failures fix

(cherry picked from commit 66b389a00d)

* changelog entry
2018-05-08 13:12:23 +05:30
Trishna Guha
079b7cb1fe
nxos and ios bugfix stable-2.5 (#39845)
* nxos_linkagg normalize interface (#39591)

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

* use show run instead of section pipeline ios_l2_interface (#39658)

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

* add changelog

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

* fix nxos_snmp_user issues (#39760)

* fix nxos_snmp_user issues

* shipppable fix

(cherry picked from commit e3bfbe5875)

* changelog

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

* fix shippable

Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>
2018-05-08 12:38:22 +05:30