Commit graph

368 commits

Author SHA1 Message Date
Michael De La Rue
3c4db1e8dd Mdd psql user aws fix (#23988)
* postgresql_user module - transaction logic hacks to allow recovery from failed select

* postgresql_user - PEP8 and style fixes to make debugging easier

* postgresql_user - move password changing logic to separate function

* postgresql_user - trap failure in case where there is no access to pg_authid

* postgresql_user - further PEP8 fixes

* postgresql_user - Simplify password change logic and improve imports according to suggestions from PR review

* postgresql_user - Eliminate pep8/blank line errors introduced in merge

* Check behaviour when pg_authid relation isn't readable

TASK [postgresql : Normal user isn't allowed to access pg_authid relation:
      password comparison will fail, password will be updated] ***
An exception occurred during task execution. To see the full traceback,
use -vvv. The error was: psycopg2.ProgrammingError: permission denied
for relation pg_authid

* Don't reintroduce passlib, remove useless query
2017-07-07 09:28:31 -07:00
Rene Moser
89be01f2a2 cloudstack: cs_instance_nic: add integration tests 2017-07-07 16:50:57 +02:00
Dag Wieers
f8982dcbd0 wakeonlan: Add integration tests and improvements (#26254)
This PR includes:
- Checkmode improvements
- Integration tests
- A fix for python3
- PEP8 fixes

This backports improvements from the win_wakeonlan module.
2017-07-07 10:52:02 +01:00
Ricardo Carrillo Cruz
9a9b1db62b Enable vyos_linkagg integration tests and test with 3 NICs (#26519) 2017-07-07 10:40:18 +02:00
Ganesh Nalawade
ba60ac04fc Implementation of junos_static_route module (#26501)
* Implementation of junos_static_route module

*  junos implementation of net_static_route
*  integration test for junos_static_route
*  integration test for junos net_static_route

* Minor change

* Doc change

* Fix CI issue
2017-07-07 13:25:14 +05:30
René Moser
63f4aa3069 cloudstack: cs_host: add state maintenance (#26502) 2017-07-07 08:33:26 +02:00
Matt Clay
9e98140e2e Fix docker ce install for opensuse. (#26498)
* Fix docker ce install for opensuse.
* Revert "Temporarily disable docker_secret tests."
2017-07-06 13:26:43 -07:00
Matt Clay
97731a7d1b Temporarily disable docker_secret tests.
Will be re-enabled once opensuse tests are fixed.
2017-07-06 12:30:06 -07:00
Ganesh Nalawade
10233ef3b5 junos_user declarative module changes (#26475)
* junos_user declarative module changes

*  Active/Deactivate support
*  junos_user integration test
*  net_user intergration test for junos

* Add version_added for active param
2017-07-06 21:57:12 +05:30
Chris Houseknecht
6af53cf0ef Adds docker_secret module (#26469) 2017-07-06 09:22:04 -04:00
Ricardo Carrillo Cruz
c6c5c6cf81 Add VyOS integration tests for net_linkagg (#26478) 2017-07-06 11:25:15 +02:00
Ricardo Carrillo Cruz
c73275b4b8 Add vyos_linkagg module (#26418)
* Add vyos_linkagg module

* Add vyos_linkagg integration tests

* Fix pep8 issue

* Address several review comments
2017-07-06 10:07:48 +02:00
Matt Clay
c26a556929 Add check for known_hosts changing during tests. (#26470)
* Add check for known_hosts changing during tests.
* Don't use known hosts file for delegate_to test.
2017-07-06 00:47:28 -07:00
Matt Clay
2401fb5b92 Fix expect timeout test. (#26473) 2017-07-05 21:47:06 -07:00
Matt Clay
895e6c5d06 Fix wait_for with newer versions of psutil. (#26455)
* Add support for newer psutil versions.
* Fix psutil install in wait_for integration test.
* Fix test requirements for wait_for elapsed.
2017-07-05 19:00:13 -07:00
Brian Coca
2a041d10d2 better backwards compat handling of status
restored 'rc' inspection but only when failed is not specified
removed redundant changed from basic.py as task_executor already adds
removed redundant filters, they are tests
added aliases to tests removed from filters
fixed test to new rc handling
2017-07-05 21:44:00 -04:00
Matt Clay
cbb5d1e5d5 Update git test to not rm ~/.ssh/known_hosts. 2017-07-05 16:05:28 -07:00
Matt Clay
ef7f56c6e4 Revert "enabled vyos banner and config (#26438)"
This reverts commit b9b5183644.

Reverting this due to instability in vyos tests.
2017-07-05 14:37:19 -07:00
Matt Clay
e4096cc97a Use bc instead of sharutils in yum tests.
This allows the tests to pass on a stock RHEL 7.3 AMI.
2017-07-05 14:01:39 -07:00
David Newswanger
b9b5183644 enabled vyos banner and config (#26438) 2017-07-05 18:33:35 +01:00
Matt Davis
08af853ee9 fix win_shell/win_command nonzero RC failure setting (#26443)
* as a result of recent core engine changes to ignore rc, modules are responsible to set `failed` on nonzero RC if they want that behavior
* the `failed` filter currently triggers on nonzero RC, which caused the tests to false-pass
* updated tests to explicitly check both rc and failed keys, as well as using the failed filter.
2017-07-05 10:05:07 -07:00
Jordan Borean
8e9d04043a win_regedit: fix for same dword value (#26415) 2017-07-05 08:17:49 +10:00
Rene Moser
c92170e90d cloudstack: cs_instance: extent integration tests for ssh key handling 2017-07-04 15:58:21 +02:00
Trishna Guha
ad3fe08aae fix vyos_banner multiline string issue (#26383)
Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>
2017-07-04 14:31:18 +05:30
Matt Davis
0ee46cb0df converted become runas to explicit CreateProcessWithLogonW (#26378)
* fixes become_method: runas for unprivileged users
* sets permissions on tempdir appropriately
* allows automatic system environment generation for new token (old Process.Start way prevents this)
* add basic become runas tests
2017-07-03 17:46:27 -07:00
Brian Coca
8f758204cf correct, cleanup & simplify dwim stack (#25956)
* correct, cleanup & simplify dwim stack

latlh chIS logh HeS qar wej chel laD
better errors
update find_file to new exception

* addressed latest comments

* test should not use realpath as it follows symlink

this fails when on OS X as /var is now a symlink to /private/var
but first_found was not supposed to follow symlinks
2017-07-03 15:27:53 -04:00
Ganesh Nalawade
11e72d495d Add net_logging platform agnostic module and junos implementation (#26316)
* Add net_logging platform agnostic module and junos implemenatation

*  net_logging platform agnostic module
*  junos implemenatation of logging module
*  net_logging integration test
*  junos_logging integration test
2017-07-03 15:31:59 +05:30
Abhijeet Kasurde
5c374cd1ae Add Test Suite for vmware_vswitch (#26076)
Fix adds test suite for vwmare_switch

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2017-06-30 10:18:20 -04:00
Abhijeet Kasurde
69e55b2cfe Add testsuite for VMware Distributed vSwitch (#26193)
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2017-06-30 10:16:48 -04:00
Abhijeet Kasurde
28fcfcdbef Add testsuite for vmware cluster (#26281)
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2017-06-30 10:15:58 -04:00
Trishna Guha
93bbcd8a32 vyos_user fix idempotent (#26289)
Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>
2017-06-30 19:44:08 +05:30
Mike Wiebe
240de965ee Fix nxos_acl module and add IT tests (#25966)
* Fix nxos_acl module and add IT tests

* Add nxos_acl test

* Add additional properties to test
2017-06-29 14:55:08 -04:00
David Newswanger
9500aac5b9 added integration tests for dpkg_selections (#26043) 2017-06-29 15:53:42 +01:00
Ricardo Carrillo Cruz
8a1cd05fdc Assert vyos_user commands output against first element of array (#26233) 2017-06-29 13:51:13 +02:00
Ricardo Carrillo Cruz
c8ba8bdd6d Add ios_static_route module (#25527)
* Add ios_static_route module

* Add ios_static_route integration tests

* Add platform agnostic integration tests for IOS

* Replace unicode function to ansible module_utils to_text

* Add collections handling logic

* Add integration tests for collections

* Make collections and prefix mutually exclusive

* Add net_static_route integration tests for collections

* Do not store load_config return value, as it returns nothing
2017-06-29 12:05:20 +02:00
David Newswanger
5242ff1b59 added integration tests for rpm_key (#26134) 2017-06-29 09:46:42 +01:00
Ganesh Nalawade
911a7e085e Add active param to junos declarative modules (#26222)
*  active/deactivate configuration capability
*  integration test refactor
2017-06-29 10:18:35 +05:30
Trishna Guha
15e78d1073 fix iosxr_user integration test (#26220)
Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>
2017-06-29 09:20:12 +05:30
Jordan Borean
98fc54f02d win_find: fix for empty nested directories (#26164) 2017-06-29 07:06:10 +10:00
Dag Wieers
0a15ab7ce9 win_say: Fix issue, add integration tests (#26089)
* win_say: Fix issue, add integration test

This PR includes:
- Make speed_speech an integer parameter
- Test for empty parameters too
- Add integration tests

* Improve the $speech_speed parameter handling

As requested
2017-06-29 06:28:44 +10:00
David Moreau-Simard
9fdd07fba8 Provide the list of files that were included by include_vars
include_vars will now also return a key 'ansible_included_var_files'
which contains the list of files that were successfully loaded.
This is useful information and, amongst other things, a way for users
to know exactly what files were included when debugging their
playbooks.
This also allows us to improve the integration tests around
include_vars.
2017-06-28 15:25:45 -04:00
Dag Wieers
5be32aa5af Move ping and win_ping closer together (#26028)
So in an effort to verify if Windows modules are feature complete
compared to the python equivalent, I stumbled upon these differences.

This PR includes:
- Add missing 'data' option from documentation
- Simplify ping module
- Update integration tests to test exception
2017-06-28 11:08:04 -07:00
Trishna Guha
be11d12fa2 fix vyos_user integration test assert (#26185)
Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>
2017-06-28 16:17:03 +01:00
Dag Wieers
bb7ebc6a55 win_msg: Added integration tests, parameter fixes (#26126) 2017-06-28 10:35:38 +10:00
Abhijeet Kasurde
96dcd1060c Add testsuite for vmware_datacenter (#26133)
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2017-06-27 13:19:17 -04:00
Abhijeet Kasurde
79b2897462 Update vmware_guest_find module (#26066)
Fix updated following:
* Update Documentation
* Update Examples
* Find VM's folder using VM's UUID
* Make name as optional parameter

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2017-06-27 11:58:57 -04:00
Toshio Kuratomi
e238ae999b Cyptography pr 20566 rebase (#25560)
Make pyca/cryptography the preferred backend for cryptographic needs (mainly vault) falling back to pycrypto

pyca/cryptography is already implicitly a dependency in many cases
through paramiko (2.0+) as well as the new openssl_publickey module,
which requires pyOpenSSL 16.0+. Additionally, pyca/cryptography is
an optional dep for better performance with vault already.

This commit leverages cryptography's padding, constant time comparisons,
and CBC/CTR modes to reduce the amount of code ansible needs to
maintain.

* Handle wrong password given for VaultAES format

* Do not display deprecation warning for cryptography on python-2.6

* Namespace all of the pycrypto imports and always import them

  Makes unittests better and the code less likely to get stupid mistakes
  (like using HMAC from cryptogrpahy when the one from pycrypto is needed)

* Add back in atfork since we need pycrypto to reinitialize its RNG just in case we're being used with old paramiko

* contrib/inventory/gce: Remove spurious require on pycrypto

(cherry picked from commit 9e16b9db275263b3ea8d1b124966fdebfc9ab271)

* Add cryptography to ec2_win_password module requirements
  * Fix python3 bug which would pass text strings to a function which
    requires byte strings.

* Attempt to add pycrypto version to setup deps

* Change hacking README for dual pycrypto/cryptography

* update dependencies for various CI scripts

* additional CI dockerfile/script updates

* add paramiko to the windows and sanity requirement set

  This is needed because ansible lists it as a requirement. Previously
  the missing dep wasn't enforced, but cryptography imports pkg_resources
  so you can't ignore a requirement any more

* Add integration test cases for old vault and for wrong passwords

* helper script for manual testing of pycrypto/cryptography

* Skip the pycrypto tests so that users without it installed can still run the unittests

* Run unittests for vault with both cryptography and pycrypto backend
2017-06-27 06:00:15 -07:00
Matt Davis
36ad934156 re-enable non-pipelined mode for Powershell (#25012)
* fixes #23986
* fixes 3rd-party Windows connection plugins that don't support pipelining (eg awsrun)
2017-06-26 22:58:09 -07:00
Jordan Borean
b41c42cf0d win_share: Add integration tests and various fixes (#25691)
* win_share: Add integration tests and various fixes

* docs and comments updates based on PR review

* fixed up documentation issue with URL
2017-06-27 12:07:22 +10:00
Daniele Lazzari
9d932b64f0 New module: Add module to install/remove/register/unregiser windows powershell modules (windows/win_psmodule) (#23604)
* Add new windows module win_psmodule

* Add checkmode, allow_clobber parameter, integration tests

* Add aliases, replace win_raw with win_shell

* restore original test_win_group1.yml, add powershel version test

* fix var type

* add conditional on assert

* integration tests conditional tasks review

* documentation fix, test fix, adds result.change

* fix yml

* fix railing whitespace

* add nuget_changed and repository_changed in result
2017-06-26 23:01:38 +02:00