Commit graph

1886 commits

Author SHA1 Message Date
Prasad Katti
8a9a9b84dd [ec2-ami] Use required_if with state parameter (#32009)
* [ec2-ami] Use required_if with state parameter

* Update failure msg on delete ami with no image_id task in integration test
2017-10-24 16:01:33 -04:00
Martin Krizek
ee6ba5d590 yum: allow for downgrade using rpm file (#31647) 2017-10-24 14:33:38 +02:00
Kedar K
e2bed36d12 - Adds iosxr_netconf module to configure netconf service on IOSXR (#31715)
* - Adds iosxr_netconf module to configure netcong service on Cisco
  IOS-XR devices

* - Adds Integration test for module
- Handles diff return from load_config

* - Adds unit test for iosxr_netconf module
2017-10-24 08:49:23 +05:30
Jordan Borean
b004a6373a windows: add #AnsibleRequires for Windows modules (#31683)
* windows: add #AnsibleRequires to set whether a module requires module or a specific version

* fix up pep8 issues

* changed psversion to use the actual ps Requires -Version syntax

* missed the check on #Requires -Version

* fix #Requires module extensions
2017-10-23 14:21:30 -07:00
Kedar K
465fe5802b -Fixes JSON parsing(use JSON object instead of string) for facts modules. (#31818) 2017-10-23 17:48:52 +05:30
Jordan Borean
8e44cd5d10 win_command win_shell: add stdin option (#31619) 2017-10-23 09:50:19 +10:00
Jordan Borean
b663f602bc windows argv to string module utility (#28970)
* windows argv to string module utility

* rebased PR with latest devel branch
2017-10-23 09:49:40 +10:00
Matt Clay
36b13e3e3d Fix ansible-test default image. (#31966)
* Add openssh-client to default docker container.
* Include Azure requirements in default container.

To do so, handling of pip requirements was updated to install each
set of requirements separately and then run a verification pass to
make sure there are no conflicts between requirements.

* Add missing --docker-no-pull option.
* Add documentation for the azure-requirements test.
2017-10-20 08:48:01 -07:00
Will Thames
0c10e1ebe4 Handle timezone updates on Ubuntu 16.04+ on containers (#27546)
* Handle timezone updates on Ubuntu 16.04+ on containers

Although Ubuntu 16.04 will use timedatectl by default,
containers without a working timedatectl need to use the
old method.

A bug in Ubuntu for the old method means having to write
a nasty hack

https://bugs.launchpad.net/ubuntu/+source/tzdata/+bug/1554806

* Add tests for timezones

Ensure timezone changes work across various OSs
2017-10-20 16:02:38 +10:00
nwsparks
5cccad8ed4 new windows module, win_audit_rule (#30473)
* added win_audit_rule with integration test

* Updated integration testing to target files as well as directories
and registry keys. Split testing files apart to be more organized.

Updated powershell for better handling when targetting file objects
and optimized a bit. Removed duplicated sections that got there from a
previous merge I think.

* Decided to make all the fact names the same in integration testing.
Seemed like there would be less change of accidentally using the wrong
variable when copy/pasting that way, and not much upside to having
unique names.

Did final cleanup and fixed a few errors in the integration testing.

* Fixed a bug where results was displaying a wrong value

Fixed a bug where removal was failing if multiple rules existed due to
inheritance from higher level objects.

* Resolved issue with unhandled error when used didn't have permissions
for get-acl.

Changed from setauditrule to addauditrule, see comment in script for reasoning.

Fixed state absent to be able to remove multiple entries if they exist.

* fixed docs issue

* updated to fail if invalid inheritance_rule when defining a file rather than warn
2017-10-20 11:20:33 +10:00
Matt Clay
3c271e6bf6 Remove unsupported comments from aliases. 2017-10-19 14:44:13 -07:00
Matt Clay
eb899c9bcd Fix docker_secret integration test dependencies. 2017-10-18 10:42:31 -07:00
Marek Nogacki
b9223cdc89 ec2_group: do not fail on description mismatch (#31704) (#31734)
* ec2_group: do not fail on description mismatch (#31704)

* ec2_group: do not fail on description mismatch (#31704) - fix test case
2017-10-18 09:21:55 -04:00
Martin Krizek
e2fc61c554 Add yum integration tests using fake repo (#31646) 2017-10-18 13:07:48 +02:00
Matt Clay
7623c2fbda Disable flakey win_rabbitmq_plugin test. 2017-10-17 14:03:25 -07:00
Jordan Borean
743ff4897a win_regedit: added function to load a dat file for editing (#31289)
* win_regedit: added function to load a dat file for editing

* try to make the tests more resiliant

* more stability changes
2017-10-18 06:30:33 +10:00
Matt Clay
264452e0a8 Fix bad syntax in test_infra integration test. 2017-10-17 09:53:54 -07:00
Jordan Borean
888de842b3 win_regedit: fix extra info coming into stdout (#31813) 2017-10-17 11:58:32 +10:00
Adrian Likins
297dfb1d50 Vault secrets script client inc new 'keyring' client (#27669)
This adds a new type of vault-password script  (a 'client') that takes advantage of and enhances the 
multiple vault password support.

If a vault password script basename ends with the name '-client', consider it a vault password script client. 

A vault password script 'client' just means that the script will take a '--vault-id' command line arg.

The previous vault password script (as invoked by --vault-password-file pointing to an executable) takes
no args and returns the password on stdout. But it doesnt know anything about --vault-id or multiple vault
passwords.

The new 'protocol' of the vault password script takes a cli arg ('--vault-id') so that it can lookup that specific
vault-id and return it's password.

Since existing vault password scripts don't know the new 'protocol', a way to distinguish password scripts
that do understand the protocol was needed.  The convention now is to consider password scripts that are
named like 'something-client.py' (and executable) to be vault password client scripts.

The new client scripts get invoked with the '--vault-id' they were requested for. An example:

     ansible-playbook --vault-id my_vault_id@contrib/vault/vault-keyring-client.py some_playbook.yml

That will cause the 'contrib/vault/vault-keyring-client.py' script to be invoked as:

     contrib/vault/vault-keyring-client.py --vault-id my_vault_id

The previous vault-keyring.py password script was extended to become vault-keyring-client.py. It uses
the python 'keyring' module to request secrets from various backends. The plain 'vault-keyring.py' script
would determine which key id and keyring name to use based on values that had to be set in ansible.cfg.
So it was also limited to one keyring name.

The new vault-keyring-client.py will request the secret for the vault id provided via the '--vault-id' option.
The script can be used without config and can be used for multiple keyring ids (and keyrings).

On success, a vault password client script will print the password to stdout and exit with a return code of 0.
If the 'client' script can't find a secret for the --vault-id, the script will exit with return code of 2 and print an error to stderr.
2017-10-13 15:23:08 -04:00
Abhijeet Kasurde
a047fe0e4c Correct usage for shutil.rmtree (#31541)
* Correct usage for shutil.rmtree

Fix adds correct usage of shutil.rmtree in git module

Fixes: #31225

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>

* Include archive tests so they get run

* Use new include syntax

* Cleanup syntax on git tests

- use multi-line YAML
- remove unneeded {{ }} around vars in conditionals
- remove unneeded quotes
- add task file name to task names for easier troubleshooting when things fail

* Make archive tests work for RHEL/CentOS 6

The older versions of Jinja2 in RHEL/CentOS 6 required assertion tasks using the map filter to be skipped.

The older version of git required gzip compression to be skipped on RHEL/CentOS 6.

* Account for ansible_distribution_major_version missing
2017-10-13 10:30:15 -04:00
Lujeni
91ab88dac7 pip: Use chdir directive in the venv path (fixes #25122) (#26865) 2017-10-13 12:39:47 +02:00
Matt Clay
80b0e0e05a Remove cryptography version limit in Azure tests.
No longer needed now that cryptography 2.1.1 has been released.
2017-10-12 15:34:36 -07:00
jctanner
c05a7add5f Only install pyvmomi if user is root (#31628) 2017-10-12 10:20:33 -04:00
Trishna Guha
e7145e249f fix ios_interface test unsupported param (#31622)
Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>
2017-10-12 11:17:06 +05:30
Matt Clay
8acb901bf2 Update Azure tests to limit cryptography version. (#31616)
* Revert "Work around cryptography 2.1 requiring pip 8.1.2+"

This reverts commit a10a80b8a3.

* Update Azure tests to limit cryptography version.
2017-10-11 19:18:16 -07:00
Rene Moser
0c416b5891 tests: cs_snapshot_policy: add integration tests 2017-10-11 18:35:54 +02:00
Philippe Dellaert
9580a6569e Fix #21112 : Adding support for configuring a CD-rom iso image (#28155)
* Initial CD-ROM support

* create cdrom bugfix

* Improving CDROM change detection and fixing template creation bug
Running MarkAsTemplate on an existing template will fail with an error

* Better change detection for guest ID
Should only mark a change in case it actually changes

* Adding integration tests

* Pep8 compliance fixes

* Adding CDROM support, including iso, client and none types

* Updating added release version for CDROM option
2017-10-11 14:29:13 +02:00
rahushen
c976ac7ed6 change ports to non well known ports and drop time_range for N1 (#31261) 2017-10-11 17:37:01 +05:30
Ricardo Carrillo Cruz
7acb0bb187 Parameterize the ssh port on ios_user tests (#31573)
On CI we use 8022 for SSH, thus we need to explicitly pass
ansible_ssh_port to the ssh command to work.
2017-10-11 12:44:57 +02:00
Ricardo Carrillo Cruz
ac95ecaf13 Remove duped authorize on ios_ping anchored tasks (#31572)
Otherwise, we get warnings.
2017-10-11 12:28:10 +02:00
Ricardo Carrillo Cruz
c75c4cbfc8 Introspect the management IP on ios_ping (#31571)
On our CI we don't have external connectivity, so let's ping to
the management interface IP.
Also, ignore errors on the expected failures tests.
2017-10-11 12:10:11 +02:00
Ganesh Nalawade
88da95bb77 Fix rollback in junos_config (#31424)
* Fix rollback in junos_config

Fixes #30778

*  Call `load_configuration` with rollback id in case
   the id is given as input
*  Pass rollback id to `get_diff()` to fetch diff from device

* Fix unit test
2017-10-11 10:25:56 +05:30
Toshio Kuratomi
dde2c96d67 Try to cleanup after the rpm_key test 2017-10-10 17:40:35 -07:00
Ricardo Carrillo Cruz
bd17edd5ed Run neighbors intent tests for ios_interface only if show lldp contains netdev (#31539) 2017-10-10 21:26:47 +02:00
Sam Doran
2610b521bc Remove sysctl entries when state=absent (#31486)
* Remove sysctl entry when state=absent
* Cleanup sysctl integration test syntax
* Correct grammar on error message
* Add sysctl integration test for state=absent
2017-10-10 09:01:33 -07:00
Lukas Bednar
5ccc1072ea [rpm_key] Fix to import first key on the system (#31514)
* [rpm_key] Fix to import first key on the system

Fixes: #31483

* [rpm_key] removed unsafe_shell and "throwaway" underscore

* [rpm_key] adding test to add the first key on system
2017-10-10 13:31:20 +02:00
Artem Zinenko
2b63ae61f2 minor updates + tests to win_firewall_rule as per jborean93 review (#29148)
* Added warning for 'force' option

* Changed 'profiles' type to list

* Changed 'interfacetypes' type to list

* Added deprecation warning and fixed doc

* updated force parameter
2017-10-10 16:23:08 +10:00
Jordan Borean
82fa922491 win_become: Added support to become a service user (#30407)
* win_become: Added support to become a service user

* fixes for linting

* changes to get local and network service working

* fixed linting issues again

* pleasing pepe
2017-10-09 17:58:29 -07:00
Jordan Borean
f2bc89a880 win_copy: added decrypt option (#31291) 2017-10-10 08:21:25 +10:00
Jordan Borean
c4b51009f0 win_copy: allow src to have invalid windows chars (#31392)
* win_copy: allow src to have invalid windows chars

* create file with colon instead of avoid checkout errors
2017-10-06 15:23:37 +10:00
Martin Krizek
08bffbcbaa yum: add integration tests for installing from URL (#30616) 2017-10-05 15:25:45 +02:00
Martin Krizek
488534b906 yum: add integration test for incompatible arch rpm (#31185) 2017-10-05 14:57:15 +02:00
Matt Clay
a333f2e5b0 Fix ansible-test config management. 2017-10-04 12:52:36 -07:00
Stephen
9c6ad3d076 Add update_only parameter for yum module (#22206)
* Add update_only parameter for yum module

When using latest, `update_only: yes` will ensure that only existing
packages are updated and no additional packages are installed.

* Update yum.py

Update version added for `update_only` parameter to 2.5

* add unit tests for update_only flag in yum module
2017-10-04 10:25:13 +02:00
Sam Doran
00df1fda10 Correctly write SELinux config file (#31251)
* Add new lines to end of config file lines

* Properly write out selinux config file

Change module behavior to not always report a change but warn if a reboot is needed and return reboot_required.

Improve the output messages.

Add strip parameter to get_file_lines utility to help with parsing the selinux config file.

* Add return documentation

* Add integration tests for selinux module

* Use consistent capitalization for SELinux

* Use atomic_move in selinux module

* Don't copy the config file initially

There's no need to make a copy just for reading.

* Put message after set_config_policy in case the change fails

* Add aliases to selinux tests
2017-10-03 23:38:58 -04:00
Jordan Borean
e61c2799ff win_become: move error handling to Ansible outside of shell (#31227)
* win_become: move error handling to Ansible outside of shell

* trimmed the output so double newlines don't get set

* added test for non-zero exit code

* missed issue URL on test

* changed exit to SetShouldExit
2017-10-03 21:42:27 -04:00
Jordan Borean
bba941cd5b win_copy: fix for copying encrypted file without pass (#31084)
* win_copy: fix for copying encrypted file without pass

* fix pep8 issue

* reduced the diff and fixed some minor issues
2017-10-03 12:51:57 -07:00
Adrian Likins
278ff19bea Handle vault decrypt --output=- (#31066)
In cli.CLI.unfrack_path callback, special case if the
value of '--output' is '-', and avoid expanding
it to a full path.

vault cli already has special cases for '-', so it
just needs to get the original value to work.

Fixes #30550
2017-10-03 12:02:16 -04:00
Jordan Borean
12a4dca447 win_dotnet_ngen: fix after broken in 2.4 (#31076)
* win_dotnet_ngen: fix after broken in 2.4

* added description to return values
2017-10-03 07:34:00 +11:00
Jordan Borean
67fd98da09 win_msg: added doc about msg limit and included an explicit check for better error handling (#31078) 2017-10-03 07:32:30 +11:00
Matt Clay
6d3cbbfc38 Disable failing vmware_maintenancemode test. 2017-10-02 13:19:17 -07:00
Abhijeet Kasurde
02b5c7a8a3 New module - vmware_guest_powerstate
Fix adds a new module 'vmware_guest_powerstate' to manage
power states of virtual machine.

Fixes: #30371

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2017-10-02 18:57:44 +02:00
Abhijeet Kasurde
6a7676d738 Add testsuite for vmware_maintenancemode
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2017-10-02 18:55:06 +02:00
Brian Coca
ac9278ff0f remove action plugin only fields from 'file' calls (#31047)
* remove action plugin only fields from 'file' calls

fixes #30556

* Add a test for #30556
2017-09-29 17:13:32 -07:00
Nathaniel Case
d07d9390d7 Stop toggling nxapi (#28532)
* Stop toggling nxapi all the time

* Update failed_modules

* Restore nxapi state at each toggle
2017-09-28 15:09:30 -04:00
Adrian Likins
95abc1d82e Fix fact failures cause by ordering of collectors (#30777)
* Fix fact failures cause by ordering of collectors

Some fact collectors need info collected by other facts.
(for ex, service_mgr needs to know 'ansible_system').
This info is passed to the Collector.collect method via
the 'collected_facts' info.

But, the order the fact collectors were running in is
not a set order, so collectors like service_mgr could
run before the PlatformFactCollect ('ansible_system', etc),
so the 'ansible_system' fact would not exist yet. 

Depending on the collector and the deps, this can result
in incorrect behavior and wrong or missing facts.

To make the ordering of the collectors more consistent
and predictable, the code that builds that list is now
driven by the order of collectors in default_collectors.py,
and the rest of the code tries to preserve it.

* Flip the loops when building collector names

iterate over the ordered default_collectors list
selecting them for the final list in order instead
of driving it from the unordered collector_names set.

This lets the list returned by select_collector_classes
to stay in the same order as default_collectors.collectors

For collectors that have implicit deps on other fact collectors,
the default collectors can be ordered to include those early.

* default_collectors.py now uses a handful of sub lists of
collectors that can be ordered in default_collectors.collectors.

fixes #30753
fixes #30623
2017-09-28 10:36:22 -04:00
Ganesh Nalawade
b86eea9a52 Remove provider from prepare_ios_tests integration test (#31038) 2017-09-28 15:43:15 +05:30
Ganesh Nalawade
65ab37cbd3 Remove provider from ios integration test (#31037)
*  Remove provider from each task as it is not required.
*  Add `authorize: yes` whereever required
2017-09-28 15:23:52 +05:30
Jordan Borean
a41077df20 fix for webapppool when specifying an attribute that holds a collection (#30729)
* fix for webapppool when specifying an attribute that holds a collection

* re-add always block on test
2017-09-28 16:15:55 +10:00
Will Thames
5900fee67a Fix ec2_snapshot_facts for python3
Avoid the following seen when running ec2_ami tests on python3,
presumably because the return type of `map` is different between
python2 and python3.

```
Traceback (most recent call last):
  File "/tmp/ansible_e44v27uj/ansible_module_ec2_snapshot_facts.py", line 242, in <module>
    main()
  File "/tmp/ansible_e44v27uj/ansible_module_ec2_snapshot_facts.py", line 238, in main
    list_ec2_snapshots(connection, module)
  File "/tmp/ansible_e44v27uj/ansible_module_ec2_snapshot_facts.py", line 193, in list_ec2_snapshots
    snapshots = connection.describe_snapshots(SnapshotIds=snapshot_ids, OwnerIds=owner_ids, RestorableByUserIds=restorable_by_user_ids, Filters=filters)
  File "/usr/local/lib/python3.5/dist-packages/botocore/client.py", line 312, in _api_call
    return self._make_api_call(operation_name, kwargs)
  File "/usr/local/lib/python3.5/dist-packages/botocore/client.py", line 575, in _make_api_call
    api_params, operation_model, context=request_context)
  File "/usr/local/lib/python3.5/dist-packages/botocore/client.py", line 630, in _convert_to_request_dict
    api_params, operation_model)
  File "/usr/local/lib/python3.5/dist-packages/botocore/validate.py", line 291, in serialize_to_request
    raise ParamValidationError(report=report.generate_report())
botocore.exceptions.ParamValidationError: Parameter validation failed:
Invalid type for parameter OwnerIds, value: <map object at 0x7ff577511048>, type: <class 'map'>, valid types: <class 'list'>, <class 'tuple'>
```

https://github.com/ansible/ansible/pull/30435#issuecomment-330750498
2017-09-27 20:38:39 -07:00
jctanner
0dd3a61a75 vmware_guest: tests for createvm+modifyvm tasks (#30959)
* Save the serialized values instead of their types
* Add tests for creating and modifying VMs without using a template
* Remove blank line
* Add tests for vm deletion
2017-09-27 18:10:08 -04:00
Adrian Likins
a14d0f3586 Use vault_id when encrypted via vault-edit (#30772)
* Use vault_id when encrypted via vault-edit

On the encryption stage of
'ansible-vault edit --vault-id=someid@passfile somefile',
the vault id was not being passed to encrypt() so the files were
always saved with the default vault id in the 1.1 version format.

When trying to edit that file a second time, also with a --vault-id,
the file would be decrypted with the secret associated with the
provided vault-id, but since the encrypted file had no vault id
in the envelope there would be no match for 'default' secrets.
(Only the --vault-id was included in the potential matches, so
the vault id actually used to decrypt was not).

If that list was empty, there would be an IndexError when trying
to encrypted the changed file. This would result in the displayed
error:

ERROR! Unexpected Exception, this is probably a bug: list index out of range

Fix is two parts:

1) use the vault id when encrypting from edit

2) when matching the secret to use for encrypting after edit,
include the vault id that was used for decryption and not just
the vault id (or lack of vault id) from the envelope.

add unit tests for #30575 and intg tests for 'ansible-vault edit'

Fixes #30575
2017-09-26 12:28:31 -04:00
Ganesh Nalawade
c3d226a739 Increase pause time in junos integration test (#30740)
*  Increase pause time to a value greater
   than persistent connection timeout to clean
   out socket path.
2017-09-22 16:42:16 +05:30
Matt Clay
ab89b1b219 Add region to ansible-test AWS cloud config. (#30733)
* Add region to ansible-test AWS cloud config.
* Fix .gitignore for ansible-test cloud config.
2017-09-22 00:19:21 -07:00
Jordan Borean
fb628acb6e win_domain_membership: added better error handling and basic tests (#30674) 2017-09-22 05:59:42 +10:00
Jordan Borean
59187358ee win_scheduled_task_stat: add new module to get stat on scheduled tasks (#30602)
* win_scheduled_task_stat: add new module to get stat on scheduled tasks

* fixed up linting errors and aliases file

* I should learn how to spell

* removing URI from test

* added state information for the task

* removed argument so task stays running
2017-09-22 05:59:06 +10:00
Toshio Kuratomi
46e5c48f03 Split ec2_elb_* modules in service of rename/interface changes (#30532)
* Undeprecate ec2_elb_*
* Make ec2_elb* full fledged modules rather than aliases
* Split tests for ec2_elb_lb and elb_classicb_lb
* Change names in documentation of old and new elb modules

Add tests for ec2_elb_lb
2017-09-21 13:06:14 -04:00
Tim Rupp
0eb0d96286 Adds module which allows users to manage partitions on a BIG-IP (#30577) 2017-09-21 14:48:51 +01:00
Ganesh Nalawade
869cd6f729 Increase socket connect retry timeout for integration test (#30681)
*  Increase persistent connection local socket
   retry timeout to fix intermittent failure in
   network integration test
2017-09-21 15:02:19 +05:30
Dag Wieers
31e7d735a3 win_environment: Make this the Windows reference module
As discussed before we selected win_environment to the documentation,
and point to win_uri for a more advanced module.

If we want to make this the reference module, we have to get this one
absolutely right in every possible way.

This PR cleans up both win_environment and win_uri, and makes the
required changes to the windows module development section.
2017-09-21 03:20:17 +02:00
Reid Wahl
5f90169d73 modules/system/user.py: Change createhome to create_home (#30179) 2017-09-20 17:34:49 -07:00
mikedlr
140ea7f5ff lambda integration tests - test to show that environment config has an effect (#28815) 2017-09-20 15:10:06 -04:00
Matt Clay
79839615e7 Improve coverage of expect integration tests. (#30608) 2017-09-20 01:15:56 -07:00
Will Thames
37736ee87e Allow AWS image and snapshot creation/deletion
Provide all necessary permissions for AMI tests
Allow tests to run in us-east-2
Ensure `always` section gets used
Update tests to ensure that cleanup works better, and add
deletion idempotency test
2017-09-19 23:12:50 -07:00
s-hertel
328fd307a2 Add integration tests for ec2_ami module. 2017-09-19 23:12:50 -07:00
Jordan Borean
a940eb1e80 CamelConverter - more fixes picked up in testing (#30601) 2017-09-20 15:17:26 +10:00
Jordan Borean
1ea0293878 CamelConversion: fix to not convert string values (#30595) 2017-09-20 13:03:45 +10:00
Jordan Borean
838f39e76a win_scheduled_task: rewrite (#28995)
* win_scheduled_task: rewrite for additionality functionality and bug fixes

* fixes for docs and os version differences

* started with the testing

* doc fix

* added more tests

* added principals tests

* finished tests for win_scheduled_task rewrite

* feedback from PR

* change to fail when both new and deprecated args are set

* change diff variable to match new standard and update doc sentance
2017-09-20 10:28:03 +10:00
Martin Krizek
32d6b1d0e0 user: fix default non-system user's shell on macOS 2017-09-19 18:11:22 -04:00
Jordan Borean
01563ccd5d windows: fix list type in legacy module utils (#30483)
* windows: fix list type in legacy module utils

* only change the return for the list type instead of affecting it all

* additional null check when using an array
2017-09-18 21:18:52 -07:00
Matt Clay
ff4276b65d Enable more Windows tests in CI. (#30443)
* Enable more Windows tests in CI.
* Fix win_psexec tests.
* Fix host-specific output_dir in win_fetch test.
2017-09-16 00:27:18 -07:00
Matt Davis
035a17e8aa migrate azure_rm_vm tests to active (#30452) 2017-09-15 22:48:30 -07:00
Matt Davis
6b5b465125 azure_rm_dnsrecordset rewrite (#30449)
As-merged, had several issues that prevented idempotent usage. Some args were defined at the wrong UI level. Dual-state args didn't match up with typical Ansible UI.
2017-09-15 18:12:46 -07:00
Matt Clay
b9d8637e37 Improve test reliability for win_chocolatey. (#30440)
* Rename variables.
* Test install with chocolatey-core.extension.
2017-09-15 13:35:10 -07:00
Matt Clay
4ce13e983a Command module bug fix, tests and cleanup. (#30432)
* Add more command integration tests.
* Remove unnecessary command test debug tasks.
* Fix traceback in command module for empty args.
* Remove unreachable code.
2017-09-15 11:57:50 -07:00
Kedar K
7e58661335 Test Role: Adds nxos_pim_rp_address integration test role (#29958)
*   Adds nxos_pim_rp_address integration test role for group_list,
  prefix_list and route_map (cli and nxapi)

*  * Adds explicit removal of static RP configs to match cli behaviour

*  * Removes config deletion using nxos_config module (for 2.4 only)

*  * Attempt short and long delete config command
 * Add a platform check for N3K for bidir
2017-09-15 14:22:03 -04:00
Mike Wiebe
9af6dc4751 Fix nxos_snmp_community idempotence issue (#30388)
* Fix nxos_snmp_community idempotence issue

* Use passed in name to filter

* Test updates and remove unused method
2017-09-15 07:45:51 -07:00
Sloane Hertel
bdbe5337c6 s3 integration tests (#28396)
* Replace pause in integration tests with until.

Use resource prefix instead of generating a random number

Only try to delete keys if they exist

* Add alias to tests
2017-09-15 05:08:09 -04:00
Matt Clay
c00ad0868e Update Windows CI groups from 2 to 3. 2017-09-14 23:54:28 -07:00
Mike Wiebe
173c41aefe Rel240/fix nxos pim interface (#29885)
* fix nxos_pim_interface

* Add integration test coverage and fix unit test

* Add clarifying comments

* Make ansibot happy
2017-09-14 13:36:32 -07:00
Pierre-Louis Bonicoli
5c029abac1 alternatives: test that path parameter is checked
Relates: #24800
2017-09-14 11:06:29 -07:00
Mike Wiebe
3faba93a2b Fix nxos_interface error for nxapi and idempotence problem (#29136)
* Fix nxos_interface nxapi error and idempotence

* Make shippable happy
2017-09-14 10:25:35 -07:00
Yanis Guenane
0648e339a7 openssl: remove static dict for keyUsage (#30339)
keyUsage and extendedKeyUsage are currently statically limited via a
static dict defined in modules_utils/crypto.py. If one specify a value
that isn't in there, idempotency won't work.

Instead of having static dict, we uses keyUsage and extendedKyeUsage
values OpenSSL NID and compare those rather than comparing strings.

Fixes: https://github.com/ansible/ansible/issues/30316
2017-09-14 12:03:00 -04:00
Martin Krizek
dc5f83c09b Add sudo/su become_methods for become tests (#30266)
* Add sudo/su become_methods for become tests

* Fix test on osx
2017-09-14 11:13:43 -04:00
Matt Clay
781fd7099a Reorganize integration tests:
- Move legacy tests into a separate directory.
- Reduce common dependencies between targets.
2017-09-14 07:14:30 -07:00
Yanis Guenane
3e4a306a42 openssl_certificate: Correctly set the version (#30314)
Current openssl_certificate is mistakenly taking its derivating its
version number from the csr version number.

Thos two fields are completly unrelated and hence the version number of
the certificate should be able to be directly specified (via
selfsigned_version parameter).
2017-09-14 15:21:32 +02:00
Jordan Borean
d0867edbc3 updated test not that module util checks the path is valid (#30321) 2017-09-14 11:18:32 +10:00
Ricardo Carrillo Cruz
dbe9df1289 Add CLI provider with authorize yes to ios tests (#30312)
We are getting failures to do lack of elevated privileges.
2017-09-14 00:00:58 +02:00
MarkusTeufelberger
2186b04934 Add simple integration test for openssl_certificate (#29038)
* openssl_certificate: Fix parameter assertion in Python3

Parameter assertion in Python3 is broken. pyOpenSSL get_X() functions
returns b'' type string and tries to compare it with '' string, leading
to failure.

The error mentionned above has been fixed by sanitizing the inputs from
a user to the assert only backend.

Also, this error was hidden by the fact that the improper check method
was called in the generate() functions.

* Add simple integration test for openssl_certificate

* remove subject == issuer assertion

* run integration tests only on supported hosts

* change min supported version to 0.15.x

* Add test for more CSR fields

* also convert dict members to bytes

* fix version_compare

* openssl_{csr, certificate}: Fail if pyOpenSSL <= 0.15

Previous 0.13 pyOpenSSL was a C-binding, and required the parameter
passed to add_extention to be in ASN.1. This has changed with the move
to 0.14 and it is now all pythong and string based.

Previous the 0.15 release, the `get_extensions()` method didn't exist,
since the modules rely heavily on it we ensure pyOpenSSL version is at
last 0.15.0.

* check pyopenssl version in openssl_csr integration test
2017-09-13 14:39:32 -07:00
Jordan Borean
6d196eaa98 windows command changed to use CreateProcess (#30253)
* windows command changed to use CreateProcess

* change to get become to work
2017-09-13 09:58:49 -07:00
Ricardo Carrillo Cruz
4a3a8ac616 Remove provider cli for vyos tests (#30275)
Transport is cli by default, and we set user/passwords on group_vars.
2017-09-13 16:01:47 +02:00
rahushen
caafc8e591 NXOS Commit Integration tests to Ansible (part 1) (#28935)
* cleanup nxos_bgp_neighbor_af tests

* add timeout and to_json to nxapi testing for nxos_command

* maintain folder naming consistency with other tests
2017-09-13 14:31:47 +01:00
Mike Wiebe
7292dd20ed Fix nxos_overlay_global networking modules (#28943) 2017-09-13 17:33:06 +05:30
Guillaume Coré
a09a231be7 ini_file: add integration test (#24434)
* ini_file: add integration test

Start integration tests for ini_file module.

* ini_file test: add comments for lisibility

* update from review: use var instead of checksum to assert content
2017-09-13 07:51:40 -04:00
Ganesh Nalawade
d8371cec91 Fix ios_system lookup enable issue (#30263)
Fixes #29974

Add `None` check while comparing module parameter values (want) with the actual
configuration present on device (have).
2017-09-13 15:19:09 +05:30
Mike Wiebe
cef7ed0310 Fix nxos_mtu nxapi failure (#30153) 2017-09-13 10:51:46 +05:30
Nicklaus McClendon
6dbc3c63f8 Updated pip module to always return changed if venv is created (#24233)
* Updated pip module to always return changed if venv is created

Fixes #23204

* Add integration test to pip (see #23204)
2017-09-12 10:01:29 -07:00
Matt Davis
1e2ce4c8ab support missing drive letters in PS path type (#29884)
* fixes #26623
* Test-Path (and thus `-type path` in Get-AnsibleParam) fail on a nonexistent drive letter, since it can't be mapped to a PSProvider.
* added support and basic smoke tests for
2017-09-12 09:51:48 -07:00
Ricardo Carrillo Cruz
b30cd60829 Fix nxos_user tests (#30048)
On our CI we use SSH port 8022, so parameterized the test passing
-p {{ ansible_ssh_port }}.
Also, force user/pass auth.
2017-09-12 17:01:50 +02:00
Ricardo Carrillo Cruz
1da7194534 Remove provider lines from iosxr tests (#29956)
We don't use authorize on iosxr nor we use a special transport,
so no need to use iosxr for CLI at all.
2017-09-12 13:03:28 +02:00
Trishna Guha
5b1c91bf19 nxos_system parse name_servers fix (#29944)
* nxos_system parse name_servers fix

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

* fix nxos_system tests

Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>
2017-09-12 13:25:01 +05:30
Tim Rupp
74ace093b8 Renames the bigip_configsync_actions module (#29747)
Retains the old name by making a symlink. We can remove it in a later
release.
2017-09-12 05:53:44 +01:00
Jordan Borean
5623e679b8 win_unzip: added support for Server core by using .net zip functions (#29272)
* win_unzip: added support for Server core by using .net zip functions

* fixed unzip behaviour with folders
2017-09-11 18:30:24 -04:00
Martin Krizek
0daacdccf8 dnf: add environment upgrade test 2017-09-11 11:45:10 -07:00
Martin Krizek
de299ef77c dnf: fix TypeError when env/group failed 2017-09-11 09:16:39 -07:00
Brian Coca
444a5b5389 fix cs_zone_facts tests, namespace feature removed (#29184)
* fix cszonefacts .. namespace feature removed

* also removed the 2nd instance of ansible_facts
2017-09-11 17:30:43 +02:00
Trishna Guha
2bef344512 nxos_config CI fix (#29437)
Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>
2017-09-11 14:17:17 +05:30
Trishna Guha
bbb1ceba75 fix nxos_command nxapi test output (#29436)
Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>
2017-09-11 14:15:56 +05:30
Andrew Saraceni
8f050d3719 Fix SID Lookup Issues on Assorted Windows Modules (#28979)
* fix sid lookup issues and update copyright/license to latest format

* simplify win_owner and win_share by removing unnecessary function
2017-09-11 07:34:51 +10:00
Abhijeet Kasurde
8f6626bd8f Misc typo corrections
Fix adds correction for typos

* Anisble to Ansible
* Fasle to False

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2017-09-09 10:25:50 -07:00
Trishna Guha
2ff9888923 rename nxos test basic-no-exec to basic-no-motd (#29144)
Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>
2017-09-08 22:50:25 +05:30
Trishna Guha
588bddbc35 nxos_banner CI fix (#29134)
Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>
2017-09-08 19:33:41 +05:30
Ricardo Carrillo Cruz
497e6cf405 Use 'hostname switch' on setup/teardown tasks for nxos_config non_idempotent (#29132)
inventory_hostname breaks CI due to too long string.
2017-09-08 13:56:09 +02:00
Ricardo Carrillo Cruz
8b6e3272f2 Set hostname to 'switch' on nxos_config toplevel setup/teardown tasks (#29127)
Using inventory_hostname breaks in our CI, as the inventory_hostname
translates to a long UUID, exceeding the maximum length for a NXOS
hostname.
2017-09-08 12:13:35 +02:00
Ricardo Carrillo Cruz
2304706bd3 Set hostname to 'switch' on nxos_system teardown (#29126)
On setup we set it to 'switch', so teardown should be 'switch'.
Also, using inventory_hostname breaks the test, since in our CI
it's a long UUID string, which exceeds the 32 chars maximum for setting
a hostname on NXOS.
2017-09-08 12:09:44 +02:00
Ganesh Nalawade
4d5b9a4a57 Increase persistent timer setting for network integration test (#29121) 2017-09-08 10:05:54 +05:30
Ganesh Nalawade
0b2619ff2b Add lldp neighbor intent argument for vyos_interface (#29092)
* Add lldp neighbor intent argument for vyos_interface

* Add version_added info for neighbor argument

* Fix CI issue
2017-09-08 08:28:43 +05:30
Trishna Guha
757983d808 Disable nxapi test for nxos_banner (#29088)
Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>
2017-09-07 17:51:54 +05:30
Trishna Guha
064bb66e6d run banner exec test only for NXOS7K (#29041)
Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>
2017-09-07 17:30:24 +05:30
Jordan Borean
91e7c3ec81 win_regedit: fixed up diff output to be more representative of type (#28974)
* win_regedit: fixed up diff output to be more representative of type

* added diff fix for creation of key and prop in one go
2017-09-07 16:14:49 +10:00
Matt Clay
286348bd0d Temporarily disable leaky test in CI. 2017-09-05 21:56:40 -07:00
Ganesh Nalawade
3b6b004570 Add support for neighbor argument in ios_interface (#29035)
Add missing support for lldp neighbor argument in ios_interface
2017-09-06 10:15:02 +05:30
Matt Clay
08bdb6198e Migrate more Azure integration tests. (#29034) 2017-09-05 19:38:56 -07:00
Matt Clay
8f4c8844c4 Divide Windows integration tests into 2 groups. (#29029)
* Divide Windows integration tests into 2 groups.
* Support `none` for `--changed-all-target`.
* Run 2 separate Windows groups on Shippable.
* Only run smoketest and minimal for the group1 job.
2017-09-05 15:32:26 -07:00
Dag Wieers
d8649adf10 aci_rest: More tests related to input types
Now test inline YAML, inline JSON, YAML string, JSON string and XML
string input.
2017-09-05 00:59:33 -07:00
Dag Wieers
6108b46022 aci_rest: Add integration tests
Integration tests for aci_rest to upstream.

It follows the same flow as aci_tenant to create, change and remove a
tenant idempotently.
2017-09-05 00:09:17 -07:00
Ganesh Nalawade
60d0139844 Remove provider from prepare junos test intergration setup (#28961) 2017-09-03 03:16:06 +05:30
Ganesh Nalawade
7372e0c658 Fix junos_netconf integration test provider param (#28954) 2017-09-02 23:34:51 +05:30
Matt Clay
55fb18b85c Split cloud tests into two CI groups. 2017-09-01 17:33:54 -07:00
Matt Clay
a7d5492ea3 Fix github_issue test and enable in CI. 2017-09-01 14:13:34 -07:00
René Moser
9c6d925f5a tests: cs_instance: expand tests cases with project (#28938) 2017-09-01 21:49:53 +02:00
Abhijeet Kasurde
8027aad4b8 Add support for Python3 in vmware_guest_find
* Remove redundant get_obj method
* Fix testcase
* Correct logic for compile_folder_path_for_object

Fixes: #25984

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2017-09-01 11:11:09 -07:00
Nathaniel Case
de2096e3d0 Move networking provider options to subspec (#28894)
* Add EOS provider options as subspec

* Add IOS provider options as subspec

* Add IOS XR provider options as subspec

* Add Junos provider options as subspec

* Add NX-OS provider options as subspec

* Add Vyos provider options as subspec

* Remove password checks from check_args

* Do the same to aireos, aruba, ce, dellos*, & sros, as they work the same way

* VyOS does not support `transport`
2017-09-01 11:53:51 -04:00
Mike Wiebe
fb1aa54341 Rel240/fix nxos interface ospf (#28898)
* Fixes 28897 nxos_interface_ospf idempotence

* Handle all characters upper or lower with tests
2017-09-01 11:07:18 -04:00
saichint
737c27121b Add Idempotent IT cases for vrrp, vrf, vtp (#28895) 2017-09-01 05:59:21 -04:00
rahushen
50d148a7d6 Add nxos_config IT (#28853)
* recalibrate tests and add new ones

* add new cli tests

* add new nxapi tests

* Add new tests for cli and nxapi
2017-09-01 05:44:24 -04:00
Trishna Guha
252efcebf5 module should fail if eos_user is added without configured_password or nopassword or sshkey (#28780)
* module should fail if eos_user is added without configured_password or nopassword or sshkey

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

* fix eos_user unit test

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

* fix eos_user integration test

Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>
2017-08-31 15:29:57 -04:00
Matt Clay
84295e6124 Mark destructive tests as such. 2017-08-31 12:11:43 -07:00
saichint
b574be6616 add it cases for vrf_af and vpc_interface (#28889) 2017-08-31 14:17:29 -04:00
Martin Krizek
503bfaf38b dnf: add integration tests (based on yum tests) (#28881) 2017-08-31 11:34:46 -04:00
Ricardo Carrillo Cruz
35ec00ac5c Remove all networking group_vars but VyOS (#28869)
Ansible-test will consume group_vars from test/integration, as it runs
from that working directory. This causes problems if we specify vars
in inventory as they have higher precedence, plus it gives the impression
to users those group_vars can be reused.
Leaving vyos since it's configured to run in Shippable and apparently
it breaks if there are no group_vars in the test/integration folder.
2017-08-31 15:20:31 +02:00
Ganesh Nalawade
a6af204cee Fix junos_user purge option failures (#28867)
* Fix junos_user pruge option failures

Fixes #25989

Add seperate handling for purge option which
fetches configured users on remote device
and delete the one not present in aggregate
list.

* Minor changes
2017-08-31 17:46:13 +05:30
John R Barker
5dae6a6392 Delete targets/ops_command as module no longer exists (#28868) 2017-08-31 11:11:32 +01:00
Matt Clay
94296908d7 Temporarily diasble github_issue test in CI. 2017-08-30 23:18:53 -07:00
Matt Clay
783da545b2 Rename AWS test targets to match modules:
- ec2_facts -> ec2_metadata_facts
- ec2_elb_lb -> elb_classic_lb
- aws_lambda_policy -> lambda_policy
2017-08-30 15:10:14 -07:00
Steffen Neubauer
bf73377394 consul: Always fail if no service_name was provided. (#25877)
Fixes a subtile bug introduced in PR #21737
2017-08-30 15:26:36 -04:00
Abhijeet Kasurde
a2c8481395 Add testcases for github_issue (#26309)
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2017-08-30 14:50:45 -04:00
Matt Clay
189375c611 Revert "Remove network integration group_vars/host_vars (#28827)"
This reverts commit 0a2df4cdaf.
2017-08-30 10:44:26 -07:00
Ricardo Carrillo Cruz
0a2df4cdaf Remove network integration group_vars/host_vars (#28827)
* Remove network integration group_vars/host_vars

We use our own inventory in DCI, which is passed to ansible-test
with --inventory.
However, as the working directory of ansible-test is set to
test/integration, ansible consumes the repo group_vars/host_vars.
That imposes a problem, since they have greater precedence to
inventory variables.
Let's just remove group_vars/host_vars so end-users can assume
those vars can be used, the inventory and group/host vars are
environment dependent, each user should create their own.

* Restore files I git rm'd by mistake
2017-08-30 16:49:10 +01:00
jhawkesworth
b35f39479b Fix integration test for win_toast so that the intended expiry period is used (#28812) 2017-08-30 02:30:03 -04:00
Harold Wong
5e7b2a1c06 Use variable for domain name (#28807) 2017-08-29 19:00:28 -07:00
Thomas Stringer
8a6ae51f90 Add support for Azure Functions (#28566)
* add template for az func

* (wip) add basic azure functions support

* add support to add app settings to azure function

* add support for updating based off of app settings

* add integration tests and refactor required param

* support check mode and add facts module

* add test for azure functions facts module

* add necessary checks and registrations for web client

* fix documentation

* change return type from complex to dict

* disable azure_rm_functionapp tests until stable

* remove dict comprehension for py2.6

* pepe has whitespace tumor
2017-08-29 18:54:58 -07:00
Harold Wong
ef660f87b0 Use variable for domain name (#28806) 2017-08-29 18:15:09 -07:00
Julien Stroheker
fe1153c0af Azure acs module (azure_rm_acs.py) (#28522)
* Adding acs module

* linter issue

* Reduce the VM Size for the int. tests

* Short the name of the cluster

* Fixing the asserts and title

* Fixing VM Scale count in int. tests

* Changing the location of the tests

* trying eastus2

* disabling acs CI tests until stabilized
2017-08-29 17:59:38 -07:00
Ozi Boms
3045c58c83 new facts module for dns zone (#28803)
* new facts module for dns zone

integration tests and new module for dns zone facts

* use vairable for domain name

* add nondeterministic piece to domain name

* fix azure_rm_dnszone_facts examples
2017-08-29 17:43:09 -07:00
Ozi Boms
950165ba70 Azure Module for Retrieving Facts for Record Sets (#28805)
* create new module for record set facts

added new module to get facts for dns zone record sets

* use variable for domain name

* correct lint error

* add nondeterministic piece to name

* fix azure_rm_dnsrecordset_facts examples
2017-08-29 17:42:56 -07:00
Julien Stroheker
0f76a1d16f Fixing Fails in CI Tests (#28804) 2017-08-29 20:39:37 -04:00
jhawkesworth
8f9b885113 Windows: A module for creating Toast notifications on Modern Windows versions. (#26675)
* replace duff commit version of win_toast

* change expire_mins to expire_secs and add example showing use of async

* fix metadata version to keep sanity --test validate-modules happy

* code review fixes and change expire_secs to expire_seconds

* add first pass integration tests for win_toast

* win_toast no longer fails if there are no logged in users to notify (it sets a toast_sent false if this happens)

* yaml lint clean up of setup.yml in win_toast integration tests

* improve exception and stack trace if the notifier cannot be created, following feedback from dag

* removed unwanted 'echo' input parameters from return vals; added to CHANGELOG.md, removed _seconds units from module params; updated tests to match
2017-08-29 19:19:18 -04:00
Julien Stroheker
d9ee3c09ca Adding check_state support and warning
lint

Update integration test

handle check_mode
handle warnings

Removing the empty tags check

Updating author handle

To use github handle

Changing from warn to fail

disabled tests
2017-08-29 15:36:14 -07:00
Matt Clay
472d3c3c86 Disable flakey azure_rm_loadbalancer test in CI. 2017-08-29 15:32:11 -07:00
Bruno
4c36286779 Azure managed disks module (#28424)
* First version of managed disks: Multiple methods for creating, one get and one delete

* My name is too cool to be there

* Passing pep8 test

* Create and delete empty working

* Module for testing, lacks sense of setting state changed for unchanged operations

* Checking that actual changes are done to update status changed

* First version of the integration test

* Adding the dictionary to translate the facts, without using serializer

* Adding the serializer to managed disk

* Using native serializer in managed disks facts

* Added DiskSku to pass the whole class to the disk instead of a string

* Bumping version

* Passing sanity checks

* Aparently they Id is not returned by the serilizer

* Integration test

* Latest version

* Using my own serializer, the one in commons is not working for me

* Managed disks module support for ansible

* Updating my github account username in the file

* Sanity checks were missing  in facts and integration test

* Fixing typo in source_resource_uri and removed AzureHTTPErrors

* Update tags are working now

* Integration test for tags

* Added support for tags, added check mode, corrected style
2017-08-29 14:59:06 -07:00
Sam Doran
80c00d3238 Create urlsplit filter (#28537)
* Improve tests for uri filter

* Create URL Split docs

* Add urlsplit filter

* Py3 compatibility

* Use helper method and eliminate query options

* Add options, cleanup output, fix tests

* Update docs

* Add parenthesis to boilerplate import

* Add debug task to tests

* Use exclude option to filter returned values

* Filter out additional option for Python 3
2017-08-29 17:58:44 -04:00
Thomas Stringer
40b7dffea8 Azure load balancer support (#26099)
* (wip) add partial loadbalancer module

* (wip) add ability to use a public ip for a load balancer

* fix shebang

* add backend address pool to load balancer

* remove unncessary error variable

* add probe support to load balancer

* add ability to add load distribution rule to load balancer

* add nat pool functionality to azure load balancer

* fix pep8 errors from sanity check

* add documentation for load balancer

* refactor imports

* fix license header copyright

* add facts module for azure load balancer

* fix ansible-test failures

* add integration tests for load balancer

* fix metadata version

* add complex integration test to azure_rm_loadbalancer
2017-08-29 14:29:44 -07:00
Liran Nisanov
0d9f9a246f Adds win_pagefile module (#25605)
* Adds win_pagefile module

* Fixed win_pagefile doc

* Fix win_pagefile doc

* Fix win_pagefile doc variable convention

* Added check_mode

* Changed win_pagefile module&doc to the convention

* added win_pagefile integration tests

* Changed check_mode blocks to whatif, fixed a bug

* Added whatif to set-wmiinstance, changed docs

Added whatif in Set-WMIInstance
Added dots to end of decription lines

* Returns to original state at the end, more tests

Added override and no override integration tests
Pagefiles now return to same state as before at the end of the integration test

* Remove extra line

* Added test_path var to win_pagefile

* Set test_path as 'no' in integration

* Added unit to docs and enclosed exception message

* More granular try-catch blocks

* Added workaround to avoid value out of range

* Deleted wrong line ending

* Changed license to one-line

* Removed space in line ending

* Try to fix python2.6 error

* Try 2 to fix python2.6 error

* Add separating line again
2017-08-29 17:23:13 -04:00
Sertaç Özercan
2ea017a794 Azure Virtual Machine Scale Set support (azure_rm_virtualmachine_scaleset) (#28381)
* initial virtual machine scaleset implementation

* added docs

* fixed formatting

* added update feature for os disk caching and capacity

* add tier

* added return

* add integration tests

* add vmss facts

* add data disk support

* added data disks docs

* update integration test
2017-08-29 14:14:15 -07:00
Julien Stroheker
6b7e38555c Azure Availability Set facts module (azure_rm_availabilityset_facts) (#28378)
* Adding facts module and Int. Tests

* register results

* Upgrading metadata version

* Updating author handle

To use Github handle
2017-08-29 13:48:36 -07:00
nwsparks
61335a42c2 added windows module win_power_plan with integration test (#27966)
* added windows module win_power_plan with integration test

integration testing updated to handle skipping 2008 while testing that
module provides helpful error

* minor docs fix

* my fault, too many spaces
2017-08-29 16:22:06 -04:00
Artem Zinenko
06fadefbdc [18807] win_firewall_rule module uses HNetCfg.FwPolicy2 COM Object (#27381)
* #18807 win_firewall_rule uses HNetCfg.FwPolicy2 COM object

* Added missing tests

* Added support for InterfaceTypes property

* Added support for EdgeTraversalOptions property

* Added SecureFlags property

* Port ranges are not possible in W2K8

* Added windows version checks

* Fixed doc: removed 'force' option and all notes

* Fixed copirights and docs
2017-08-29 16:18:03 -04:00
Sertaç Özercan
392eeabddb Azure Virtual Machine Extension module (azure_rm_virtualmachine_extension) (#28128)
* added azure vm extensions support

* added auto_update_minor_version and protected_settings

* update docs

* added get_poller_result

* fixed test failures

* remove tags and check mode

* Include Integration Tests

Include Integration Test for azure_rm_virtualmachine_extensions.py

* Correct location for integration test files
2017-08-29 11:32:15 -07:00
Ozi Boms
ddbdf0fd5d Record set module (#28423)
* Record set module

New module to manage DNS Record sets

* fix pylint issue

* fixed problem with commas

* fixed pep issue
2017-08-29 14:10:07 -04:00
Ozi Boms
9822db610b Azure DNS Zone Module (azure_rm_dnszone) (#28418)
* New module for dns zone

Added new module and intergration tests for them

* fixed sanity issues

not importing specific moduels/classes; fixed now
2017-08-29 10:49:37 -07:00
Sam Doran
b4342d2ea4 Add verbosity option to debug statement 2017-08-29 11:48:29 -04:00
Martin Krizek
98b19f0623 yum: fix changed in group remove 2017-08-29 11:48:29 -04:00
rahushen
2cf836772d Add passive_interface property to nxos_ospf_vrf module (#28288)
* add passive_interface property to nxos_ospf_vrf module

* Add version_added for
2017-08-29 11:31:11 -04:00
Jacob McGill
1c4fe510d0 IOS Ping: Add new module to support ping tests from IOS devices (#28557)
* IOS Ping: Add new module to support ping tests from IOS devices

* Add tests

* Add fixtures for ios_ping
2017-08-29 11:21:49 -04:00
Ricardo Carrillo Cruz
9a3f5bf1fc Set NXAPI port to 8080 (#28773) 2017-08-29 16:42:42 +02:00
Trishna Guha
edca4f426f Revert "fix nxapi nxos tests" (#28763)
* Revert "Fix leading slashes being stripped from mount src (#24013)"

This reverts commit 3251aecd95.

* Revert "Convert value of port and timeout in provider to integer (#28732)"

This reverts commit a914a39975.

* Revert "fix nxapi nxos tests (#28762)"

This reverts commit 4137169b21.
2017-08-29 09:28:16 -04:00
Trishna Guha
4137169b21 fix nxapi nxos tests (#28762)
Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>
2017-08-29 09:08:32 -04:00
Ricardo Carrillo Cruz
549ef0f45d Change inventory_hostname to ansible_ssh_host on nxos group_vars (#28752)
We need to use IP address, as inventory_hostname returns an UUID from
openstack.py inventory in our CI.
Also, commenting the username/pass as we set them in the inventory (we shall
change this in the future).
2017-08-29 12:24:57 +02:00
Dag Wieers
61d2201a2d win_get_url: Add use_proxy, headers and timeout (#26612)
* win_get_url: Add use_proxy, headers and timeout

This PR includes:
- Add use_proxy parameter
- Add timeout parameter
- Add headers parameter
- Simplify logic
- Create separate CheckModified-File
- Now use -LiteralPath instead of -Path
- Clean up documentation

* win_get_url: Add use_proxy, headers and timeout

This PR includes:
- Add use_proxy parameter
- Add timeout parameter
- Add headers parameter
- Simplify logic
- Create separate CheckModified-File
- Now use -LiteralPath instead of -Path
- Clean up documentation
2017-08-28 20:11:10 -04:00
Jordan Borean
a695f30411 Added powershell SID utils for shared common code (#27091)
* Added powershell SID utils for shared common code

* rebased from upstream and fixed up module util after change
2017-08-28 19:15:58 -04:00
Jordan Borean
adabefd016 win_package: rewrite, check mode, tests, more check options (#27470)
* rewrite of win_package to enable win_msi deprecation

* fix some minor doc issues

* Removed exe tests

* dag's changes seem to be missing, re-add them

* fixed yaml for return values
2017-08-28 19:03:10 -04:00
Artem Zinenko
1c958af88b [28017] Integration tests for win_rabbitmq_plugin (#28118)
* Check registry to find RabbitMQ installation path

* Integration tests for win_rabbitmq_plugin

* Added himself to BOTMETA.yml

* Skipped running tests on Windows 2008 SP2
2017-08-28 18:48:10 -04:00
Nathaniel Case
862cde5e82 [WIP] Fix nxos_banner (#28607)
* Fix `'state': 'absent'`

* Replace idempotence tests with references

* Fix issues with nxos_banner
2017-08-28 17:09:54 -04:00
Michael De La Rue
fbec5ab12d [cloud] new module lambda_policy (PR #24951)
- Fixes to lambda
- reformatting + tests for lambda_facts
- lambda module integration test
- switch lambda and lambda_facts to AnsibleAwsModule
- Get the account ID from STS, GetUser, and finally error message
2017-08-28 16:45:53 -04:00
Mike Wiebe
3d46258cff Refactor/fix nxos_nxapi to use show run (#28675)
* Refactor/fix nxos_nxapi to use show run

* Fix unit tests

* Python 3 compatibility
2017-08-28 15:00:56 -04:00
Reid Wahl
6510ed3587 Fixes #28540: Corrected ansible_host value for facthost[0:20] from 1270.0.0.1 to 127.0.0.1 (#28541) 2017-08-28 13:19:07 -04:00
Reid Wahl
bf7976517d Fixes #28542: Standardize assert test defaults to match their comparison values (#28543) 2017-08-28 13:08:44 -04:00
Will Thames
63df0adc17 [cloud] Update RDS parameter group for boto3 (#25345)
* Update RDS parameter group for boto3

* Update to boto3
* Update to latest ansible standards
* Remove choices list for valid engines (See #19221 for context)
* Allow tagging
* Return some useful information, and document that information

* Add tests for rds_param_group

* Improve testing of rds_param_group

* Add purge_tags option for rds_param_group

* Fix remaining broken rds_param_group tests

* Ensure the group name is lowercased. Fixes integration tests when run on OSX
2017-08-28 12:52:22 -04:00
Abhijeet Kasurde
3e20acbd79 Refactor code for find_host_by_cluster_datacenter (#26859)
Fix adds refactor of code for find_host_by_cluster_datacenter
API in vmware_host and vmware_resource_pool.
Also, adds strict check for cluster and datacenter object find.
Testcase for vmware_resource_pool.

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2017-08-28 18:36:46 +02:00