Commit graph

5467 commits

Author SHA1 Message Date
Matt Clay
70c011481a Rebalance shippable/posix/ CI groups.
(cherry picked from commit 33b34f5c82)
2018-10-09 18:54:41 -07:00
Matt Clay
8d86820308 Reduce noise in docs-build test failures.
(cherry picked from commit 4085d01617)
2018-10-09 18:54:41 -07:00
Matt Clay
116554bee3 Fix ansible-test docker python version handling.
This removes the old name based version detection behavior and
uses versions defined in the docker completion file instead, as
the new containers do not follow the old naming scheme.

(cherry picked from commit 54937ba784)
2018-10-09 18:54:41 -07:00
Matt Clay
ab2f54d864 Fix integration test library search path.
This prevents tests from loading modules outside the source tree,
which could result in testing the wrong module if a system-wide
install is present, or custom modules exist.

(cherry picked from commit d603cd41fe)
2018-10-09 18:54:41 -07:00
Matt Clay
441dfd4cbe Bug fixes and cleanup for ansible-test. (#45991)
* Remove unused imports.
* Clean up ConfigParser usage in ansible-test.
* Fix bare except statements in ansible-test.
* Miscellaneous cleanup from PyCharm inspections.
* Enable pylint no-self-use for ansible-test.
* Remove obsolete pylint ignores for Python 3.7.
* Fix shellcheck issuers under newer shellcheck.
* Use newer path for ansible-test.
* Fix issues in code-smell tests.

(cherry picked from commit ac492476e5)
2018-10-09 18:54:41 -07:00
Matt Clay
d779f25fa1 Add python.py coverage injector for ansible-test.
This can be used to run Python scripts from the repository with the
correct interpreter and allow collection of code coverage.

Useful for testing contrib inventory scripts.

(cherry picked from commit 45b5685037)
2018-10-09 18:54:41 -07:00
Matt Clay
f5c9977771 Improve error handling for docs-build test.
(cherry picked from commit 2148999048)
2018-10-09 18:54:41 -07:00
Matt Clay
d2eb4c59d3 Improve ansible-test match error handling.
(cherry picked from commit 2056c981ae)
2018-10-09 18:54:41 -07:00
Dag Wieers
3dbb029f18 Fix incorrect use of subprocess.CalledProcessError (#45890)
(cherry picked from commit 24dd87bd0a)
2018-10-09 18:54:41 -07:00
Matt Clay
2fbee1d183 Support comments in ansible-test flat files.
(cherry picked from commit 5a3000af19)
2018-10-09 18:54:41 -07:00
Matt Clay
30250f34ea Make ansible-test available in the bin directory. (#45876)
(cherry picked from commit f3d1f9544b)
2018-10-09 18:54:41 -07:00
Matt Clay
73cfb88d0f Block network access for unit tests in docker.
(cherry picked from commit 99cac99cbc)
2018-10-09 18:54:41 -07:00
Matt Clay
96ab73a874 Minor fixes for unit test delegation.
(cherry picked from commit be199cfe90)
2018-10-09 18:54:41 -07:00
Matt Clay
6870700a23 Run unit tests in parallel. (#45812)
(cherry picked from commit abe8e4c9e8)
2018-10-09 18:54:41 -07:00
Matt Clay
f46998e0bd Fix ansible-test unit test execution. (#45772)
* Fix ansible-test units requirements install.
* Run unit tests as unprivileged user under Docker.

(cherry picked from commit 379a7f4f5a)
2018-10-09 18:54:41 -07:00
Matt Clay
da79fdf998 Fix unit test parametrize order on Python 3.5.
(cherry picked from commit 53b230ca74)
2018-10-09 18:54:41 -07:00
Matt Clay
623cafb709 Fix unit tests which modify the source tree. (#45763)
* Fix CNOS unit test log usage.
* Use temp dir for Galaxy unit tests.
* Write to temp files in interfaces_file unit test.
* Fix log placement in netapp_e_ldap unit test.

(cherry picked from commit 0686450cae)
2018-10-09 18:54:41 -07:00
Jordan Borean
d5a84098a8 add support for opening shell on remote Windows host (#43919)
* add support for opening shell on remote Windows host

* added arg completion and fix sanity check

* remove uneeded arg

(cherry picked from commit 6ca4ea0c1f)
2018-10-09 18:54:41 -07:00
Sloane Hertel
46f189d937 Fix and re-enable sts_assume_role integration tests (#46026)
* Fix the STS assume role error message assertion when the role to assume does not exist.

(cherry picked from commit 18dc928e28)
2018-09-28 08:51:51 -07:00
Daniel Speichert
6e90277c69 [stable-2.6] Migrate from MySQLdb to PyMySQL (#40123)
* Migrate from MySQLdb to PyMySQL

* Deduplicate driver loading and failure message

* Explain requirements

* Apply requirements docs change to proxysql too

* Add changelog.
(cherry picked from commit d34cf93f1a)

Co-authored-by: Daniel Speichert <DSpeichert@users.noreply.github.com>
2018-09-25 16:19:51 -07:00
Matt Martz
e7740b80fd [stable-2.6] [stable-2.7] Fix logic to not re-download existing files when force=no (#45495) (#45509)
* [stable-2.7] Fix logic to not re-download existing files when force=no (#45495)

* Fix logic to not re-download existing files when force=no. Fixes #45491

* Reduce logic complexity.
(cherry picked from commit 5785de582f)

Co-authored-by: Matt Martz <matt@sivel.net>

* Backport of get_url fix cannot use result

result was only added in 2.8+.
(cherry picked from commit 99171a9c6f)

Co-authored-by: Matt Martz <matt@sivel.net>
2018-09-25 15:57:46 -07:00
Sloane Hertel
0be82f2b08 [2.6] ec2_group: fix regression for targets that are a list containing strings and lists (#45748)
* Fix targets that may be a list containing strings and lists which worked prior to 2.6.

(cherry picked from commit 450fb9f855ae7090acbdea3e726082d4038994f8)

* Add ec2_group integration tests for lists of nested targets

(cherry picked from commit 14e3399db162c7ddaa9cb9aa6c8a476471a376c2)

* changelog

(cherry picked from commit fb17db0876d75cb629a0ed180ead1058e15a737b)
2018-09-25 15:34:04 -07:00
Sloane Hertel
e889001b3a Remove placeboify from unit tests that are not calling AWS (i.e. creating a recording) (#45754)
(cherry picked from commit 2167ce6cb6)
2018-09-25 15:27:47 -07:00
Matt Martz
e0e266d070 [stable-2.6] Ensure loop with delegate_to can short circuit the same as without delegate_to. Fixes #45189 (#45231).
(cherry picked from commit 2ac647def8)

Co-authored-by: Matt Martz <matt@sivel.net>
2018-09-25 14:49:52 -07:00
Sloane Hertel
daac0514ef [aws unit test utils] only create a recordings directory when the env var is set (#45752)
* Only create placebo recording test directories when the environment variable PLACEBO_RECORD is set
(cherry picked from commit 5467ac3454)
2018-09-25 14:45:29 -07:00
Nilashish Chakraborty
66de502798 Backport 2.6: Return correct version on installed VyOS (#39115) (#45714)
* Return correct version on installed VyOS (#39115)

* Return correct version on installed VyOS

Previously existing regexp will shows only "VyOS" without numeric output of router version.
For example: from  "Version:      VyOS 1.1.6" only VyOS will be written in ansible_net_version variable
For more informative output numeric value should be returned as well

* Fixed unittests

(cherry picked from commit 235b11f681)

* Added changelog
2018-09-25 14:37:21 -07:00
Felix Fontein
1a14c50ab7 Fixing HTTPError case of fetch_url for Python 3 compatibility. (#45628)
* Fixing HTTPError case of fetch_url for Python 3 compatibility.

* Adding unit test.

* PEP8.

* Changelog.
2018-09-25 14:34:05 -07:00
Matt Martz
268beeb9f9 [stable-2.6] Support nested JSON decoding in AnsibleJSONDecoder (#45924)
* Support nested JSON decoding in AnsibleJSONDecoder

* Add tests for vault portion of AnsibleJSONDecoder
(cherry picked from commit c0915e2)

Co-authored-by: Matt Martz <matt@sivel.net>
2018-09-25 14:15:44 -07:00
Jordan Borean
cd8208a4aa win_say - fix up syntax and test issues (#45450)
(cherry picked from commit c9c141fb6a)
2018-09-25 14:07:37 -07:00
Jordan Borean
e750df9c8a fix Ansible.ModuleUtils.FileUtil to respect ErrorAction if running in a try/catch (#45451)
(cherry picked from commit d4ce1b9f31)
2018-09-25 14:06:47 -07:00
Jordan Borean
0b39c66db7 powershell: do not quote join_path result to reflect ShellBase join_path (#45944)
(cherry picked from commit 198423d6fb)
2018-09-25 14:04:20 -07:00
Jordan Borean
520a2bf89a reordered windows test groups for better efficiency (#45445)
(cherry picked from commit 25ae4f2b73)
2018-09-25 13:45:39 -07:00
Jordan Borean
1565eabe3e go back to FreeBSD 11.1 for tests due to 11.2 stability issues (#45872)
(cherry picked from commit a7d372c3ba)
2018-09-25 13:44:54 -07:00
Jordan Borean
9b5dd1ead3 append AWS region to test instance file (#45877)
(cherry picked from commit 582a4dfa13)
2018-09-25 13:44:42 -07:00
Jordan Borean
ffe364dd5d add skip/docker alias to skip tests when running on Docker (#45955)
* add skip/docker alias to skip tests when running on Docker

* changed warning message wording

(cherry picked from commit 27c10fa502)
2018-09-25 13:44:26 -07:00
Jordan Borean
312b821501 skip installing linux-image-extra in CI as it shouldn't be needed (#46101)
(cherry picked from commit 40379b76b1)
2018-09-25 13:44:04 -07:00
Matt Clay
35bbcd737a Update RHEL and FreeBSD versions used for tests:
- RHEL 7.4 -> 7.5
- FreeBSD 11.1 -> 11.2

(cherry picked from commit c50d6f1944)
2018-09-12 10:19:04 -07:00
Matt Clay
21c4eb8db5 Update default container to version 1.2.0.
(cherry picked from commit d478a4c3f6)
2018-09-11 18:02:51 -07:00
Matt Clay
cadccbe323 Reduce cost of Azure DB tests.
(cherry picked from commit ed49f37957)
2018-09-11 18:02:51 -07:00
Matt Clay
864ddbdb5c Fix ACI unit test on Python 3.7.0.
The previous logic was only needed for pre-release versions of 3.7.

(cherry picked from commit c0bf9815c9)
2018-09-11 18:02:51 -07:00
Matt Clay
e4bbc1d711 Remove obsolete default container.
(cherry picked from commit 4173a30941)
2018-09-05 19:21:27 -07:00
Matt Clay
93ec05dd53 Switch default test container to quay.io.
(cherry picked from commit 3f8edb440a)
2018-09-05 19:21:27 -07:00
Matt Clay
8dfb5c08ed Fixes for ansible-test sanity import test. (#45249)
* Fix import test on Python 3.7.
* Fix path processing in import sanity test.

(cherry picked from commit 6fb333faff)
2018-09-05 19:21:27 -07:00
Matt Clay
37f730790e Fix ansible-test virtualenv use in import test.
(cherry picked from commit 998badbda5)
2018-09-05 19:21:27 -07:00
Matt Clay
e4c96f11f5 Update test constraints. (#44975)
- Limit virtualenv version on Python 2.6.
- Limit pyopenssl version on Python 2.6.
- Pin pyfmg version to keep unit tests passing.

(cherry picked from commit b3a3e8ba7b)
2018-09-05 19:21:27 -07:00
Matt Clay
21f287e0b9 Flush output from timing script.
(cherry picked from commit 771768966f)
2018-09-05 19:21:27 -07:00
Matt Clay
bfa38a1d28 Add seccomp support to ansible-test.
(cherry picked from commit c1173a2aec)
2018-09-05 19:21:27 -07:00
Matt Clay
c8887aa47f Get packages for dnf and yum tests from S3.
(cherry picked from commit 22d5f5d97f)
2018-09-05 15:26:40 -07:00
Trishna Guha
7b840f3fe5 Pick 2.6 nxos bugfixes (#44105)
* Add md5sum check in nxos_file_copy module (#43423)

* Add md5sum check in nxos_file_copy module

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

* address review comment

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

* nxos_vlan refactor to support non structured output (#43805)

* nxos_vlan refactor to support non structured output

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

* unittest fix

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

* minor fixes

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

* use check_rc

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

* address review comment

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

* remove additional return statement

* address Nate's review

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

* nxos_facts test lldp feature and fix nxapi check_rc (#44104)

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

* nxos bugfix 2.6 changelog

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

* nxos_interface port-channel idempotence fix for mode (#44248)

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

* changelog

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

* check_mode in nxos_static_route module (#44252)

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

* changelog nxos_static_route

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

* nxos_linkagg mode fix (#44294)

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

* changelog nxos_linkagg

* nxos_system idempotence fix (#44752)

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

* nxos_system changelog

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

* use retry_json nxos_banner (#44376)

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

* nxos_banner changelog

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

* fix Python 2.6 regex bug terminal plugin nxos, iosxr (#45135)

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

* terminal plugin changelog

Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>
2018-09-04 15:56:57 -07:00
Brian Coca
b0678e71a8 fix no log templating (#44506)
* fix tempating issues with no_log and loops (#44468)

* fix tempating issues with no_log and loops

 - task is no log if any item is
 - added test cases

fixes #43294

(cherry picked from commit bda074d34e)

* use play context to avoid bug when jinja2+py3
2018-09-04 15:48:21 -07:00
Monty Taylor
499ddeadd5 Backport package manager detection fixes to stable 2.6 (#44415)
* Fix pkg_mgr_name fact finding for Fedora (#40922)

* Properly handle default package manager vs apt

For distros where apt might be installed but is not the default
package manager for the distro, properly identify the default distro
package manager during fact finding and re-use fact finding from
DistributionFactCollector and instead of reimplementing small
portions of it in PkgMgrFactCollector

Add unit test to always check the apt + Fedora combination to test
the new code.

Fixes #34014

Signed-off-by: Adam Miller <admiller@redhat.com>

* remove q debugging output I accidentally left behind

Signed-off-by: Adam Miller <admiller@redhat.com>

* add os_family to the conditional so we're only hitting that code path when needed

Signed-off-by: Adam Miller <admiller@redhat.com>

* setup for a _check* pattern for general os_family group pkg_mgr checking

Signed-off-by: Adam Miller <admiller@redhat.com>

* use Mock.patch decorator for os.path.exists in TestPkgMgrFactsAptFedora

Signed-off-by: Adam Miller <admiller@redhat.com>

* fix fedora version dnf fact, default pkg_mgr detection per distro family (#43261)

* fix fedora version dnf fact, default pkg_mgr detection per distro family
* loop over possible dnf/yum paths in case there are multiple canonical sources later in life

Signed-off-by: Adam Miller <admiller@redhat.com>

* pkg_mgr: fixed apt_rpm detection (#43769)

Instead of checking the distribution name (which apparently is tricky to find out)
check if /usr/bin/apt-get is managed by RPM.

Fixes #43539

* Ensure that apt is always chosen on debian/ubuntu

One can install alternate packages managers on debuntu machines.
However, doing so doesn't mean you want to suddenly start using them.

Add in a check similar to the fedora yum/dnf check that sets apt as the
pkg_mgr if the ansible_os_family is Debian.
2018-09-04 15:46:28 -07:00
Sam Doran
5a26560cca Properly un expire account on creation (#44174)
When creating a new account, check to see if the expiration parameter is negative and pass in the appropriate parameter. Since the negative integer passed into expires is converted to time.struct_time which in turn gets converted to a formatted time string when passed to the underlying command, a -1 or large negative number would result in passing a date before 1970-01-01 to the underlying command.

This had the opposite effect of creating an account with no expiration account resulting in a newly created account that was already expired, or just throwing an error on certain systems.

(cherry picked from commit df335d91b0)
2018-09-04 14:42:26 -07:00
Toshio Kuratomi
2ee3786d9d [stable-2.6] Fix another corner case of too many warnings for world readable current working directory
There should be no warning if there is no ansible.cfg file i nthe
current working directory.
(cherry picked from commit f46c943)

Co-authored-by: Toshio Kuratomi <a.badger@gmail.com>
2018-09-04 14:40:04 -07:00
Samer Deeb
d7a7295c81 issue:43021 add support for onyx version 3.6.6000 and above (#44527)
* issue:43021 add support for onyx version 3.6.6000

Signed-off-by: Samer Deeb <samerd@mellanox.com>

* issue:43021 add support for onyx version 3.6.6000

Signed-off-by: Samer Deeb <samerd@mellanox.com>

(cherry picked from commit a07af2a1f7)
2018-09-04 14:37:33 -07:00
Rafael
f7f6d47c7e Backport/2.6/44568 (#44728)
* fixes parameters via environment variables, issue #44163

(cherry picked from commit 2c84022b200e943af80c89b2214b6192ae3d4991)

* including test case using environment variables as per issue #44163

(cherry picked from commit eaaada25c72de7b03de2c3d63ae882107b277f24)

* including missing environment variable in shared documentation fragement, related to issue #44163

(cherry picked from commit e97d2e7ed151e2633d5cd149d4a7e3b0e3151d41)

* added changelog

* yml fix
2018-09-04 14:28:53 -07:00
Jordan Borean
c86794ace2 win_psexec: fix arg handling when command contains multiple args (#44797)
(cherry picked from commit 9d91607754)
2018-09-04 14:03:09 -07:00
Dag Wieers
35829fd3ed Fix support for JSON output when charset is set 2018-09-04 13:51:25 -07:00
Matt Clay
545d0eda17 Remove obsolete test/utils/docker/ directory.
(cherry picked from commit 78bd020429)
2018-08-30 09:12:22 -07:00
Matt Clay
b6beac61a8 List quay.io images during Shippable run.
(cherry picked from commit a96a51b0c6)
2018-08-30 09:12:22 -07:00
Matt Clay
3cd045efd1 Switch distro test containers to quay.io images.
(cherry picked from commit 773c0982b0)
2018-08-30 09:12:22 -07:00
Matt Clay
25556f6c8c Fix change detection on retried Shippable jobs.
(cherry picked from commit c0aaf0fff7)
2018-08-30 09:12:22 -07:00
Matt Clay
f8cbb62358 Ignore CentOS 6.10 for passwordstore test.
(cherry picked from commit 18da873531)
2018-08-30 09:12:22 -07:00
Matt Clay
f8e742acee Restore repos after zypper_repository test runs.
This also allows the test to run on newer containers by not
manipulating any of the pre-configured repositories.

(cherry picked from commit cac51e6da8)
2018-08-30 09:12:22 -07:00
Matt Clay
e6761e54b9 Use runtime instead of datetime for test output.
(cherry picked from commit 31a5b874a1)
2018-08-23 14:13:36 -07:00
John R Barker
76392c3ddd inventory plugins: add test about config API usage (#41888) (#43040)
* inventory plugins: add test about config API usage (#41888)

* Check get_option method works with inventory plugins

This use case is already tested by some cloud inventoty plugin but
these tests are slow and aren't always executed, hence this new quick
test.

* AnsiblePlugin: Fix typo in docstring

(cherry picked from commit 06f5e49dfb)

* Update aliases
2018-08-13 17:23:10 -07:00
Toshio Kuratomi
dabd81deba [stable-2.6] Only print warning when ansible.cfg is actually skipped (#43583)
Only print warning when ansible.cfg is actually skipped

* Also add unittests for the find_ini_config_file function
* Add documentation on world writable current working directory
  config files can no longer be loaded from a world writable current
  working directory but the end user is allowed to specify that
  explicitly.  Give appropriate warnings and information on how.

Fixes #42388
(cherry picked from commit 30662bedad)

Co-authored-by: Toshio Kuratomi <a.badger@gmail.com>
2018-08-13 15:26:52 -07:00
Yuwei Zhou
d49240a619 Azure module bugfix backport (#43808)
* Fix nsg cannot add rule with  purge_rules false (#43699)

(cherry picked from commit 88a738b0ba)

* Create azure_securitygroup_fix_adding_rule.yaml

* azure_rm_loadbalancer_facts.py: list() takes at least 2 arguments fix (#29046) (#29050)

(cherry picked from commit d1d08304f9)

* azure_rm_deployment: collect tags from existing Resource Group (#26104)

(cherry picked from commit 6741e98c04)

* add change log
2018-08-13 15:22:00 -07:00
Jiri Tyr
7e835bf60a Fix for creation and removal of swap record in fstab (fixes #42706, #31437 and #30090) (#42837) 2018-08-13 13:34:26 -07:00
Shuang Wang
f33ec9fc0a fix issue [ get_url does not change mode when checksum matches ] (#43342)
* fix  #29614

* add change log for #43342

* Cleanup tests and add tests for this scenario


Co-authored-by: ptux
(cherry picked from commit 68683b4c73)
2018-08-13 13:30:09 -07:00
Sam Doran
4cbf048996 Only template values in vars_prompt rather than all vars (#39304)
This allows the use of variables in vars_prompt fields but allows variables entered in the prompt to affect play vars rather than throwing an undefined error.

Add tests for vars_prompt

(cherry picked from commit 6d38167d49)
2018-08-13 13:18:30 -07:00
Deepak Agrawal
9794e5b610 openvswitch_db : Handle column value conversion and idempotency in no_key case (#43914)
* openvswitch_db : Handle column value conversion and idempotency in no_key case (#43869)

* change column value to string. handle idempotency in no key case

* fix unit test failures in baseline

(cherry picked from commit 8eaebf86b6)

* change column value to string. handle idempotency in no key case
2018-08-10 17:07:01 -07:00
Matt Clay
71eabf134f Fix download URL for yum integration test.
(cherry picked from commit 3b693be80f)
2018-08-09 14:46:32 -07:00
Pilou
39182552ef improve 'service' integration tests (#43655)
* service tests: check that daemon is really running

(spoiler: it isn't)

* service tests: add PIDFile directive in systemd unit

* service tests: check 'changed' too

* service tests: fix indentation & use changed test

* service tests: #16694 has been fixed a long time ago

* service tests: refactor

- always execute cleaning tasks
- move tests tasks in a dedicated file

* service tests: add test for #42786

* service tests: display value of ansible_service_mgr

* service tests: allow to run tests twice in a row

stop & disable ansible test service

* service tests: 'pattern' value must be a substring

'pattern' parameter is poorly named

* service tests: check ansible_test service status

* service tests: test daemon must handle SIGHUP

because 'initctl reload' sends SIGHUP, otherwise test daemon stops when
receiving the signal

* service tests: remove upstart override file too

and check that files were removed using raw module and stat command

(cherry picked from commit c5f37f6bd6)
2018-08-09 10:41:54 -07:00
Felix Fontein
9ad21fbfb5 Forgot to include validations. 2018-08-01 14:14:03 -07:00
Matt Martz
ba801be6a6 Add AnsibleModule signature schema, and fix associated issues (#43512) (#43516)
* Add AnsibleModule signature schema, and fix associated issues (#43512)

(cherry picked from commit 01c0446cb5)

* Address additional module issues
2018-07-31 15:51:53 -07:00
Sam Doran
2267ba2f05 Only report change when home directory is different on FreeBSD (#42865)
* Only report change when home directory is different

Add tests with home: parameter

Have to skip macOS for now since there is a bug when specifying the home directory path for an existing user that results in a module failure. That needs to be fixed in a separate PR.

(cherry picked from commit 0ca61e9d87)
2018-07-26 17:41:59 -07:00
Andrey Laguta
a0138e5461 Fix multiple var files combining (followup to #36357)
(cherry picked from commit 2e62e36590)
2018-07-26 17:34:27 -07:00
Jordan Borean
3e9a390809 win_user: use different method to validate credentials that does not rely on SMB/RPC (#43059)
* win_user: use different method to validate credentials that does not rely on SMB/RPC

* Use Add-Type as SetLastError on .net reflection not working on 2012 R2

(cherry picked from commit 04431216e7)
2018-07-26 17:27:28 -07:00
Brian Coca
e84931b9c2 don't assume all delegation subkeys exist (#43032)
* don't assume all delegation subkeys exist

fixes #43026

* add tests

(cherry picked from commit cdc762dd9e)
2018-07-26 17:25:46 -07:00
Matt Clay
880882bfd4 Update Shippable integration test groups. (#43118)
* Update Shippable integration test groups.
* Update integration test group aliases.
* Rebalance AWS and Azure tests with extra group.
* Rebalance Windows tests with another group.

(cherry picked from commit 4e489d1be8)
2018-07-24 09:55:27 -07:00
Matt Clay
4b7925dfd4 Fix win_reboot test and mark win_uri unstable.
(cherry picked from commit 547f11ad8f)
2018-07-23 18:29:10 -07:00
Nathaniel Case
d9f5eb69d5 [2.6] Update ios tests (#42509) (#42516)
* [2.6] Update ios tests (#42509)

* 192.168.0.1/24 conflicts with management IP

* Images don't have the hostnames we expect
(cherry picked from commit 399d13d)

Co-authored-by: Nathaniel Case <this.is@nathanielca.se>

* ios test cleanup pt 2 (#42570)

* Remove local from ios_config to avoid needing to add provider

* ios_smoke should test all with local to pick up the slack

(cherry picked from commit 381263ad99)
2018-07-16 18:18:30 -07:00
Sam Doran
31a425d26c Fix pause module so it does not stack trace when redirecting stdout. (#42217)
* Use separate variables for stdin and stdout file descriptors

* Do not set stdout to raw mode when output is not a TTY

(cherry picked from commit 1d1595b990)
2018-07-16 18:03:18 -07:00
Julien Vey
9edd51928f efs_facts: improve performance by reducing the number of api calls (#36520)
* efs_facts: improve performance by reducing the number of api calls

* Remove efs_facts tests from running in CI
(cherry picked from commit 0f612d1b76)
2018-07-16 17:54:28 -07:00
Jordan Borean
69a36a3fa7 Fix remote_tmp when become with non admin user (#42396)
* Fix tmpdir on non root become

 - also avoid exception if tmpdir and remote_tmp are None
 - give 'None' on deescalation so tempfile will fallback to it's default behaviour
   and use system dirs
 - fix issue with bad tempdir (not existing/not createable/not writeable)
   i.e nobody and ~/.ansible/tmp
 - added tests for blockfile case

* Revert "Temporarily revert c119d54"

This reverts commit 5c614a59a6.

* changes based on PR feedback and changelog fragment

* changes based on the review

* Fix tmpdir when makedirs failed so we just use the system tmp

* Let missing remote_tmp fail

If remote_tmp is missing then there's something more basic wrong in the
communication from the controller to the module-side.  It's better to
be alerted in this case than to silently ignore it.

jborean and I have independently checked what happens if the user sets
ansible_remote_tmp to empty string and !!null and both cases work fine.
(null is turned into a default value controller-side.  empty string
triggers the warning because it is probably not a directory that the
become user is able to use).

(cherry picked from commit 8bdd04c147)
2018-07-16 17:53:06 -07:00
Jakub Libosvar
c3f2e4679c openvswitch_db: Make 'key' parameter optional (#42110)
The OVSDB schema consists of typed columns. The 'key' parameter is
required only for columns with type of a 'map'. This patch makes 'key'
an optional parameter to allow setting values for other column types
like int.

Fixes #42108

(cherry picked from commit 26b0908270)
2018-07-16 17:49:54 -07:00
Jordan Borean
f3570c2b0c win_reboot: fix 2.6 issues and better handle post reboot reboot (#42330)
* win_reboot: fix 2.6 issues and better handle post reboot reboot

* changed winrm _reset to reset

* Add handler to reset calls when .reset() throws an AnsibleError on older hosts

* Moving back to _reset to get the issue fixed

(cherry picked from commit 940d4a0e89)
2018-07-16 17:42:55 -07:00
jamessemai
9e706a3ed4 win_security_policy: Allow setting a value to empty (#42051)
* win_security_policy: allow removing values (resolves #40869)

* Removing warning

* Adding test for remove policy setting

* Fixing string comparison

* Make idempotent

* Adding idempotency and diff test

* added changelog fragment

(cherry picked from commit dc32842573)
2018-07-16 17:37:59 -07:00
Nilashish Chakraborty
8b26e3899f Fix ios_vlan issue CP into 2.6 (#42665)
* Make ios_vlan identify vlans starting with 9 (#42247)

* Make ios_vlan identify vlans starting with 9

* Add unit test for vlan id start with 9

(cherry picked from commit 70e33ef92c)

* Added changelog for ios_vlan fix

* Fixed changelog Shippable errors

* Fix 2 for Shippable changelog errors
2018-07-16 17:13:14 -07:00
Matt Clay
4b17adaf66 Temporarily switch RHEL and Windows tests to AWS.
(cherry picked from commit 11d0eb04ce)
2018-07-10 15:17:04 -07:00
Matt Clay
7968a84e4b Fix openshift integration test requirements.
(cherry picked from commit 2fbc2abf86)
2018-07-10 10:10:50 -07:00
Matt Clay
0c504ce2c4 Remove unwanted containers at CI job start.
(cherry picked from commit 528de5b82f)
2018-07-09 21:50:04 -07:00
Trishna Guha
edf933918d nxos and eos bugfix pick2.6 (#42291)
* fix nxos_vxlan_vtep_vni issue (#42183)

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

* nxos CI failures bugfix (#42240)

* fix nxos_portchannel and remove deprecated param in test

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

* fix _nxos_switchport CI failures

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

* fix nxapi nxos_command test

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

* remove unsupported param nxos_smoke test

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

* fix nxos_vxlan_vtep_vni

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

* syntax error

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

* Update eos_l2_interface.py (#42270)

(cherry picked from commit 51092c6ea5)

* add changelog

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

* Enforcing NXAPI default HTTP behavior (#41817)

* nxos_nxapi http default behavior

* Use nxos_nxapi module in prepare_nxos_tests

* Refactor nxos_nxapi configure test to use yaml block

* Extend nxos_nxapi https & http test cases

* Removed NXOS internal release naming

* Resolved ansibot sanity errors

* Fix typo in prepare_nxos_tests

* Address PR comments

* Shippable indicates this is no longer needed

* Add port change logic and testing

(cherry picked from commit db7300904d)

* update changelog

Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>
2018-07-09 11:31:57 -07:00
Sam Doran
3bec68a3b3 Backport #42013 for 2.6 - linenfile empty regexp warning (#42204)
* Add warning when using an empty regexp in lineinfile (#42013)

* Revert "Account for empty string regexp in lineinfile (#41451)"

This reverts commit 4b5b4a760c.

* Use context managers for interacting with files

* Store line and regexp parameters in a variable

* Add warning when regexp is an empty string

* Remove '=' from error messages

* Update warning message and add changelog

* Add tests

* Improve warning message

Offer an equivalent regexp that won't trigger the warning.
Update tests to match new warning.

* Add porting guide entry for lineinfile change

# Conflicts:
#	docs/docsite/rst/porting_guides/porting_guide_2.7.rst
#	lib/ansible/modules/files/lineinfile.py
#	test/integration/targets/lineinfile/tasks/main.yml

* Add porting guide info
2018-07-09 11:26:45 -07:00
John R Barker
56cca2a312 Allow documentation of module options type (#42285)
* Allow documentation of module options

Pass through the `type` of a modules option so it's displayed on the
html module docs

* docs

(cherry picked from commit d962611528)
2018-07-05 08:36:17 -07:00
Jordan Borean
1024f53ffd Win group membership sid refactor 2.6 (#41990)
* Refactor/fix win_group_membership to use SIDs for internal comparisons (#40725)

* refactor win_group_membership to use SIDs for comparisons instead of name parsing

* carry over previous doc cleanup changes

* remove trailing whitespace from docs

(cherry picked from commit bcb49f2575)

* Added changelog fragment
2018-07-03 15:21:21 -07:00
Kevin Breit
d2b447e8a1 Fixes idempotency check for partial configurations (#41941)
- Previous PR would overwrite new and existing values improperly

(cherry picked from commit 7ab3f755ce)
2018-07-03 14:55:43 -07:00
John R Barker
f2af5e0053 Fix some broken links (#42079)
* Fix some broken links

* We now only serve via https
* redirects don't work with anchors, so update those links (devel/dev_guide)

(cherry picked from commit e9dbebfa57)
2018-06-29 15:30:49 -07:00
Sam Doran
bd1ecd016b Backport #41767 for 2.6 - Skip if insertbefore is using BOF until later in the module (#41929)
* Skip if insertbefore BOF until later (#41767)

If a line match is found in the file and no regexp is specified, insertbefore would improperly try to add a line if set to BOF.

Add tests for this scenario.

(cherry picked from commit eaae1318f8)

* Add changelog fragment
2018-06-26 14:02:38 -07:00
Martin Krizek
f9c17f6337 Fix rabbitmq_* integration tests (#41836)
(cherry picked from commit a8d4bf8642)
2018-06-26 13:42:19 -07:00
Zim Kalinowski
701d61531c Fix broken Azure dependencies in 2.6 (#41946)
* fixed requirements
* module fix
* updated test accordingly
* mysql & postgresl fixes
* upgraded databases
* removed test from ignore.txt
* updated mysql & postgresql tests
2018-06-26 13:37:23 -07:00
Jordan Borean
25ad5fa225 Stop displaying kinit pass input on a failure (#41882)
* Stop displaying kinit pass input on a failure

* Fixed up minor logic info and added tests

(cherry picked from commit 9b7b564d75)
2018-06-25 13:51:09 -07:00
Nilashish Chakraborty
7cb2486fad Fix vyos_vlan aggregate issue & added tests (#41638)
* Fix vyos_vlan aggregate issue & Added tests

* Fix #2 for vyos_vlan aggregate issue

(cherry picked from commit 837c216587)
2018-06-21 18:36:51 -07:00
Andrew Gaffney
e3a1aef586 Fix wrong python keyword (followup to #36357) (#41067)
Also add tests around that code path
2018-06-21 18:19:41 -07:00
Brian Coca
88d0e2a04a fix minor issues with debug and item labels (#41331)
* fix minor issues with debug and item labels

 - no more `item=None`, we always have a label now
 - debug should only show expected information, either msg= or the var in var=
 - also fixed method name, deprecated misleading _get_item

(cherry picked from commit 27c43daab8)
2018-06-21 16:58:57 -07:00
Jordan Borean
9ce55f7e94 win_updates fix when win_updates is run with async (#41756)
(cherry picked from commit 11bd3fd318)
2018-06-21 16:13:47 -07:00
Kevin Breit
933ca5a41b Improved support for parameter testing and checks for org_id (#41517)
(cherry picked from commit cccaf951fa)
2018-06-21 15:11:20 -07:00
Matt Clay
3030625d1f Disable remaining failing rabbitmq_* tests.
(cherry picked from commit 5880404151)
2018-06-21 13:51:29 -07:00
Matt Clay
79a415d4a0 Disable failing rabbitmq_plugin test.
(cherry picked from commit 00ab12dca2)
2018-06-21 12:53:53 -07:00
Matt Clay
ed5e619083 Temporarily disable gem test on osx.
Disabled due to lack of newer TLS version support on the test system.

(cherry picked from commit dce708e63e)
2018-06-19 17:01:43 -07:00
Markos Chandras
f58780fb28 facts: suse: Fix major version detection for SUSE (#41416)
When parsing the distribution files such as /etc/os-release, we extract
the full distribution version but not the major version. As such, the
ansible_distribution_major_version ends up being 'NA' whereas the
ansible_distribution_version contains the full version.

Before this patch we get this on openSUSE Leap 15

ansible -o localhost -m setup -a filter=ansible_distribution_major_version
localhost | SUCCESS => {"ansible_facts": {"ansible_distribution_major_version": "NA"}, "changed": false}

After this patch we get this

ansible -o localhost -m setup -a filter=ansible_distribution_major_version
localhost | SUCCESS => {"ansible_facts": {"ansible_distribution_major_version": "15"}, "changed": false}

This also fixes the Tumbleweed distribution test to report a proper
major version and also adds a test for openSUSE Leap 15.0 to avoid
potential future regressions.

Fixes: #41410
(cherry picked from commit 1737b7be3e)
2018-06-18 15:03:29 -07:00
Deepak Agrawal
ccf2d9c8cc conflict res after patching 2018-06-18 11:18:27 -07:00
Matt Davis
f9f368f123 skip winrm unit tests if winrm is not installed (#41596)
(cherry picked from commit b01779ad18)
2018-06-15 12:21:16 -07:00
Trishna Guha
09aae2e33d don't retrieve config in running_config when config is provided for diff (#41400)
* don't retrieve config in running_config when config is provided for diff

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

* fix for eos, nxos

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

* add integration test

Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>
(cherry picked from commit 8ab0d654f3)
2018-06-14 13:26:05 -07:00
Toshio Kuratomi
70f4f89178 Bkprt no log fix (#41452)
* no_log even when task_result doesn't provide key

 - now also checks task property
 - added reproducer to tests for unreachable status on item loop

(cherry picked from commit 336b3762b2)

* Add changelog entry for the no_log fix

(cherry picked from commit 5fdd101a3e)

* Tasks that are expected to fail need to begin with a special string

(cherry picked from commit a5fd86cf6d)
2018-06-13 14:45:06 -07:00
Deepak Agrawal
6cdc3ac057 iosxr_config crash if config has route-policy with multiple levels of… (#41490)
* iosxr_config crash if config has route-policy with multiple levels of 'ifelseif' and other caveats (#41091)

* diff in as-path-set or prefix-set

* fix caveat diff can not have last line with comma in prefix-set/as-path/community-set

* Simplify fix to include indentation before parse

* remove debugger

* route-policy diffs

* fix iosxr_config crash issue

* new changes in iosxr_config after git add

* end-policy-map and end-class-map are properly indented so match misplaced children only when end-* is at the beigining also fix pep8

* Remaining config blocks of route-policy which needs exclusion from diff. added new tests

* pylint/pep8 warnings

* Review comments , sanity test fix

* shbang warning

* remove unused import

(cherry picked from commit 2db6a8c26a)

* changelog entry

* sanity fix
2018-06-13 14:43:18 -07:00
Matt Clay
2ef929029d Disable failing acme_account integration test.
(cherry picked from commit d6ba139713)
2018-06-12 18:12:41 -07:00
Will Thames
6c505e9ef1 cherry-picked from 46886f8249 and fixed merge conflicts
Test case for missing permissions

Update aws_s3 module to latest standards

Use AnsibleAWSModule

Handle BotoCoreErrors properly

Check for XNotImplemented and NotImplemented exceptions for S3 drop-ins

Don't prematurely fail if user does not have s3:ListBucket permission

Allow S3 drop-ins to ignore put_object_acl and put_bucket_acl
2018-06-08 09:50:17 -07:00
Yuwei Zhou
ca992f5aba Fixes #39648 azure_rm_virtualnetwork not handling DNS settings properly on existing virtual networks (#40646)
* check nullable

* add test

* fix

* fix

(cherry picked from commit 7b9864776a)
2018-06-07 16:28:49 -07:00
Trishna Guha
3ed8300dff increase timeout for connection reset by peer issue with httpapi (#41224)
Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>
(cherry picked from commit 34e4071eca)
2018-06-07 16:19:51 -07:00
Kevin Breit
c87e26449a Backport/2.6/40856 (#41278)
* Changed request() to run json.loads() instead of module doing it
- Removed json.loads() from modules
- Removed some unreliable integration tests
- Removed self.function setting in construct_path()
-

(cherry picked from commit 0ba1e52bdd7d0d622ac7506172f743e01bc3f461)

* PEP8 changes

(cherry picked from commit 182979ffc493e7c3574f2cf67b4378a4d8603160)

* Remove debug line for push

(cherry picked from commit 5350dcf52cae7699601307d39e13d121d9bae317)
2018-06-07 16:15:10 -07:00
Sloane Hertel
c168cd482c cherry-picked from 89cea78e30 and fixed merge conflicts from restructuring the integration tests in devel
Fix async for aws_s3

Add a test that async is able to be used on aws_s3 tasks
2018-06-07 15:54:18 -07:00
Matt Martz
094c9e7a3d Revert #39365, improve error messaging (#41208)
* Revert " Update TaskInclude _raw_params with the expanded/templated path to file (#39365)"

This reverts commit 4b01b92cfe.

* Improve error messaging, catch error templating parent path

(cherry picked from commit c403f01971)
2018-06-07 15:53:25 -07:00
Jordan Borean
5417a373bc winrm: fix up unit tests (#41112)
(cherry picked from commit ad8e13e9f8)
2018-06-07 15:32:46 -07:00
Matt Clay
ddb60ce345 Implement new changelog generator.
(cherry picked from commit 70c475da6c)
2018-06-05 19:38:32 -07:00
Matt Davis
14acce0b44 pin azure deps to exact versions
* added warnings for newer-than-expected versions
* prevent passing both api_version and profile for newer clients
2018-06-05 18:20:45 -07:00
saichint
9823432ec3 fix nxos_snapshot issues (#41034)
* fix nxos_snapshot issues

* review comments

* doc change

(cherry picked from commit 6733bffd5d)
2018-06-05 09:19:29 -07:00
Nathaniel Case
e24743ff19 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)
2018-06-04 13:40:34 -07:00
Zhikang Zhang
e8d8fa4e1a Fix test-module failing to validate args (#41004)
* Fix test-module failing to validate args

The test-module pass a wrong argument _ansible_tmp cause the validation failed.
Change the argument _ansible_tmp to _ansible_tmpdir to fix this.

* Add a integration test for test-module.

Prior to this change, we don't have a test for test-module.

This change ensure the correctness of test-module script.
2018-06-04 13:38:19 -07:00
Fabian von Feilitzsch
65d96bf354 K8s dynamic collected changes (#40745)
* Move k8s modules to dynamic backend

* update required openshift version

* update -> patch

* use new dynamic client exceptions

* style

* guard urllib3 import

* guard ansibleerror import

* give more information about error cause

* format in variable

* style

* rename tests

* Search for provided kind in a few more places to match old behavior, properly handle failure

* make common code use fail instead of fail_json, to work for lookup plugins as well

* update docs

* move openshift_raw tests into k8s tests

* fix typo

* Use diff of response and resource to determine change, don't do any checking client-side before making requests

* remove duplicate yaml blocks

* Update porting guide for k8s module

* remove invalid doc refs

* If fuzzy searching finds a resource, update resource_definition to match proper kind and version

* remote unsupported openshift_raw variables

* properly check environment variables when determining auth method:
2018-05-31 13:32:42 -07:00
Nathaniel Case
cad351328d Search for macaddresses more stringently (#40901)
* Search for macaddresses more stringently

Fixes #40829

(cherry picked from commit e7afd3d378)
2018-05-31 13:18:15 -07:00
Sumit Jaiswal
42661ba459 Fix for updating the name in case of host record and network view and also display meaningful error in case of connection timeout (#40597)
* To fix following github issues 35774, 36574 and 39494

* To fix following github issues 35774, 36574 and 39494

* To fix following github issues 35774, 36574 and 39494

* To fix following github issues 35774, 36574 and 39494

* To fix following github issues 35774, 36574 and 39494

* To fix following github issues 35774, 36574 and 39494

* removed old_name new entry to make ui cleaner

* removed old_name new entry to make ui cleaner

* removed old_name new entry to make ui cleaner

* removed old_name new entry to make ui cleaner

* removed old_name new entry to make ui cleaner

* removed old_name new entry to make ui cleaner

* to resolve the bug 40709

* reslove shippable error

* reslove shippable error

* reslove shippable error

* reslove shippable error

* reslove shippable error

* reslove shippable error

* reslove shippable error

* reslove shippable error

* reslove shippable error

* to fix shippable nios automation error

* modified the name input parsing method

* modified the name input parsing method

* modified the name input parsing method

* modified the name input parsing method

* modified the name input parsing method

* modified the name input parsing method

* modified the name input parsing method

* modified the name input parsing method

* modified the name input parsing method

* shippable error fix

* shippable error fix

* shippable error fix

* shippable error fix

* shippable error fix

* review comment fix

* shippable error fix

* shippable error fix

(cherry picked from commit 81510970ae)
2018-05-31 13:10:55 -07:00
Nilashish Chakraborty
1ea5790f56 Fixes eos_logging idempotence issue #31862 (#40604)
* eos_logging idempotence fix

* fixed eos_logging idempotence issue

* Fixed pylint and pep8 errors

* Added tests for eos_logging & minor fix

* Removed q statements

(cherry picked from commit b9ea646839)
2018-05-31 10:01:03 -07:00
Nilashish Chakraborty
a3178a1153 Fixes ios_logging idempotency issues (#40701)
* Fixes ios_logging idempotency issues

* Added intergration tests & minor fixes

* Minor fixes in tests

* Minor fixes in tests #2

* eos_logging fixes after PR review

(cherry picked from commit a013cdc747)
2018-05-31 10:00:42 -07:00
Matt Martz
87a163064f
Backport #40833 for 2.6 - synchronize _remote_is_local (#40918)
* 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 16:53:50 -05:00
Matt Clay
b184e73b89 Fix FreeBSD package install in test setup.sh.
(cherry picked from commit c3d3b6cedc)
2018-05-30 09:00:43 -07:00
Nathaniel Case
848327a6b5
Fix eapi tests to use become (#40838) (#40848)
* Fix eapi tests to use become (#40838)

* Return the expected prompt character based on become status

* Update eos_banner tests for eapi

* Update eos_config tests for eapi

* Update eos_facts tests for eapi

* Update eos_interface tests for eapi

* Update eos_l3_interface tests for eapi

* Update eos_lldp tests for eapi

* Update eos_logging tests for eapi

* Update eos_smoke tests for eapi

* Update eos_system tests for eapi

(cherry picked from commit 20f93816d6)

* Remove local from most eos tests now that provider is out
2018-05-30 09:56:31 -04:00
Trishna Guha
58f018e367
nxos and httpapi cherry-pick (#40859)
* httpapi fix nxos (#40806)

* httpapi fix nxos

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

* nxos_hsrp fix

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

* 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 (#40822)

* nxos_vlan fix

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

* uncomment mode test as nxapi now has get_capabilities

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

* Update nxos_install_os module (#40102)

* Add nxos_install_os integration tests

* Update call to check timers

* Update check_ansible_timer method

* Modify network_cli integration tests

* Add timer check for nxos_install_os

* Add comments for clear_persistent_sockets

* Update connection info for tests

* More updates

* Restructure files for provider and non-provider testing

* Update env var name and add check for ISSU switchover

(cherry picked from commit 9f026309a6)
2018-05-30 10:40:25 +05:30
Kevin Breit
e16490c9c0 [WIP] New module - meraki_admin (#39837)
New module - meraki_admin
2018-05-26 02:30:21 +02:00
Kevin Breit
d5b3ffc51e New module - meraki_snmp (#39882)
* Initial commit for meraki_admin module

* Initial commit for meraki_snmp module

* Update code to be operational for SNMP settings
- Add optional_ignore value to is_update_required for one-time fields
- Write documentation
- Perform checks and execute changes

* Minor fixes and test improvements
- Fix some documentation errors
- Implement and test for idempotency

* Removed meraki_admin which shouldn't be there, ansibot changes

* Rename params to be lower case
- Updated integration tests
- Changed CamelCase to lowercase and underscore

* Code cleanup changes based on comments from Dag.
2018-05-26 02:22:38 +02:00
Matt Clay
5838e88fa0 Fix timezone tests to restore timezone. 2018-05-25 17:13:05 -07:00
Ed Costello
c4536bc827 Support check mode in aws_ses_identity module (#38422)
* Port aws_ses_identity module to use AnsibleAWSModule

* Support Check Mode in aws_ses_identity

* Add tests for check mode

* Move feedback forwarding parameter check to before any changes are made.
2018-05-25 18:46:25 -04:00
Strahinja Kustudic
0781a7f68c Fixed check_mode status to be the same as normal execution (#40721)
* Fixed check_mode status to be the same as normal execution

* Now when setting the status to `disabled` in check_mode it correctly
returns the state changed and prints a warning like it does in normal
model. Before it always returned changed even if everything was set
correctly and a reboot was required.

* Add changelog entry


Co-authored by: Strahinja Kustudic <kustodian@gmail.com>
2018-05-25 17:06:11 -04:00
tranceitionalMynd
04e3c964fb Added executable parameter to the script module (#36969)
* Added interpreter parameter to the script module

* Let required and default parameters get documented implicitly for binary parameter

* Renamed interpreter parameter to executable
2018-05-25 14:40:48 -05:00
Yanis Guenane
496d10f7a8 Remove support for SSLv2 in test suite when not defined. (#39183)
When running the test test/units/module_utils/urls/test_open_url.py
test_open_url_no_validate_certs, the test fails because of the SSLv2
check.

Test is run on a machine using openssl 1.1.0g. By reading the openssl
man page[1], one can see that support for SSLv2 has been removed.

> Support for SSLv2 and the corresponding SSLv2_method(),
> SSLv2_server_method() and SSLv2_client_method() functions where removed
> in OpenSSL 1.1.0.
>
> SSLv23_method(), SSLv23_server_method() and SSLv23_client_method() were
> deprecated and the preferred TLS_method(), TLS_server_method() and
> TLS_client_method() functions were introduced in OpenSSL 1.1.0.

Hence this commit remove the uses of this flag when it is not defined.

[1] https://www.openssl.org/docs/man1.1.0/ssl/SSLv23_method.html
2018-05-25 12:50:19 -05:00
Strahinja Kustudic
de57fa71c1 Improve timezone module for none systemd Linux distributions (#38032)
* The module now correctly sets the timezone in both the config file and
in /etc/localtime; while hwclock is set in both the config and
/etc/adjtime.
* Module checks if the timezone is actually set by checking
/etc/localtime. Before it only checked if it was set in the config file.
* Fixed module not setting the timezone on RedHat systems if
/etc/localtime was a symbolic link.
* Fixed module failures in case of missing config files or incorrect data
in them.
* Added a lot of integrations tests to cover most of these situations.
2018-05-25 12:01:03 -05:00
Sloane Hertel
6fb128b235
Add elb_application_lb tests for modifying listeners (#40716) 2018-05-25 11:16:29 -04:00
jctanner
1d5fe326e8 Add a cloud provider and a set of smoketests for the NIOS modules (#40573)
* Add a cloud provider and a set of smoketests for the NIOS modules
2018-05-25 13:50:45 +01:00
Alex Stephen
362e622a4b New module: GCP Compute Disks (#38612) 2018-05-25 07:48:01 -04:00
René Moser
5dd3aa26ea
cs_instance: implement host migration support (#40309)
* cs_instance: implement host migration support

* fix build

* fail fast on update if user is not admin

* improve tests a bit

* expunge it

* fix typo

* disable temporarly verify for host on starting instance.
2018-05-25 11:20:04 +02:00