Commit Graph

4777 Commits (de932d9c17d3560d68489ac4603fa187e2900d22)

Author SHA1 Message Date
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)
7 years ago
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>
7 years ago
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
7 years ago
Sam Doran 9bef06ccd9
Add better error messages and checking to known_hosts (#38307) (#40502)
(cherry picked from commit 13aff08748)
7 years ago
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
7 years ago
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)
7 years ago
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
7 years ago
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)
7 years ago
John R Barker 54413642db
removed_in: 2.6 is valid (#40399) (#40407)
(cherry picked from commit fe4368ce15)
7 years ago
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)
7 years ago
Matt Clay f86f51a8e1 Fix uri test on Python 2.6.
(cherry picked from commit 5c124876fa)
7 years ago
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
7 years ago
Matt Clay a8628898ff Add missing test network prefixes. 7 years ago
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)
7 years ago
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)
7 years ago
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>
7 years ago
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>
7 years ago
Matt Clay f6cbb45b39 Disable failing etcd3 integration test.
(cherry picked from commit 00d10e1d78)
7 years ago
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
7 years ago
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
7 years ago
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)
7 years ago
Jesse Pretorius a55fd1e415 apt: better error msg when update_cache fails (#37410) (#40143)
(cherry picked from commit a6d31b6fb1)
7 years ago
Ganesh Nalawade d00b63e103
Fix eos_eapi integration test failure (#40132) (#40133)
(cherry picked from commit dda351ca6c)
7 years ago
Jordan Borean 920c9e447b
win_template: fix issue where dest was specified as a directory (#39887) (#40125)
(cherry picked from commit d6eb642e88)
7 years ago
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)
7 years ago
Matt Clay 82abfa7ddf Mark the azure_rm_storageblob test unstable.
(cherry picked from commit 2de6734ce4)
7 years ago
zikalino 41532a2667 trying to fix storage blob timing issue
(cherry picked from commit 7284d40049)
7 years ago
Yuwei Zhou 3de89da6f0 Backport: Fixes some NIC bugs (#39213) (#39266)
* cherry-pick 1ecd2c9dcdb6df9baada84d220dddda3423137c2

* Create azure_rm_networkinterface-fix-creation-ignore-nsg-name.yaml
7 years ago
Matt Clay 1ecfca84e6 Make docs-build sanity test disabled by default.
(cherry picked from commit a7d7df1450)
7 years ago
Matt Clay 651efdad1d Move lookups tests to group1.
(cherry picked from commit dec4f10c21)
7 years ago
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)
7 years ago
Sam Doran a8c823e813 Ensure timezone tests reset system timezone to original value (#39326)
(cherry picked from commit fda67bae50)
7 years ago
Robin Roth f4dc8596fa Install git in pip tests (#39460)
* Install git in pip tests

* Ignore MacOSX

(cherry picked from commit 90354d282d)
7 years ago
Matt Clay 3fcb758a9c Remove CI group from unsupported tests.
(cherry picked from commit 0e344b225a)
7 years ago
Matt Clay d24be2c6c6 Remove unnecessary destructive aliases.
(cherry picked from commit 6a1cb25c99)
7 years ago
Matt Clay 8d8409141a Mark unsupported vmware tests.
(cherry picked from commit 8e6fd48087)
7 years ago
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)
7 years ago
Martin Krizek c485c439c7
Backport: apt: mark installed packages manual (#37751) (#39411)
(cherry picked from commit 00d9345158)
(cherry picked from commit 687f3bbef3)
7 years ago
Matt Clay df72a1d644 Move pyvmomi install into cloud test plugin.
(cherry picked from commit a5b8085113)
7 years ago
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)
7 years ago
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>
7 years ago
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
7 years ago
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>
7 years ago
Deepak Agrawal 54a229adb9
Handling of configurations blocks with end-* at the end of the block (#39843)
* Handling of configurations blocks with end-* at the end of the block (#39673)

* handle end-policy issue

* revert changes in iosxr cliconf

* fix trailing parents not included in difference

* Moving fix to platform specific fix

* pep 8 issues

(cherry picked from commit ef577b71cc)

* changelog entry
7 years ago
Matt Clay 515ab5fd99 Restore nuage_vspk integration tests.
(cherry picked from commit 1c7417cba7)
7 years ago
Ganesh Nalawade 20e8766840
Fix eos_config integration test failure (#39662) (#39784)
Enable become for eos_config check_mode test cases
(cherry picked from commit b20b964c4a)
7 years ago
Matt Clay b711bde6b2 Temporarily disable the nuage_vspk test.
This test interferes with the uri test on centos6.

(cherry picked from commit a121b5073c)
7 years ago
Ganesh Nalawade 8d570e67db
Fix eos_vlan associated interface check (#39661) (#39738)
* Fix eos_vlan associated interface check

Fix eos_vlan associated interface check by comparing
the interface in want and have without converting the
interface name to lower

* Update eos_vlan docs

* Update changelog
(cherry picked from commit afdc2364f2)
7 years ago
Ganesh Nalawade cf374ca9d4
Fix ios integration test failures in CI (#39729) (#39731)
Fix ios integration test failures in CI. Since the packet transfer and receive rate
on the interface is not determined to remove the tx_rate and rx_rate test conditions
to prevent intermittent failure.
(cherry picked from commit 4c5ac16447)
7 years ago
Trishna Guha 69564206e0
nxos bugfixes stable-2.5 (#39719)
* Handle nxos_feature issue where json isn't supported (#39150)

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

* Integration Tests only: nxos_snmp_contact (#39318)

* add integration test cases for snmp_contact

* removing unnecessary files

(cherry picked from commit bdb75cd82c)

* fix nxos_ntp issues (#39178)

* fix nxos_ntp issues

* review comments

* fix idempotent fail case

(cherry picked from commit 2f99a17856)

* nxos_interface: AttributeError: 'NoneType' object has no attribute 'group' (#38544)

This fixes an issue we recently encounteredi with nxos_interface:

```
Traceback (most recent call last):
  File "/tmp/ansible_JmLoba/ansible_module_nxos_interface.py", line 777, in main
    have = map_config_to_obj(want, module)
  File "/tmp/ansible_JmLoba/ansible_module_nxos_interface.py", line 606, in map_config_to_obj
    obj['speed'] = re.search(r'speed (\d+)', body).group(1)
AttributeError: 'NoneType' object has no attribute 'group'
```

(cherry picked from commit dca6e2d94d)

* fix nxos_snmp_community issues (#39258)

(cherry picked from commit 1afec5a48e)

* Add aggregate example in nxos_l2_interface module doc (#39275)

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

* Fix misuse of 'self' in lib/ansible/module_utils/network/eos/eos.py. … (#39074)

* Fix misuse of 'self' in lib/ansible/module_utils/network/eos/eos.py. Method load_config

* Fix all instances of self.config(self,...

(cherry picked from commit 80d7e22f5e)

* Fix for nxos_snmp_host issues (#39642)

* fix snmp_host issues

* source files

* fix shippable

* remove defaults to match arg spec

(cherry picked from commit f99bae1776)

* fix nxos_snmp_traps issues (#39444)

* fix snmp_traps code

* add IT cases

* fix shippable

* fix shippable without ignore

(cherry picked from commit 99748cbfa4)

* changelog

Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>
7 years ago
Toshio Kuratomi c11d8abf9a Fix for file module with recursive permission setting and broken symlinks
There was a traceback when setting permissions on a directory tree when
there were broken symlinks inside of the tree and follow=true.  chmod -R
ignores broken symlinks inside of the tree so we've fixed the file
module to do the same.

Fixes #39456

(cherry picked from commit 6b159fdb03)
7 years ago
Toshio Kuratomi 3b17141525 Fix for file module with symlinks to nonexistent target (#39635)
* Fix for file module with symlinks to nonexistent target

When creating a symlink to a nonexistent target, creating the symlink
would work but subsequent runs of the task would fail because it was
trying to operate on the target instead of the symlink.

Fixes #39558

(cherry picked from commit 4f664f8ff6)
7 years ago
Jordan Borean 99f36c6ce5
win_get_url: Fixed a few issues with using FTP and added tests (#39646) (#39705)
* win_get_url: Fixed a few issues with using FTP and added tests

* Fixed typo in docs

(cherry picked from commit f75b7a9437)
7 years ago
Matt Clay 659e10885b Enable nuage_vspk tests for Python 2.7.
(cherry picked from commit c2d7347819)
7 years ago
John R Barker aa6c60ea80
nxos.yaml no longer needed (#39693) 7 years ago
John R Barker de8213e230
vyos_interface require multiple network nodes to run (#39670) (#39691)
* vyos_interface require multiple network nodes to run

We don't have the ability to run these currently, so disable them.
The original logic was also incorrect, the tests don't pass on lab, DCI
nor single instance nodepool, so disable

https://github.com/ansible/ansible/issues/39667 tracks getting these
enabled again

* eth0 -> Gi0/0

* Correctly detect if we should run lldp

* Correctly detect if we should run lldp

(cherry picked from commit 923a81e9e5)
7 years ago
John R Barker d5538ce807
Default ssh port (#39678) (#39690)
(cherry picked from commit a7660f0603)
7 years ago
Maish 389db4c49e [aws] Added empty default for ec2_ami name parameter (#38585)
* removed additional check for name parameter

(cherry picked from commit 91357d07f4)

* Added empty default
Fix for issue https://github.com/ansible/ansible/issues/38482

(cherry picked from commit 60a3277103)

* [ec2_ami] Ensure name or image_id is provided for state=present (#38972)

Add integration tests for backward compatibility and ensuring name or image_id is provided
(cherry picked from commit e2aa1155ba)
7 years ago
Toshio Kuratomi 8c6f6033b0 Fix when template paths contain non-ascii chars and using the path in ansible_managed
Fixes #27262

(cherry picked from commit 81b2529159)

Add tests for template with non-ascii filenames

This is a test in response to #27262 but I could not provoke the error
so it only shows that the current code is working with non-ascii
filenames in this case.  It doesn't show whether there's some other bug
somewhere.

(cherry picked from commit f91d961cb4)
7 years ago
Matt Clay f1d584bb58 Remove unstable from azure_rm_storageblob test. 7 years ago
Matt Clay f3d8d0baae Remove unstable marker from rabbitmq_user test.
(cherry picked from commit f526a461ee)
7 years ago
John R Barker d5e8bedfd6
Connect via ssh using ansible_port (#39603) (#39607)
Depending on how we spin up the VM we use different ssh port. Honor that
in the vyos_user test
(cherry picked from commit 287f4ff374)
7 years ago
Trishna Guha df9642aa30
fix nxos_vrf_af teardown for nxapi (#39599) (#39601)
Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>
(cherry picked from commit 0a17adb3df)
7 years ago
Matt Clay b7c311d3c7 Use HTTPS instead of HTTP for httpbin tests. (#39457)
The httpbin.org site is now redirecting HTTP to HTTPS.

(cherry picked from commit b92ef8e54a)
7 years ago
Matt Clay 784956c219
Sync stable-2.5 test infrastructure with devel. (#39544)
Sync stable-2.5 test infrastructure with devel:

- shippable.yml
- test/runner/
- test/sanity/
- test/utils/
- docs/docsite/rst/dev_guide/testing/sanity/
- test/integration/targets/*/aliases
7 years ago
Matt Clay 20ab1d2994 Move requirements into tests. (#35885)
(cherry picked from commit e7b793c8c6)
7 years ago
Matt Clay aa534d8be9 Move var precedence check to integration tests.
(cherry picked from commit 8daa80e5bb)
7 years ago
Matt Clay 9f6706fe82 Clean up non-standard module shebangs.
(cherry picked from commit aee01564a9)
7 years ago
Matt Clay f9ba5bc5e9 Disable failing tests. 7 years ago
Will Thames b9df2e5c9f [cloud] ec2_vpc_route_table: ignore routes without DestinationCidrBlock - fixes #37003 (#37010) (#39210)
* [cloud] ec2_vpc_route_table: ignore routes without DestinationCidrBlock

Add module warnings rather than silently skipping

* Permit warnings for routes tables containing vpc endpoints to be turned off

* Add tests to ensure a VPC endpoint associated with a route table does not result in a traceback

(cherry picked from commit da3f7a8db1)
7 years ago
Jordan Borean 655ffa5368
Win file path special char 2.5 (#39397)
* win_file: Handle [] in paths, fix touch in check mode (#37901)

* win_file: Handle [] in paths, fix touch in check mode

* Fixed typo for p/invoke command

(cherry picked from commit 4b57fa91d0)

* Added changelog fragment for win_file special char fix

(cherry picked from commit 61bcf4740f)
7 years ago
Matt Clay 75c5bc0ef7 Update the cloudstack test container reference.
(cherry picked from commit ac1fbbeabc)
7 years ago
Matt Clay 6c03fcdc0e Fix mysql-server install/upgrade on Ubuntu 16.04. (#39241)
* Fix mysql-server install/upgrade on Ubuntu 16.04.
* Prevent service restart in docker_secret test.

(cherry picked from commit 996f9c2467)
7 years ago
Jordan Borean 6ab0d60e81
Ansible.ModuleUtils.FileUtil - backport 2.5 Add ability to test non file system provider paths (#39203)
* Ansible.ModuleUtils.FileUtil - Add ability to test non file system provider paths (#39200)


(cherry picked from commit b6afe6946d)

* Added changelog fragment
7 years ago
Brian Coca 711769db4f allow incremental update for vars in loop for set_fact/include_vars (#38302)
* fix set_fact/include_vars looping

* tests for all behaviours affected

* add tests with injection off/on

(cherry picked from commit 2afb1090b1)
7 years ago
Toshio Kuratomi cd7042857c Fix copy to only follow symlinks for files in the non-recursive case
Revert "**Temporary**"

This reverts commit 28b86b1148.

We don't need this now that copy has been fixed

(cherry picked from commit f332151f59)
7 years ago
Matt Martz 0bbb67383b
Backport #38827 for 2.5 - Allow inheriting attrs from static parents (#38847)
* Skip self._parent on dynamic, defer to grandparent for attr lookup (#38827)

* Skip self._parent on dynamic, defer to grandparent for attr lookup

* Revert _inheritable

* Add tests for include inheritance from static blocks

Fixes #38037 #36194

(cherry picked from commit 354aa8d602)

* Add changelog for #38827
7 years ago
Matt Martz 017f9a4876
Backport #37083 for 2.5 - IncludedFile comparison fix for free strategy (#38981)
* Consider parent also when comparing IncludedFile (#37083)

* Consider parent also when comparing IncludedFile

* Add new tests for IncludedFile and convert to pytest

(cherry picked from commit cdb79b0e3a)

* Add changelog for #37083
7 years ago
Brian Coca 0d83a0a888 make aef test more predictable
revert "Disable any_errors_fatal test."
This reverts commit 56189cc312.

fixes #38407

(cherry picked from commit 3c996d0f74)
7 years ago
Pilou 5fc9f3d219 module_common: handle None value for templar (#36651)
* module_common: set required parameter templar

Fix the following error (related to b455901):

  $ ./hacking/test-module -m ./lib/ansible/modules/system/ping.py -I ansible_python_interpreter=/usr/bin/python
  Traceback (most recent call last):
    File "./hacking/test-module", line 268, in <module>
      main()
    File "./hacking/test-module", line 249, in main
      (modfile, modname, module_style) = boilerplate_module(options.module_path, options.module_args, interpreters, options.check, options.filename)
    File "./hacking/test-module", line 152, in boilerplate_module
      task_vars=task_vars
    File "ansible/lib/ansible/executor/module_common.py", line 910, in modify_module
      environment=environment)
    File "ansible/lib/ansible/executor/module_common.py", line 736, in _find_module_utils
      shebang, interpreter = _get_shebang(u'/usr/bin/python', task_vars, templar)
    File "ansible/lib/ansible/executor/module_common.py", line 452, in _get_shebang
      interpreter = templar.template(task_vars[interpreter_config].strip())
  AttributeError: 'NoneType' object has no attribute 'template'

* module_common.modify_module: templar is required

(cherry picked from commit 7908f78fa6)
7 years ago
Brian Coca d31d84cfa3 avoid caching invetnory sources in loader (#38242)
* fix inventory plugin source caching

 - avoid caching invetnory sources in loader in base
 - same fix for yaml plugin
 - idem for 'auto' plugin

fixes #37162

* fix mock dataloader func sig

(cherry picked from commit 886c4edfb9)
7 years ago
AlanCoding dfbba6e75b Reduce recursion within group methods
This offers an optimization that allows loading larger
inventories of various structure by improving the
scaling laws involved for adding hosts and groups.

The primary speed benefit is the elimination of duplicate
recusion from traversing converging paths.

(cherry picked from commit 153c9bd539)
7 years ago
Trishna Guha 456fe2add1
nxos bugfixes cherry-pick (#38950)
* fix nxos_ntp_options (#38695)

(cherry picked from commit 1d975bdc93)

* fix ntp_auth issues (#38824)

(cherry picked from commit a372142434)

* update nxos changelog

Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>
7 years ago
Matt Clay 8606fa0431 Update httptester container reference.
(cherry picked from commit 35748e5228)
7 years ago
Jordan Borean 10aa5a37aa
win_regedit: backport 2.5 stabilise tests (#38918)
* win_regedit: stabilise tests (#38912)

(cherry picked from commit 77ef4802f0)

* Added changelog fragment
7 years ago
Matt Clay 2b73a5b69f Restore docker_secret test on RHEL.
(cherry picked from commit 57f1298074)
7 years ago
Matt Clay 938625add7 Disable failing fortios_* tests. 7 years ago
Matt Clay ce1913a76f Use new vcenter simulator container location.
(cherry picked from commit 1d5c933ecf)
7 years ago
Abhijeet Kasurde 6030535917
VMware: Set default network type as 'dhcp' (#38755)
If user does not specify any network type then set network type
to dhcp. There are additional checks around 'ip', 'netmask' and
'type' in network spec.

Fixes: #38466

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
(cherry picked from commit 9b139baacb)
7 years ago
Trishna Guha 91c8a8dccc
nxos_igmp_snooping fix cherry-pick (#38596)
* fix nxos_igmp_snooping issues (#38566)

* fix nxos_igmp_snooping issue

* shippable error fix

(cherry picked from commit ed42331105)

* update nxos changelog

Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>
7 years ago
John R Barker 96efaa3ff3
Explicitly exclude W504 (#38539) (#38550)
pycodestyle 2.4 has changed the default for W504
(cherry picked from commit 38491fe93d)
7 years ago
Trishna Guha 7f55954cc1
nxos_igmp and nxos_hsrp fix (#38513)
* fix nxos_igmp issues (#38496)

(cherry picked from commit 361437b042)

* fix nxos_hsrp issues (#38410)

* fix nxos_hsrp issues

* shippable fix

* add examples for md5 auth

(cherry picked from commit dabe5e6d07)

* update changelog

Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>
7 years ago
Jordan Borean 7e621b3dbe
win_uri: backport 2.5 fix for when status codes are provided as a comma separated list (#38509)
* fix for when status codes are provided as a comma separated list (#38080)

* fix for when status codes are provided as an array of strings

* convert status codes to int, additional tests

(cherry picked from commit c38617a736)

* Added changelog fragment
7 years ago
Jordan Borean 3ac6c6ebd9
win_exec_wrapper: fix tests after recent change (#38504) (#38506)
(cherry picked from commit 0d374f28d2)
7 years ago
Adrian Likins 31e28a04a5 Fix 'New Vault password' on vault 'edit' (#35923) (#38003)
* Fix 'New Vault password' on vault 'edit'

ffe0ddea96 introduce a
change on 'ansible-vault edit' that tried to check
for --encrypt-vault-id in that mode. But '--encrypt-vault-id'
is not intended for 'edit' since the 'edit' should always
reuse the vault secret that was used to decrypt the text.

Change cli to not check for --encrypt-vault-id on 'edit'.

VaultLib.decrypt_and_get_vault_id() was change to return
the vault secret used to decrypt (in addition to vault_id
and the plaintext).

VaultEditor.edit_file() will now use 'vault_secret_used'
as returned from decrypt_and_get_vault_id() so that
an edited file always gets reencrypted with the same
secret, regardless of any vault id configuration or
cli options.

Fixes #35834

(cherry picked from commit 6e737c8cb6)
7 years ago
Jordan Borean 38a13f41cd
powershell: 2.5 backport display non-ascii characters in command outputs (#38365)
* powershell: display non-ascii characters in command outputs (#37229)

(cherry picked from commit 71e8527d7c)

* Added changelog fragment
7 years ago
John R Barker 4f0389ad4e
Backport/2.5/38386 (#38462)
* openssl_certificate: Handle dump() in check_mode (#38386)

Currently, when ones run the module in check_mode it tries to retrieve
values from the actual certificate generated in the generate() function.

Since in check_mode we call dump() without calling generate(), self.cert
is None, leading to self.cert.get_notBefore(), self.cert.get_notAfter()
and self.cert.get_serial_number() raising an error.

>  NoneType' object has no attribute 'get_notBefore'

The solution is to have two way to handle dump() method, whether its run
in check_mode=True or check_mode=False leading to different way the
information is retrieved.
(cherry picked from commit 99497ce54c)
7 years ago
David Newswanger f10b82c0d3
Add eos_smoke integration tests (#36957) (#38397)
* added eos_smoke tests

* removed left over file

* added note to uncomment broken eapi test when #36919 is fixed

* uncommented fixed test, added unbecome test

* skip become tests when connection=local

(cherry picked from commit 712d30f46c)
7 years ago
David Newswanger f25eea16e6
added junos_smoke tests (#37216) (#38396)
* added junos_smoke tests

* enable check mode test

* fix check mode test

(cherry picked from commit 0bd2cd4394)
7 years ago
David Newswanger cbeadb2c9a
added iosxr_smoke (#37828) (#38395)
* added iosxr_smoke tests

* finalized netconf tests

* cleaning up files

(cherry picked from commit 38fa1d0b15)
7 years ago