Commit Graph

1344 Commits (934b64519191b0df70495deecbb349532af48597)

Author SHA1 Message Date
rahushen 74947168e3 Add nxos_command IT and generalize UT (#26617)
* Add nxos_command IT sanity

* generalize nxos_command UT for different NXOS platforms
7 years ago
Mike Wiebe eae37ecf21 Add integration tests for nxos_acl_interface (#26616)
* Add integration tests for nxos_acl_interface
7 years ago
Ricardo Carrillo Cruz 6634f94323 First indentation of first task on prepare_eos_tests (#26706)
Hard to see what was going on :/
7 years ago
Ricardo Carrillo Cruz e618221a0f Split Eth1 and Eth2 configs of prepare_eos_tests (#26704)
Previous single block wasn't working for Eth2, despite not erroring
out.
7 years ago
Ricardo Carrillo Cruz efcdc68ad2 Set Ethernet2 to no switchport (#26703)
Missed this in earlier commit, otherwise eos_vrf tests fail.
7 years ago
Ricardo Carrillo Cruz 7ffa882f9d Fix provider indentation on prepare EOS ethernet pre step (#26694) 7 years ago
Ricardo Carrillo Cruz 59edc44166 Set no switchport on ethernet interfaces (#26693)
Otherwise this will silently make vrf tests to not work correctly.
7 years ago
Ricardo Carrillo Cruz cb59e61253 Fix enable ethernes (#26692)
Missing lines param
7 years ago
Ricardo Carrillo Cruz 8df175fa90 Make sure the Ethernet interfaces are up before running EOS tests (#26691) 7 years ago
Trishna Guha 2f60f97ee3 vyos_logging implementation module (#26654)
* vyos_logging implementation module

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

* vyos_logging integration test

Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>
7 years ago
Ricardo Carrillo Cruz 4ef47fe6c9 Switch eos_config save tests to use save_when (#26688)
Save seems broken, just use save_when since we are deprecating save.
7 years ago
Ricardo Carrillo Cruz 29347b7e80 Fix assert on eos_vrf integration test (#26686)
We need to check the session_name key is not in the dict, rather
than checking it has no value, otherwise the test fails.
7 years ago
Ricardo Carrillo Cruz 9f2d58f7b4 Fix eos_config config test (#26679)
We needed to re-register show-running config before doing the
idempotency test.
7 years ago
Ricardo Carrillo Cruz 4006b5d18f Replace Ethernet5 for Ethernet2 on eos integration tests (#26674)
In our CI, we only have 3 NICS: Management1, Ethernet1 and
Ethernet2.
7 years ago
Ricardo Carrillo Cruz 3f5736e14e Add vyos_l3_interface module (#26610)
* Add vyos_l3_interface module

* Add integration tests for vyos_l3_interface

* Add more corner cases in tests and fix multiple IPs logic
7 years ago
jctanner 10fc4417f7 vmware_guest: use the datacenter as a context for clone specs (#26511)
* Slight refactor on vmware_guest to fix path searching and vcsim compatibility.
* Clean up pep8 errors
* Fix more pep8 issues
* Add assertions
* Remove debug failure
* Update docsting for folder with examples
* Revise _get_vm_prop based on suggestions
* Implement folder walker to find a folder path
* More enhancements for datacenter->datacenter cloning
* Fix a few pep8 issues
* Remove useless check for subclass of None
* Fix a few suggestions
* Move serialize_spec to a util function
* Group exceptions together

Fixes #25011
7 years ago
Tomas Tomecek 5b898a7732 add connection plugin for buildah (#26170)
* add connection plugin for buildah

Signed-off-by: Tomas Tomecek <ttomecek@redhat.com>

* fixup

 * create a method to invoke buildah
 * mount container filesystem persistently so we can access it
   during put and fetch
 * use copyfile function for copying files

Signed-off-by: Tomas Tomecek <ttomecek@redhat.com>

* revert tests

Signed-off-by: Tomas Tomecek <ttomecek@redhat.com>

* fixup

Signed-off-by: Tomas Tomecek <ttomecek@redhat.com>

* progress

(this will be squashed into a single commit before merge)

 * add docs for the conn plugin
 * fix issue invoking the integration tests
 * add a way to invoke commands inside the container as a different user

Signed-off-by: Tomas Tomecek <ttomecek@redhat.com>

* fix shellcheck warning

Signed-off-by: Tomas Tomecek <ttomecek@redhat.com>
7 years ago
Dag Wieers e1e79b7a74 wakeonlan: Improve module coverage (#26655)
Trying to get this to 100% !
7 years ago
Rene Moser 64643c4e7d cloudstack: cs_iso: add cross_zone param 7 years ago
Rene Moser 31d530d6af cloudstack: cs_iso: add display_text param 7 years ago
Rene Moser 3dc379c89d cloudstack: cs_iso: add update support, fixes pep8 7 years ago
Ricardo Carrillo Cruz b81209c187 Fix multiple EOS EAPI code and test issues (#26651) 7 years ago
Ricardo Carrillo Cruz 9f02bb02bf Add missing test_items variable to eos_banner target role (#26645) 7 years ago
Ganesh Nalawade be89ef3eb6 junos_linkagg implementation and junos modules refactor (#26587)
* junos_linkagg implementation and junos modules refactor

*  junos_linkagg implementation
*  junos_linkagg integration test
*  net_linkagg integration test for junos
*  decouple `load_config` and `commit` operations,
   to allow single commit (in case on confirm commit) and
   to perform batch commit (multiple `load_config` followed by single
   `commit`)
*  Other related refactor

* Fix CI issues

* Fix unit test failure
7 years ago
Matt Clay 779306cfed Disable skipped tests for remote platforms. (#26624) 7 years ago
Matt Davis 961af6d9e2 disable new win_get_url test
* invalid drive letter breaks new Powershell path validation (this is a separate issue that needs to be solved)
* test also exposes a minor bug in win_get_url where a nonexistent directory in the root of a drive that exists passes the "does the parent dir exist" check and causes DownloadFile to bomb (this should be fixed by dag's rewrite of win_get_url in https://github.com/ansible/ansible/pull/26612)
7 years ago
Matt Clay 9604a71568 Fix postgresql test on RHEL. 7 years ago
John R Barker 738fb51c84 Add defaults for eos_system (#26593) 7 years ago
Trishna Guha b81882e2a8 vyos_static_route implementation module (#26426)
* vyos_static_route implementation module

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

* Add vyos_static_route implementation module

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

* unit test

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

* modify vyos_static_route

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

* integration test vyos_static and net_static_route

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

* fix typo integration test

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

* modify vyos_static_route

* modify integration test

* vyos_static_route doc build fix

* fix integration test data

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

* update net_static_route cli test set

* minor fix
7 years ago
Josh Moore d5ae6cc585 postgres_db: add dump and restore support (#20627)
* Feature #2731: added postgres import and dump

* Feature #2731: be more permissive of arguments

```
hacking/test-module -m ./ppostgresql_db.py -a "db=example state=dump target=/tmp/out"`
```

failed previously since host, user, and port were required as keywords
in the pg_dump / pg_import methods.

* Feature #2731: fixed doc string for validate-modules

```
$ ansible-validate-modules database/postgresql/
```

now passes.

* Feature #2731: disable 'password' for dump/restore

* Feature #2731: bump added version to 2.3

* Feature #2731: replace db_import with db_restore

* Feature #2731: add missing version description

* Feature #2731: fix 'state' description

* Feature #2731: fix pep8 issues

* Feature #2731: put state documentation in a single string

* Bump added version from 2.3 to 2.4

* Fix pep8 and pylint errors

* Attempt yaml formatting of documentation string

* Add integration tests for postgres_db:dump/restore

* Update dump/restore logic to support new kw-args

Also attempt to support password; integration tests are
still failing.

* Revert to postgres user for dump/restore

Passing PGPASSWORD is not working for subprocesses. For the
moment, reverting to the strategy of failing if login_password
is set and using `postgres` for all testing of dump/restore.

* Various cleanups to have tests passing

* Working tests for {sql,tar} x {,bz2,gz,xz}

* Use pg_user to support FreeBSD

* Revert login_ prefixes and re-enable password support

All `login_` keywords are mapped to their non-prefix versions
so the previous changes were effectively using `postgres` for
all actions. With the proper keywords, PGPASSWORD-passing to
the subprocess is now working.

* Optionally add password

environ_update doesn't handle None values in the
dictionary to be added to the environment. Adding
check.

* Quick fixes

* Refactor login arguments after fixes from pchauncey

The fixes introduced by pchaunchy pointed to further issues
(like no --dbname on PG<=9.2) with the login parameters. This
refactors them and adds further tests.

Note: this will still not pass integration tests due to a further
      issue with pg_dump as a non-admin user:

      pg_restore: [archiver (db)] Error while PROCESSING TOC:
      pg_restore: [archiver (db)] Error from TOC entry 1925; 0 0 COMMENT EXTENSION plpgsql
      pg_restore: [archiver (db)] could not execute query: ERROR:  must be owner of extension plpgsql

* Introduce target_opts for passing limiting dumped/restored schemas

The current integration tests (PG version and template DBs) don't
permit a regular user (`{{ db_user1 }}`) access to plpgsql causing
restores to fail. By adding an option for passing arbitrary args to
pg_dump and pg_restore, testing is made easier. This also paves the
way for `-j` usage, once the PG version is bumped.
7 years ago
jhawkesworth deae1499ed win_get_url improvements; allow dir for dest and helpful error if dest parent dir doesn't exist (#25453)
* win_get_url now allows dir for destination and gives helpful message if download parent dir does not exist

* fix yaml lint failure
7 years ago
Andrew Saraceni 7d3951d065 win_scheduled_task: Add enhanced run option support (#24174)
* add enhanced run option support for win_scheduled_task

* changed run_level option to runlevel

* correct merge conflicts since task path fix

* changed run_level option to runlevel

* changed do_not_store_password to store_password, and other minor fixes

* conditional logic swap, and documentation change for password
7 years ago
Dag Wieers 52c1a1936d win_wakeonlan: New module to send Wake-On-Lan packets (#26232)
This is the Windows implementation of the **wakeonlan** module.
Useful if you want to wake up systems in a remote network with only
Windows systems.
7 years ago
Matt Clay 941a32a632 Install passlib before starting lookups test. 7 years ago
Matt Clay f5edc840e2 Update docker_secret test for RHEL 7.3 on AWS. 7 years ago
Matt Clay 3cfbc17dc6 Fix yum installroot test releasever lookup.
With this change the tests will pass on a RHEL 7.3 AMI.
7 years ago
Andrea Tartaglia 0d48732e7e Integration tests requirements (#26545)
* Removed pexpect and jmespath requirement, install it in task directly
* Removed passlib dependency
7 years ago
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
7 years ago
Rene Moser 89be01f2a2 cloudstack: cs_instance_nic: add integration tests 7 years ago
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.
7 years ago
Ricardo Carrillo Cruz 9a9b1db62b Enable vyos_linkagg integration tests and test with 3 NICs (#26519) 7 years ago
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
7 years ago
René Moser 63f4aa3069 cloudstack: cs_host: add state maintenance (#26502) 7 years ago
Matt Clay 9e98140e2e Fix docker ce install for opensuse. (#26498)
* Fix docker ce install for opensuse.
* Revert "Temporarily disable docker_secret tests."
7 years ago
Matt Clay 97731a7d1b Temporarily disable docker_secret tests.
Will be re-enabled once opensuse tests are fixed.
7 years ago
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
7 years ago
Chris Houseknecht 6af53cf0ef Adds docker_secret module (#26469) 7 years ago
Ricardo Carrillo Cruz c6c5c6cf81 Add VyOS integration tests for net_linkagg (#26478) 7 years ago
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
7 years ago
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.
7 years ago
Matt Clay 2401fb5b92 Fix expect timeout test. (#26473) 7 years ago
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.
7 years ago
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
7 years ago
Matt Clay cbb5d1e5d5 Update git test to not rm ~/.ssh/known_hosts. 7 years ago
Matt Clay ef7f56c6e4 Revert "enabled vyos banner and config (#26438)"
This reverts commit b9b5183644.

Reverting this due to instability in vyos tests.
7 years ago
Matt Clay e4096cc97a Use bc instead of sharutils in yum tests.
This allows the tests to pass on a stock RHEL 7.3 AMI.
7 years ago
David Newswanger b9b5183644 enabled vyos banner and config (#26438) 7 years ago
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.
7 years ago
Yanis Guenane 05477412ba Enforce the _raw_params variable with include_role (#26430)
Currently, when using this test, it fails with the following error
message:

> AttributeError: 'NoneType' object has no attribute 'rfind'

This is because there is no _raw_params value for parent_include.args
here
https://github.com/ansible/ansible/blob/devel/lib/ansible/playbook/included_file.py#L104

This commit ensure the value is specified so it can be reused and hence
not fail at this specific line.
7 years ago
Jordan Borean 8e9d04043a win_regedit: fix for same dword value (#26415) 7 years ago
John R Barker 50f2313b47 Continue running network tests after failure (#26407)
Previously tests would stop running on the first failure.
With this PR we move onto running the tests for the next module. This
allows DCI runs to have a fuller picture of what's broken.

This only effects manual and DCI runs, it doesn't effect Shippable runs
as this the modules are tested directly.
7 years ago
Rene Moser c92170e90d cloudstack: cs_instance: extent integration tests for ssh key handling 7 years ago
Trishna Guha ad3fe08aae fix vyos_banner multiline string issue (#26383)
Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>
7 years ago
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
7 years ago
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
7 years ago
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
7 years ago
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>
7 years ago
Abhijeet Kasurde 69e55b2cfe Add testsuite for VMware Distributed vSwitch (#26193)
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
7 years ago
Abhijeet Kasurde 28fcfcdbef Add testsuite for vmware cluster (#26281)
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
7 years ago
Trishna Guha 93bbcd8a32 vyos_user fix idempotent (#26289)
Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>
7 years ago
Matt Clay 17c1bb6f08 Remove legacy integration test make targets. (#26255)
* Remove legacy integration test make targets.
* Remove incorrect role path from cloudscale test.
7 years ago
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
7 years ago
David Newswanger 9500aac5b9 added integration tests for dpkg_selections (#26043) 7 years ago
Ricardo Carrillo Cruz 8a1cd05fdc Assert vyos_user commands output against first element of array (#26233) 7 years ago
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
7 years ago
David Newswanger 5242ff1b59 added integration tests for rpm_key (#26134) 7 years ago
Ganesh Nalawade 911a7e085e Add active param to junos declarative modules (#26222)
*  active/deactivate configuration capability
*  integration test refactor
7 years ago
Trishna Guha 15e78d1073 fix iosxr_user integration test (#26220)
Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>
7 years ago
Jordan Borean 98fc54f02d win_find: fix for empty nested directories (#26164) 7 years ago
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
7 years ago
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.
7 years ago
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
7 years ago
Trishna Guha be11d12fa2 fix vyos_user integration test assert (#26185)
Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>
7 years ago
George Nikolopoulos 11836a0296 Add module netscaler_cs_action (#26147) 7 years ago
Trishna Guha 9a88c157ec add vyos, openvswitch to network-all playbook (#26167)
* add vyos to network-all playbook

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

* Add opensvwitch to network-all

Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>
7 years ago
Dag Wieers bb7ebc6a55 win_msg: Added integration tests, parameter fixes (#26126) 7 years ago
George Nikolopoulos 6bed831f8c Add netscaler_server module (#25537) 7 years ago
Abhijeet Kasurde 96dcd1060c Add testsuite for vmware_datacenter (#26133)
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
7 years ago
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>
7 years ago
Ricardo Carrillo Cruz 9f7fcf15be Add missing quote on limit_to vyos includes (#26139) 7 years ago
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
7 years ago
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)
7 years ago
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
7 years ago
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
7 years ago
Andreas Olsson 05dc76f3b2 In the git module let ssh do its own host checking
There are too many possible special cases for Ansible to be able to
precheck known_hosts files without introducing all kinds of false
failures.

* Alternative known_hosts paths
* Alternative host name aliases
* ssh host certificates
* SSHFP + DNSSEC

Fixes #24860
7 years ago
George Nikolopoulos 0bf64aa241 Add netscaler_save_config module (#25614) 7 years ago
mihu 6b76bc924f [cloud] New feature for ec2_group: allow deleting groups by id (#26022) 7 years ago
Rene Moser 3fe5de907f cloudstack: cs_host: add integration tests 7 years ago
Matt Clay 15beaed6bc Update FreeBSD pg test to use postgresql95-server.
The py-psycopg2 package now requires postgresql95-server instead of
postgresql93-server. Installing py-psycopg2 will automatically remove
postgresql93-server if it is installed, breaking integration tests.
7 years ago
Matt Clay b82cc8e7cc Fix network integration test config. (#26057)
* Remove unsupported network tests from CI.
* Add `net` to list of network target prefixes.
7 years ago
Trishna Guha 66f9e23e43 vyos net_system implementation (#25994)
Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>
7 years ago
jctanner 996dcb989c Add the cloud provider script for the vcenter simulator container (#25964) 7 years ago
Ganesh Nalawade b2f46753ec Add junos_system declartive module and other related change (#25859)
* Add junos_system declartive module and other related change

*  junos_system declartive module
*  integration test for junos_system
*  integration test for net_system (junos platform)
*  pep8 fixes for junos modules
*  move to lxml from elementree for xml parsing as it support
   complete set of xpath api's
*  other minor changes

* Fix CI and doc changes

* Fix unit test failures

* Fix typo in import

* Fix import issue for py2.6

* Add missed Element in import
7 years ago
Trishna Guha 947e9aba45 Add vyos_banner implementation module (#25862)
* Add vyos_banner implementation module

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

* vyos_banne integration test

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

* vyos_banner unit test

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

* minor fix on banner text

Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>
7 years ago
Steffen Neubauer 759750e661 Consul: make service_port optional in service definition, like specified in Consul docs (#21737)
* Consul: make service_port optional in service definition, Fixes #21727

* Remove consul module from legacy-files.txt

* consul: Pep8 fixes
7 years ago
Jordan Borean 6d01168238 win_acl_inheritance: Added tests and formatting improvements (#25382) 7 years ago
Jordan Borean c05d3c3821 win_owner: added tests and fixed up bool handling (#25088)
* win_owner: added tests and fixed up bool handling

* explicitly gathering facts in test

* Removed manualy entry in test group
7 years ago
Dag Wieers 0aba04fdad win_uri: Add integration tests, new functionality... (#25373)
This is a cleanup of the win_uri module to make it feature-complete.

This PR includes:
- Added check-mode support
- Add as many options from the uri module as possible
  - Added creates
  - Added follow_redirects
  - Added maximum_redirection
  - Added password
  - Added removes
  - Added return_content
  - Added status_code
  - Added timeout
  - Added user
  - Added validate_certs
- Fixed list-handling for comma-separated strings
- Added basic integration tests (should come from uri module)
7 years ago
David Newswanger ca16956337 added integration tests for apt upgrade (#25670)
* added integration tests for apt upgrade

changed version number for hello to 2.6 so that it works with Ubuntu 12.04

prevent tests from checking if aptitude is installed on non ubuntu systems

changed ordering on when statements for safe and full upgrade types so that the OS check happens before the aptitude check

added integration tests for apt upgrade

changed version number for hello to 2.6 so that it works with Ubuntu 12.04

* Moved additions to tasks/main.yml to make revisions easier. Changed tasks to multiline format
7 years ago
David Newswanger 1bc5761bea added integration tests for yum repository (#25671)
* added integration tests for yum repository

* fixed escaped single quote

* extended yum_repository tests to include fedora

* removed unused variable file

* added check for return values

* replaced escaped double quotes with single quotes, switched to lookup for reading repofile
7 years ago
Abhijeet Kasurde 7348a613bb Correct usage of fail_json in hg module (#25847)
Fix adds correct usage for fail_json and also adds
testcases to verify this.

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
7 years ago
Ganesh Nalawade 450263e934 Add junos_banner declartive module (#25826)
* Add junos_banner declartive module

*  junos_banner implementation
*  Integration test for junos_banner
*  Integration test for net_banner (junos)
*  Minor fixes

* Minor doc change
7 years ago
John R Barker 448efdb9e5 MySQL Password updates (#25825)
* MySQL Password updates

* Disable user_password_update_test
7 years ago
John R Barker 7ee7fa7332 Use stronger password for MySQL (#25821)
Previously we were getting "Your password does not satisfy the current policy requirements"
Possibly caused by a software update on Fedora
7 years ago
Ganesh Nalawade 2ff464c949 Add net_interface declarative module (#25766)
* Add net_interface declartive module

*  Add net_interface module
*  Add junos_interface implementation module
*  Other minor changes

* Add integration test

*  Integration test for net_interface
*  Integration test for junos_interface

* Fix CI failures

* Documentation changes
7 years ago
Ben Berry 1267567556 Check sysctl no name (#25041)
* add integration tests for no name on sysctl

* better error validation, add test for no value
7 years ago
Trishna Guha 41f6f8f410 Idempotent behaviour in ios_user integration test (#25774)
Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>
7 years ago
Trishna Guha 98269888a9 iosxr_banner Implementation module (#25744)
* Add iosxr_banner implementation module

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

* Integration test for iosxr_banner

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

* Unit test for iosxr_banner

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

* remove blank line pep8

Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>
7 years ago
Trishna Guha 44687bb917 Add iosxr_user implementation module (#25615)
* Add iosxr_user implementation module

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

* iosxr_user Integration test

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

* iosxr_user Unit test

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

* Modify integration test with idempotent case

Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>
7 years ago
Trishna Guha b3c22a96bd Add vyos_user implementation module (#25677)
* Add vyos_user implementation module

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

* Integration test for vyos_user

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

* Make state absent work

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

* Unit test for vyos_user

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

* Standardize user names

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

* Modify integration test with idempotent case

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

* Add role as alias to level

Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>
7 years ago
Trishna Guha 9c6ee8d0bb Add nxos_banner implementation module (#25695)
* Add nxos_banner implementation module

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

* nxos_banner integration test

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

* nxos_banner unit test

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

* doc update

Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>
7 years ago
Dag Wieers 1c9a570ffe win_timezone: Add diff support, integration tests (#25284)
* win_timezone: Add diff support, integration tests

This PR includes:

- Diff support
- Returns both previous_timezone and timezone
- Adds integration tests
- More examples
- Improved documentation

* Merged the changes from jborean93's PR
7 years ago
Jordan Borean d3352c5b49 win_tempfile: Added integration tests (#25069)
* win_tempfile: Added integration tests

* fixed up tests
7 years ago
Ganesh Nalawade b69c7f50d0 Add junos_vlan platform agnostic module (#25652)
* Add junos_vlan platform agnostic module

*  junos_vlan implementation

*  integration test for junos_vlan

* Minor fixes

* Fix Integration test failure
7 years ago
Andrew Saraceni 91e995d691 Allow win_scheduled_task to support adding and removing task paths (#24025)
* allows win_scheduled_task to support adding and removing task paths

* fix line length for documentation

* added integration tests for path creation and removal

* removing ability to remove TaskPath if a task isn't removed.  also removed superfluous line of code in Invoke-TaskPathCheck function
7 years ago
Dag Wieers bf43eb92f5 win_firewall: check-mode support, integration tests (#25127)
* win_firewall: check-mode support, integration tests

This PR includes:
- Check-mode implementation
- Documentation improvements
- Ensure module output is consistent (no matter what profiles are provided)
- Fixed indentation
- Cosmetic changes
- Integration tests

* win_firewall: check-mode support, integration tests

This PR includes:
- Check-mode implementation
- Documentation improvements
- Ensure module output is consistent (no matter what profiles are provided)
- Fixed indentation
- Cosmetic changes
- Integration tests
7 years ago
Ganesh Nalawade 343a709800 Fix platform agnostic net_user integration test fail (#25649)
* Fix platform agnostic net_user integration test fail

* Fix minor issue in eos integration test
7 years ago
Sloane Hertel 3f0c47196e [cloud] s3: deleting a nonexistent bucket should not give a traceback Fixes #25445 (#25487)
* trying to delete a nonexistent bucket should not fail

* Improve error handling for deleting s3 bucket

* Allow successful deletion

* Add test for deleting a nonexistent bucket

rename integration test target from s3 to aws_s3
7 years ago
Ricardo Carrillo Cruz 9725e056bc Add missing register on openvswitch_db integration tests (#25609) 7 years ago
Ricardo Carrillo Cruz 0dbea4575c Add assertions to openvswitch_db integration test (#25600)
* Add missing delegate_to on openvswitch_db integration test runner

* Add assertions to openvswitch_db integration test
7 years ago
Ricardo Carrillo Cruz 081e138cf1 Add missing delegate_to on openvswitch_db integration test runner (#25597) 7 years ago
Ricardo Carrillo Cruz c296fcb0e0 [WIP] Add openvswitch_db integration tests (#23803)
* WIP Add openvswitch_db integration tests

* Add  ovs.yaml playbook entrypoint for OVS

* Add test case pattern filtering

* Clear out aliases for now

Running tests on posix group just fails, containers do not have ovs
7 years ago
Abhijeet Kasurde b89cb95609 Fix spelling mistakes (comments only) (#25564)
Original Author : klemens <ka7@github.com>

Taking over previous PR as per
https://github.com/ansible/ansible/pull/23644#issuecomment-307334525

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
7 years ago
Pilou 460d932aa8 postgresql_user: fix bugs related to 'expires' option (#23862)
* Factorize tests related to no_password_change using an include task

* Refactor: deduplicate tasks

* postgresql_user: test 'expires' parameter

* Change 'valid until' even it's the only updated field

* value is changed when another value is provided

* value isn't returned when unset

* Remove unused variable

* psycopg2.extras.DictRow is able to handle comparison

* postgresql_user: simplify helper method

* postgresql_user: define variable just before using it

* Fix comparison between user input and applied configuration

* new test: adding an invalid attribute

* Refactor, add cleaning task

* Check that using same attribute a 2nd time does nothing

* Always try to remove created user

* postgresql_user: fix pep8
7 years ago
René Moser 0a972ea6bf wait_for: add some integration tests (#25553) 7 years ago
René Moser 29817ab115 cloudstack: add tests, fix pep8 (#25518)
* cloudstack: cs_zone: fix pep8

* cloudstack: cs_zone: add tests
7 years ago
Ricardo Carrillo Cruz 72e65e4290 Platform agnostic module for VRFs (#25383)
* WIP VRF platform agnostic module

* Fixed examples refering vlans instead of vrfs

* Add integration tests
7 years ago
Ricardo Carrillo Cruz d83f254bb6 New eos_vrf module (#25427)
* New eos_vrf module

* Add CLI integration tests

* Check rd only if not None
7 years ago
Trishna Guha 91e5fce90f Add ios_user implementation module (#25413)
* Add ios_user module

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

* Integration test for ios_user

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

* Add unit test for ios_user

Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>
7 years ago
Jordan Borean 89caef8fb6 win_environment: Added tests and return info in document (#25064)
* win_environment: Added tests and return info in document

* fixing up some yaml issues

* some more things I should have detected

* fixing up test tag name
7 years ago
George Nikolopoulos a00089c341 New module: manage Citrix Netscaler service configuration (network/netscaler/netscaler_service) (#25129)
* netscaler_service initial implementation

* Changes as requested by reviewers

* Skip some tests if under python2.6 and importing requests library

* Change option "operation" to "state"

* Remove print statements from netscaler module utils

* Catch all exceptions during login

* Fix fail message

* Add common option save_config
7 years ago
Trishna Guha 36082e32b4 Add integration test for nxos_user (#25464)
Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>
7 years ago
Trishna Guha b1b68840be Add missing integration test for eos_user (#25463)
Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>
7 years ago
Ricardo Carrillo Cruz b3e8c48d4b New module: Add support for Arista EOS vlan (network/eos/eos_vlan) (#25355)
* WIP Add eos_vlan module

* Fix docstrings

* Fix pep8 issues

* Add active/suspend states logic

* Add integration tests for eos_vlan

* Fix map_config_to_obj on EAPI

* Sixify iteritems

* Add platform agnostic net_vlan integration tests
7 years ago
Matt Martz 004e99316c Allow template files to be vaulted (#22951)
* Allow template files to be vaulted

* Make sure to import exceptions we need

* get_real_file can't take bytes, since it looks specifically for string_types

* Now that we aren't using open() we don't need b_source

* Expand playbooks_vault docs to include modules that support vaulted src files

* Add vaulted template test
7 years ago
Daniele Lazzari eda6a6baee New module: Add module to add/remove a network static route on windows (windows/win_route) (#23405)
* adds win_route windows module

* fix documentation indent

* fix documentation pep8 issues

* fix documentation issues

* genaral code review

* changed 'supported_by' in doc, supports_check_mode removed

* use of powershell cmdlet instead of route command, destnation in CIDR format, adds check mode support

* adds win_psmodule module

* documentation review

* documentation review

* removed files accidentatlly pushed

* add integration tests, add return in documentation

* add conditional statement in test, add os requirementes in documentation

* fix documentation

* fix os check in tests
7 years ago
René Moser 894b86a467 cloudstack: cs_zone_facts: add tests and fix pep8 (#25407) 7 years ago
Trishna Guha f6a4803669 New module: platform agnostic way to manage local users on network devices (network/net_user.) (#25259)
* Add net_user platform agnostic module

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

* Integration test for net_user

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

* modify eos_user module to support name param as alias to username

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

* Test collection of users

Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>
7 years ago
Sloane Hertel c20285782d test conditionals work for invalid elements in list and undefined keys in dicts (#23875) 7 years ago
Michael De La Rue e28845018d [cloud] New module: AWS API Gageway module (#20230)
* Ultra basic api-gateway module based of lambda.py

* Ultra basic deployment added to api-gateway module

* ApiGateway module Allow creation of APIs, more documentation and better return value

* ApiGateway module incorporate review feedback

* ApiGateway module flake8 cleanup

* APIGateway module - more review fixes.

* slightly better messages in api_gateway module

* AWS api_gateway module - try to improve messages in case of exceptions

* rename api_gateway module to aws_api_gateway as discussed in PR 20230

* aws_api_gateway - Allow delivery of swagger either as text or dictionary.

* aws_api_gateway module - introduce 'unit' tests, improve imports using them and small fixes

* aws_api_gateway module - move path expand_user to avoid early typecheck

* aws_api_gateway - version means version of metadata not module - fix to 1.0

* aws_api_gateway module - Rely on module_utils.ec2 for imports & path type for expanduser / cleanups

* aws_api_gateway module - heavy cleanup and refactor of code + cloud retry functionality.

* api_gateway_module - failing test case for handling more than one deployment in succession and API deletion

* add TooManyRequestsException to AWSRetry exception list - makes API deployment work.

* api_gateway_module - Fixes for various review comments + errors from various linters

* api_gateway_module - Fixes for more review comments + linter error

* api_gateway_module - Major refactor into sensible functions - create_response becomes configure_response

* api_gateway_module - should be working under python3; remove test exclusion

* api_gateway_module - finish off remaining review fixes - use ansible defaults and fix mutually exclusive

* api_gateway_module - attempt to improve handling of botocore errors in python3

* api_gateway_module - implement state=absent / API deletion
7 years ago