Commit graph

2606 commits

Author SHA1 Message Date
Abhijeet Kasurde
764b4b20ec Fix UnboundLocalError in basic.py
* Fix for UnboundLocalError while accessing deprecations
  in result
* Add Unit test

Fixes #24592

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2017-05-15 09:32:17 -04:00
Matt Clay
6a2a7a2392 Enable codecov.io and add coverage grouping. 2017-05-15 19:14:05 +08:00
Matt Clay
a23f503286 Temporarily disable cs_network_acl test in CI.
This test currently conflicts with cs_vpc, causing it to fail if
both tests are run together.
2017-05-15 18:42:47 +08:00
René Moser
3ca3163af1 cloudstack: add new module cs_network_acl (#24609) 2017-05-15 10:57:38 +02:00
Matt Clay
fdcad0f44d Improve on-demand coverage for Shippable. 2017-05-14 18:27:58 +08:00
Matt Clay
5cb5228cde Implement on-demand coverage on Shippable. (#24535) 2017-05-14 01:08:42 +08:00
Toshio Kuratomi
d834412ead Fix for persistent connection plugin on Python3 (#24431)
Fix for persistent connection plugin on Python3.  Note that fixes are also needed to each terminal plugin.  This PR only fixes the ios terminal (as proof that this approach is workable.)  Future PRs can address the other terminal types.

* On Python3, pickle needs to work with byte strings, not text strings.
* Set the pickle protocol version to 0 because we're using a pty to feed data to the connection plugin.  A pty can't have control characters.  So we have to send ascii only.  That means
only using protocol=0 for pickling the data.
* ansible-connection isn't being used with py3 in the bug but it needs
several changes to work with python3.
* In python3, closing the pty too early causes no data to be sent.  So
leave stdin open until after we finish with the ansible-connection
process.
* Fix typo using traceback.format_exc()
* Cleanup unnecessary StringIO, BytesIO, and to_bytes calls
* Modify the network_cli and terminal plugins for py3 compat.  Lots of mixing of text and byte strings that needs to be straightened out to be compatible with python3
* Documentation for the bytes<=>text strategy for terminal plugins
* Update unittests for more bytes-oriented internals

Fixes #24355
2017-05-12 09:13:51 -07:00
Ilya Drey
62b8813873 Improving nxos_ip_interface module (#21353)
* Improving of nxos_ip_interface module

Added features:

  * Route tags for an IP address at interface level with 'tag' option
  * Support of IPv4 secondary addresses if option 'allow_secondary' is
true (false by default). If option 'allow_secondary' is true primary
IPv4 address will be replaced

All features support NXAPI and CLI transport, but only with text/raw
output. Currently not possible to get route tags for secondary IPv4/IPv6
addresses from JSON output.

Other changes:
  * Module return state 'changed' only when configuration commands were
executed
  * Module result includes multiple prefixes if IPv4 addresses were
found

* Fix PEP8 issues

* Addition fix of PEP8 issues

* Remove unused variable from main()

* Fix "proposed" sample in RETURN variable

* Fix "existing" sample in RETURN variable

* Update RETURN variable

Add 'secondary' for every element of 'addresses' list.

* Restore old version number

* Added exception when ipaddress module is imported

* DOCUMENTATION string was updated

  * Added 'version_added' for new features
  * Added 'requirements' for module

* Added compatibility with latest commit in devel branch

* DOCUMENTATION was fixed
* Improve changes of route tag for existing ip addresses
* Added compatibility with core code

* Fixed mistypes in the DOCUMENTATION variable

* argument_spec fixed

allow_secondary argument type was changed according to allowed choices.
2017-05-12 11:45:44 -04:00
John R Barker
e9e2d67035 Run vyos_command Network tests in Shippable (#24514)
* Run VyOS Network tests in Shippable

* net_command no longer exists

* network/ci

* Disable other network tests

* pep8 fix

* Fix PEP 8 issue.
2017-05-12 12:49:12 +01:00
Matt Clay
771b467941 Disable unstable win_psexec integration test. 2017-05-12 16:40:36 +08:00
Matt Clay
af5db3e4a9 Revert "Add support for on-demand coverage on Shippable."
This reverts commit 7b3f0b8870.
2017-05-12 15:47:28 +08:00
Matt Clay
7b3f0b8870 Add support for on-demand coverage on Shippable.
Triggered by setting the COVERAGE environment var to a non-empty value.
Alternatively the string `ci_coverage` can be added to a commit message.
2017-05-12 14:55:48 +08:00
Matt Clay
dfd19a812f Miscellaneous bug fixes for ansible-test.
- Overhauled coverage injector to fix issues with non-local tests.
- Updated integration tests to work with the new coverage injector.
- Fix concurrency issue by using random temp files for delegation.
- Fix handling of coverage files from root user.
- Fix handling of coverage files without arcs.
- Make sure temp copy of injector is world readable and executable.
2017-05-12 14:55:48 +08:00
Brian Coca
c50cf22d52 deal with null/none connections
fixes #23621
pushed 'connection resolution' to play_context
override fieldattribute getter
2017-05-11 15:46:14 -04:00
Tom Melendez
4a5cf0b5c1 [GCE] [GCP] UrlMap module (#24422)
* [GCP] UrlMap module

This module provides support for UrlMaps on Google Cloud Platform.  UrlMaps allow users to segment requests by hostname and path and direct those requests to Backend Services.

UrlMaps are a powerful and necessary part of HTTP(S) Global Load Balancing on Google Cloud Platform.

UrlMap takes advantage of the python-api so the appropriate infrastructure has been added to module_utils.

More about UrlMaps can be found at:
https://cloud.google.com/compute/docs/load-balancing/http/url-map

UrlMap API:
https://cloud.google.com/compute/docs/reference/latest/

Google Cloud Platform HTTP(S) Cross-Region Load Balancer:
https://cloud.google.com/compute/docs/load-balancing/http/

* updated documentation, remmoved parens

* fixed tabs
2017-05-11 13:02:32 -04:00
Abhijeet Kasurde
728d3e6c84 Pep8 fixes for web_infra/ansible_tower (#24479)
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2017-05-11 11:26:36 -05:00
Matt Clay
fb9efd3c7e Add --remote-terminate option to ansible-test.
Set `--remote-terminate success` for osx tests.
2017-05-11 22:42:52 +08:00
Jon Hadfield
eb4cc31ae5 [cloud] migrate ec2_asg to boto3 and support application ELB target groups. (#19667)
* switch to boto3 and add support for application ELBs with target groups.

* use py23 compatible dict iterator.

* removing commented out fail_json calls

utilize sets to simplify logic

remove setting a redundant variable

add bounds checking in two places

add AWSRetry decorator - do we want this for other functions too?

change xrange to range so python3 doesn't fail

remove sorting lists of dicts; in python2 this returns None, in python3 this fails

* remove error variable from traceback.format_exc

* Remove boto2-style calls brought in by rebase

Old boto-style calls to `as_group` attributes break in boto3

Also remove module from legacy-PEP8 list

* Add  parameter to target_group_arn option

* Fix HAS_BOTO3 check

* use tags.items() instead of iteritems

* import botocore

* Fixed bugs in deleting autoscaling groups

* make changes in deleting autoscaling groups pep8

* more pep8

* fix version

* fix bugs so local integration tests run

* fix launch config check

* reflect changed status for ASG updates

* Fix existing exception handling and use traceback.

Fix imports

* line length

* Fix notification setup

* Fix mutually exclusive arguments
Only one of the AvailabilityZones and VPCZoneIdentifier arguments should be provided to the CreateAutoScalingGroup call.

* Allow desired_capacity, min_size, max_size, launch_config_name to be derived from the existing ASG if not specified

Remove code updating dict after ASG already uses it
2017-05-11 09:08:19 -04:00
Matt Clay
496280858d Revert "Temporarily disable test which fails in group run."
This reverts commit 99d328976d.
2017-05-11 20:26:32 +08:00
Matt Clay
b8cb3f519b Detect and fix environment tampering in tests. 2017-05-11 19:45:15 +08:00
Matt Clay
99d328976d Temporarily disable test which fails in group run. 2017-05-11 16:22:12 +08:00
Abhijeet Kasurde
3d51081a59 Refactor nxos_reboot module (#24484)
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2017-05-11 13:14:31 +05:30
Trishna Guha
b2a2f69a6e nxos_vrf_af fix and unit test (#24399)
* nxos_vrf_af fix and unit test

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

* ansibot told me to do this

* use sorted() as the test list elements differ in order for python2.x and 3.x
2017-05-11 10:54:47 +05:30
Trishna Guha
62eafa8837 fixes nxos_evpn_vni and unittest (#24372)
* fixes nxos_evpn_vni

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

* fixes pep8 issue and syntax error

* ansibot tole me to do this

* Unit test
2017-05-11 10:54:05 +05:30
Dag Wieers
e855274dc8 win_psexec: Enable -nobanner option by default (#23422)
* win_psexec: Enable -nobanner option by default

PR also includes:
- Option `nobanner:` to remove this flag
- Improvements to Examples
- Improvement to Return Value
- Add types to all parameters now
- Add (limited) integration tests

* Move sysinternals into C:\Windows\Temp
2017-05-10 16:10:33 -07:00
Nathaniel Case
09b2964dee nxos_bgp_af updates (#24171)
* update docs
* clean up nxos-bgp_af
* Remove useless params from bgp_af
* Add bgp_af tests
2017-05-10 16:12:00 -04:00
Abhijeet Kasurde
2f26c5285a Refactor nxos_file_copy module (#24314)
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2017-05-10 22:15:42 +05:30
jctanner
e9c2546ffe Add integration test targets for core supported modules (#24217)
A preliminary set of test targets for "core" supported module that had no independent tests. These will also help us ensure python3 compatibility for those modules and prevent future regressions.
2017-05-10 09:19:11 -04:00
René Moser
2ef6713abb cloudstack: new module cs_vpn_gateway (#23954)
* cloudstack: new module cs_vpn_gateway
* add integration tests for cs_vpn_gateway
2017-05-10 14:55:14 +02:00
Matt Martz
d3249e7875 pep8 fixes for contrib (#24344) 2017-05-09 16:38:08 -05:00
Matt Davis
ead23783be slightly increase win_async_wrapper fire and forget sleeptime
* should fix Shippable timeouts when AWS CPU credits are low- right on the bubble of failure w/ 5s execution
2017-05-09 11:22:29 -07:00
Martin Kopta
e1d896052d unit test for #24330 (#24346) 2017-05-09 12:44:33 -04:00
Dag Wieers
bc806ff479 Windows: Small fix to Add-Warning and Add-DeprecationWarning (#23520)
Simplified the logic, and fix the issue of having a nested list as
entry.

Also indicate that we deliberately want to retain $null values
(and i.e. do not want them to be turned into a boolean).
2017-05-09 09:18:37 -07:00
Ganesh Nalawade
5b3ea6562b Add junos integration test (#24404) 2017-05-09 18:41:48 +05:30
Benjamin Jolivot
e99815e9f5 Fortios file only mode + integration tests (#23275)
* WIP file_mode

* WIP

* Add file_mode + integration tests

* fix pep8

* Update doc fragments
Create mutualy_exclusive param
Fix yamllint problem in tests

* Add aliases file + main playbook for fortios

* Install pyfg before running tests

* Install pyfg before running tests in role

* Remove pre_task as it's done in roles

* Force pyFG minimal version for python3

* role_path not role_dir :(

* Change requirements

* Specify Error type when error on import

* Bug in pygf library with python 2.5 (PR is waiting https://github.com/spotify/pyfg/pull/19)

* Bad requirement format

* still bad format -_-'

* remove test/integration/fortios.py (auto generated by tests)
missing new lines at end of file

* pyFG is now fixed in 0.50
2017-05-09 13:51:19 +01:00
Abhijeet Kasurde
e342b281d8 Check if api_key and app_key before proceeding (#24336)
Fix adds check if app_key and api_key provided by
user is correct or not. If this combination is wrong
then fail with appropriate error message given by
Datadog server

Fixes https://github.com/ansible/ansible/issues/24325

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2017-05-09 13:08:25 +01:00
Matt Clay
d999d613cb Python 3 fixes for CloudStack modules and tests. (#24400) 2017-05-09 13:37:08 +02:00
Matt Clay
e6934e42be Update ansible-test change handling and CS plugin. (#24395)
* Use CloudStack simulator from Ansible repo.
* Recognize cloud specific ansible-test changes.
* Hide ansible-test cs notice in explain mode.
2017-05-09 16:15:27 +08:00
René Moser
aaf4f04574 automated integration tests for cloudstack (#20552) 2017-05-09 11:32:11 +08:00
Nathaniel Case
830f19d444 nxos_bgp updates (#24270)
* Remove invoke from nxos_bgp
* Try to simplify get_existing
* Streamline state_present
* More testing, squash & compact get_value & get_custom_value
* Streamline main
* nxapi has problems reading CustomNetworkConfig directly
2017-05-08 11:38:50 -04:00
Abhijeet Kasurde
2425143cf2 Pep8 fixes for digital_ocean_*
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2017-05-08 10:53:47 +08:00
Abhijeet Kasurde
9c5b55232c Pep8 fixes for Windows module (#24349)
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2017-05-07 20:59:35 +01:00
Matt Clay
86bf27511c Migrate cs_sshkeypair test to ansible-test. 2017-05-07 01:44:33 +08:00
Matt Clay
0573b8bcd2 Fix ansible-test cloud integration bugs. 2017-05-05 21:46:29 +08:00
Matt Clay
17e07a27b2 Enable cloud tests for use with ansible-test. 2017-05-05 21:46:29 +08:00
Matt Clay
ac72fd9d2c Add missing return statements. 2017-05-05 18:37:11 +08:00
Matt Clay
201242f302 Fix call to wrong method in ansible-test. 2017-05-05 18:18:40 +08:00
Trishna Guha
ad0a01ffb5 nxos_vrf refactor (#24280)
* nxos_vrf refactor

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

* Unit test for nxos_vrf
Remove unnecessary keys() method
Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>
2017-05-05 15:38:30 +05:30
Matt Clay
1582e9bf7d Fix handling of Shippable env vars. 2017-05-05 17:44:51 +08:00
Matt Clay
a07d42e16d Add support for cloud tests to ansible-test. (#24315)
* Split out ansible-test docker functions.
* Add cloud support to ansible-test.
2017-05-05 16:23:00 +08:00
Ganesh Nalawade
0e756a1cf9 Add junos unit test case (#24249)
* Add junos modules unit test case

* Fix CI issues
2017-05-03 22:36:23 +05:30
Toshio Kuratomi
a0dfa8616a Make fetch default to fail on errors
Fixes #23501
2017-05-03 09:37:31 -07:00
Toshio Kuratomi
36d7c0c403 Fix places where path needs to be bytes on python3
These were discovered on python3 with fetch code that fails on errors.  Probably could be
provoked with particular sets of arguments to stat as well.
2017-05-03 09:37:31 -07:00
Sloane Hertel
ad8cb903f4 rds: do not update multi-az unless specified - fixes #23385 (#23498)
* allow multi_az to be unmodified if not explicitly specified

* fix pep8 and remove from legacy files
2017-05-03 12:24:02 -04:00
Matt Martz
2fbfba0ef3 Make Reporter class hold all results, move line/col into results, and out of message (#24127)
* Make Reporter class hold all results, move line/col into results, and out of message

* Move line/col out of message for YAML parser errors

* We have lineno for the DOC var, use it for YAML parser errors

* Remove valdiate-modules files from legacy-files

* pep8 indentation fixes

* Add todo for line/col in _validate_docs_schema
2017-05-03 10:25:08 -05:00
Matt Clay
6522d703a1 Fix ansible-test pylint and pep8 issues. (#24245)
* Fix pylint useless-super-delegation issues.
* Fix miscellaneous pylint issues.
* Fix PEP 8 issues.
* Fix warnings reported by PyCharm.
2017-05-03 23:19:44 +08:00
Matt Clay
00f8e3d360 Fixes for EC2 module integration tests. 2017-05-03 22:40:08 +08:00
Ganesh Nalawade
a42b892f70 Fix junos_rpc and junos_user broken issues (#24238)
* Fix junos_rpc and junos_user broken issues

Add persistent connection related changes.

* Fix CI issues
2017-05-03 19:00:07 +05:30
Abhijeet Kasurde
465c12ccdb Pep8 fixes for deploy_helper (#24237)
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2017-05-03 11:30:15 +01:00
Ricardo Carrillo Cruz
7195c31753 Refactor openvswitch_port module (#24205)
Use current patterns from other network modules for better
maintainability.
2017-05-03 10:36:44 +02:00
Abhijeet Kasurde
53f0cd197e Pep8 fixes for jira (#24229)
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2017-05-03 08:16:20 +01:00
Abhijeet Kasurde
b6b3f84990 Pep8 fixes for htpasswd (#24230)
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2017-05-03 08:13:32 +01:00
Abhijeet Kasurde
fbb924ff24 Pep8 fixes for letsencrypt module (#24144)
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2017-05-02 11:35:06 -05:00
Abhijeet Kasurde
df5be2b8ea Pep8 fixes for django_manage (#24198)
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2017-05-02 11:33:36 -05:00
Robin Roth
0cf00db750 Make git module pep8 compliant (#24196) 2017-05-02 11:33:02 -05:00
Sloane Hertel
e13fc5d6bd elasticache_parameter_group: fix documentation and exception handling - fixes #23709 (#23718)
* fix documentation and correct exception handling

* follow AWS exception guidelines

* fix parameter_group_family req; only needed when creating cache parameter group

make pep8 and remove from legacy files
2017-05-02 10:13:56 -04:00
Sloane Hertel
fcaa49b536 sns: move from notification directory to cloud/amazon directory - fixes #11874 (#23805)
* move sns to cloud directory

* make sns pep8 and remove from legacy files
2017-05-02 10:05:48 -04:00
Abhijeet Kasurde
9d9e9a79e2 Pep8 fixes for apache2 module (#24185)
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2017-05-02 15:03:26 +02:00
Andrea Tartaglia
4e4fc9cb4c Added test for 'RETURN' field in validate-modules (#23322)
* Added test for 'RETURN' field in validate-modules

* print the field being tested.

Useful when the RETURN structure is complex.

* Fixed schema after CI traceback fail

* Fixed list_string_types

* Fixed line in 319 code for RETURN
2017-05-02 09:01:53 +01:00
Toshio Kuratomi
3428f42120 Add integration test that modules are loaded from the expected locations (#24170)
* Add integration test that modules are loaded from the expected locations
* Fix ping module to pass PEP8
2017-05-01 08:52:25 -07:00
Matt Martz
040fb4435a Fix password prompt matching (#24081)
* Fix password prompt matching

* Add some tests for check_password_prompt

* Prevent pep8 line ends with a space error
2017-05-01 11:18:15 -04:00
Abhijeet Kasurde
d8f76bed97 Misc fixes and Pep8 fixes for proxmox_* modules (#24162)
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2017-05-01 10:02:59 -05:00
Abhijeet Kasurde
cdca648f15 Pep8 fixes for jenkins_* module (#24154)
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2017-05-01 10:01:25 -05:00
Toshio Kuratomi
d088030fa6 Facts Timeout was not settable via ansible.cfg
The timeout for gathering facts needs to be settable from three places
(highest precedence to lowest):

* programmatically
* ansible.cfg (equivalent to the user specifying it explicitly when
  calling setup)
* from the default value

The code was changed in b4bd6c80de to
allow programmatically and the default value to work correctly but
setting via ansible.cfg/parameter was broken.

This change should fix setting via ansible.cfg and adds unittests for
all three cases

Fixes #23753
2017-05-01 07:59:42 -07:00
Abhijeet Kasurde
806506c032 Pep8 fixes for taiga_issue module (#24143)
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2017-05-01 09:58:59 -05:00
René Moser
594d7d5d9d cloudstack: cs_region: fix pep8 (#24134) 2017-04-29 09:16:21 +02:00
Toshio Kuratomi
1c05ed7951 Fix circular import with unsafe_proxy, template, and vars
template/__init__.py imported unsafe_proxy from vars which caused
vars/__init__.py to load.  vars/__init__.py needed template/__init__.py
which caused issues.  Loading unsafe_proxy from another location fixes
that.
2017-04-28 15:35:30 -07:00
Toshio Kuratomi
500de1f557 Remove hack for backwards compatible v2_playbook_on_start callback
Just after release of 2.0.0 (in 2.0.0.1) we had a change to the API of
callbacks without bumping the API version.  We added the playbook to the
arguments passed to the callbacks.

This wasn't in the Tower callback at the time.  In order to prevent
breaking that callback we added a temporary hack to inspect the
callback's API to decide if we needed to call it with arguments or not.

We scheduled the hack for removal in January 2017.  Since that's now
past, removing the hack.

Change signed off by matburt on the Tower side.
2017-04-28 13:44:43 -07:00
Ricardo Carrillo Cruz
467a9bdd4e Refactor openvswitch_bridge (#24014)
Use common patterns from other network modules for better
maintainability.
2017-04-28 16:39:25 +02:00
SesquipedalianDefenestrator
3f321e7591 Add check_mode to get_url (#20532)
* Add check_mode to get_url that does a HEAD request to make sure the URL exists, but doesn't write the real file

* Add info about new --check behavior to docs.  Add tests for the new behavior.  Populate res_args with the info the tests are looking for.

* Add trailing comma

* Change nonexistent test URL to http://{{httpbin_host}/DOESNOTEXIST.  Fix spacing while I'm at it

* Further spacing cleanup

* State that this functionality is in Ansible 2.4+
2017-04-28 14:43:51 +01:00
Abhijeet Kasurde
ca7616b4a1 Pep8 fixes for ha_proxy module (#24090)
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2017-04-28 08:39:38 -05:00
John R Barker
ecbf8e933a Docs how to test (2nd) (#24094)
* Big testing doc refactor
* Combine all the testing documentation in to one place to make it easier to find
* Convert everything to RST
* Create testing_network guide
* Create testing landing page
* For each section detail "how to run" and "how to extend testing"
* More examples
* Lots more detail
2017-04-28 09:08:26 +01:00
Pierre-Louis Bonicoli
a13d89da68 Debian: really generate locales
/usr/sbin/locale-gen differs between Debian and Ubuntu. With Debian,
locales must be added to /etc/locale.gen before calling locale-gen
command. With Ubuntu, /etc/locale.gen is updated by
/usr/sbin/locale-gen.

Use the locale-gen module which handles both distributions.
2017-04-28 09:10:20 +08:00
Pilou
bf5d87af07 PostgreSQL Integration test suite: improvements (#23631)
* PostgreSQL tests: use package module
* PostgreSQL tests: use ansible_service_mgr in order to test init system
* PostgreSQL tests: fix a typo
* PostgreSQL tests: install only required packages
* PostgreSQL tests: use role default value when unchanged
2017-04-28 09:09:40 +08:00
Matt Clay
9f56f87770 Fix PEP 8 issue. 2017-04-28 06:51:44 +08:00
Trishna Guha
2741907cba Refactor nxos_interface and add unit test (#24008)
* [WIP] Refactor nxos_interface

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

* Modification in refactor
Unittest for nxos_interface
2017-04-27 21:19:10 +05:30
Nathaniel Case
689b93bf14 Junos_config unicode (#23369)
* Try to handle unicode output more sensibly

* Appears I'm getting latin1 instead

Ugh.
2017-04-27 11:44:26 -04:00
John R Barker
1c61b9bae7 Split modules/network into two parts (#24024)
* Split modules/network into two parts

Given the dedicated team we we have working on Ansible Networking a
clearer split is needed between Networking modules and "things that
happen to use the network"

* nmcli to net_tools

* nmcli moved
2017-04-27 16:42:41 +01:00
Colin Chan
2d9d1762ba Improve parsing of 'systemctl show' output 2017-04-27 11:42:26 -04:00
Nathaniel Case
fc0bf87c20 Run save inside config mode. (#23977)
* Run `save` before exiting config mode.

* Fix unit tests for `save`

* Allow `save` to be on its own again and introspect success

* Introspecting `compare running` makes this a lot harder.

Move `save` tests to integration tests
2017-04-27 11:08:37 -04:00
Ganesh Nalawade
9c4daded94 Add junos_config unit test (#24005) 2017-04-27 20:37:15 +05:30
Ricardo Carrillo Cruz
2716fad38f Return commands instead of command (#24061)
Ok, so for openvswitch_db in particular we just return one command
but in the sake of consistency and code re-use, let's return a list
of "commands", even if it's just one.
2017-04-27 16:36:08 +02:00
Abhijeet Kasurde
9456f93ea8 Pep8 fixes for known_hosts.py (#24029)
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2017-04-27 09:21:49 -05:00
Ricardo Carrillo Cruz
7c1b8da1a1 Refactor openvswitch unit tests (#24055)
Rather than passing a file to load fixture, build a matrix containing
the run_command side_effect per test.
This will allow more code-reuse for other ovs modules unit tests.
2017-04-27 14:48:37 +02:00
Senthil Kumar Ganesan
ce99ffe205 Fixed PEP8 issues (#24030) 2017-04-27 11:41:43 +01:00
Matt Clay
d662f6f0db Fix bugs in ansible-test units command. (#24044)
* Handle old versions of coverage.
* Handle old versions of setuptools.
* Detect python version for docker/remote units.
* Add sanity override for test constraints.
2017-04-27 11:21:11 +08:00
Nathaniel Case
0d67a49d5a nxos_bgp fixes (#23927)
* Pre-emptively fix sanity/pep8

* fix for commands

* Quick unit test
2017-04-26 16:33:54 -04:00
Nathaniel Case
c0ebdf144d nxos_acl_interface fixes (#23917)
* Update nxos_acl_interface

* Add basic unit tests to nxos_acl_interface
2017-04-26 16:32:36 -04:00
Nathaniel Case
f0914ee3c2 nxos_acl fixes (#23915)
* Update nxos_acl

* unit tests for nxos_acl

* Remove nxos_acl from pep8-legacy
2017-04-26 16:29:53 -04:00
Toshio Kuratomi
bffccb5396 fetch idempotence test and deprecate validate_md5
Added an integration test for fetch module idempotence.  (Testing
that validate_checksum is doing what it's supposed to is harder as we'd
have to create a race condition with the downloaded data to trigger it.
Probably need to make that a unittest eventually).

Also give a deprecation message to the validate_md5 parameter so that we
can eventually get rid of it.
2017-04-26 12:00:01 -07:00
Abhijeet Kasurde
d16fe5bef3 Minor typo and PEP8 fixes for dnf module (#23845)
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2017-04-26 12:57:49 +01:00
Abhijeet Kasurde
9fbbb5e10f Pep8 fixes for mysql module (#23923)
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2017-04-26 12:56:35 +01:00
Matt Clay
a871e590a8 Update validate-modules to ignore *.rst files. 2017-04-26 15:48:40 +08:00
Matt Clay
0587d59266 Use Shippable image: drydock/u16pytall:master (#23997)
* Use Shippable image: drydock/u16pytall:master
* Do not install python 3.6 on Shippable.
2017-04-26 15:04:28 +08:00
Matt Clay
d3c006c496 Fix module validator report if skipping all files. 2017-04-26 11:44:19 +08:00
Toshio Kuratomi
78dd3496e2 Update version and change remove files from pep8 blacklist 2017-04-25 12:26:40 -07:00
Brian Coca
e29dc49a49 moved to exceptions for basic skip/fails
better handling of checkmode and async
fix test to follow new flow control
2017-04-25 14:48:56 -04:00
Ricardo Carrillo Cruz
a3a970180a Unit tests for openvswitch_db module (#23974) 2017-04-25 20:02:55 +02:00
Sloane Hertel
00ebd0c89d make lineinfile docs clearer and make module pep8 (#23857) 2017-04-23 09:19:22 +02:00
Brian Coca
4594bee65a keep unsafe .. unsafe (#23742)
* keep unsafe .. unsafe

fixes #23734, which was broken in previous fix that allowed non string types to be templated
use new 'is_template' function vs bastardizing others
refactored clean_data to allow for arbitrary data structures to clean
fixed/removed some tests

* deal with complex data for is_template

* typos
2017-04-21 16:07:38 -04:00
Ganesh Nalawade
1cdfcf0bb9 Add junos_command module unit test (#23819)
* Add junos_command module unit test
2017-04-21 18:23:40 +05:30
Ricardo Carrillo Cruz
60de93c31d Add assertion on test_iosxr_facts (#23852)
We hit bug #23737 due to bad coverage on test_iosxr_facts, we
were not checking memory facts at all.
2017-04-21 11:19:46 +02:00
Guillaume Coré
c7f4c97b18 async+script: add integration test (#23818)
see #23729
2017-04-21 01:06:01 -04:00
Sloane Hertel
91644167c9 improve exception handling (#23722)
make pep8
2017-04-20 16:40:37 -04:00
Sloane Hertel
11c292bac2 route53_facts: add example for how to use next_marker option - fixes #23625 (#23802)
* Add example for using route53 next_marker option

* make route53_facts pep8 and remove from legacy files
2017-04-20 16:34:43 -04:00
Ricardo Carrillo Cruz
0bbfd3d4e0 Add missing aliases file to ios_system integration target (#23795) 2017-04-20 12:33:22 +02:00
Ricardo Carrillo Cruz
82fd038998 Add missing aliases file to iosxr integration tests targets (#23796) 2017-04-20 12:32:36 +02:00
Sloane Hertel
d63af51f90 s3_sync: removing irrelevant s3.list_buckets() call - fixes #23409 (#23492)
* Removing irrelevant s3 call

Fix exception handling

Make s3_sync pep8 and remove from legacy file
2017-04-18 16:49:10 -04:00
Adrian Likins
ae3d7fb29e Fix vault reading from stdin (avoid realpath() on non-links) (#23583)
* Fix vault reading from stdin (avoid realpath() on non-links)

os.path.realpath() is used to find the target of file paths that
are symlinks so vault operations happen directly on the target.

However, in addition to resolving symlinks, realpath() also returns
a full path. when reading from stdin, vault cli uses '-' as a special
file path so VaultEditor() will replace with stdin.
realpath() was expanding '-' with the CWD to something like
'/home/user/playbooks/-' causing errors like:

        ERROR! [Errno 2] No such file or directory: u'/home/user/ansible/-'

Fix is to specialcase '-' to not use realpath()

Fixes #23567

* to_text decrypt output when writing to stdout
2017-04-18 13:09:02 -04:00
Daniel Shepherd
698fa37a44 [cloud] Fix #23152 in route53 module and pep8 cleanup (#23156)
update module to support more standard state=present/absent syntax

update module to use required_if, required_together, mutually_exclusive functions where possible

per ryansb review: make documentation section more clear, fix some extra quotes, remove FIXME comment

pre willthames review: force private_zone to True if vpc_id is set and fix word wrap
2017-04-18 11:49:25 -04:00
Nathaniel Case
0b4cebfb8b nxos_vlan tweaks (#23194)
* Remove commented code

Remove a lot of unnecessary output

* Tests

* Sort vlan ids _after_ running set operations, so order is not lost
2017-04-18 10:49:47 -04:00
Kevin Brebanov
5775bb2a4e apk: Fix regex search patterns
Regex patterns were not being escaped properly so package names
containing characters that could be interpreted as regex symbols
were causing failures.

Fixes: #19714
2017-04-18 15:07:55 +02:00
Will Thames
9229d53143 [cloud] Add ec2_vpc_dhcp_options_facts check mode (#23106)
* Support check mode in ec2_vpc_dhcp_options_facts

As a facts module, ec2_vpc_dhcp_options_facts supports check mode
by default

* ec2_vpc_dhcp_options_facts tidy up

Use named method imports, move imports to top of code
Use shared code to handle filters and tags
Use snake case for parameter names while retaining backward compatibility
2017-04-18 08:56:38 -04:00
Nathaniel Case
e518b6f5b4 Clean up import statements for nxos_rollback (#23540)
* Clean up import statements for nxos_rollback

* Don't try to deal with pre-2.3 logic
2017-04-17 08:51:38 -04:00
Matt Clay
4ad869b407 Expand test documentation. (#23598)
* Replace test README.md with new README.rst.
* Add compile and sanity README.rst docs.
2017-04-13 17:46:21 -07:00
Matt Clay
cb1f57d4e5 Add rstcheck to ansible-test and correct issues. (#23550)
* Add rstcheck to ansible-test.
* Fix rst code-block languages and syntax errors.
* Fix rst inline literals.
* Update python 2 code block to pass tests on py 3.
2017-04-13 10:28:52 -07:00
Matt Clay
4ee96b20a3 Temporarily cap pylint version < 1.7.0 in tests. 2017-04-13 09:10:29 -07:00
Matt Clay
e7bb508ad6 Fix var precedence check to support python 3. (#23552)
* Fix var precedence check to support python 3.
* Run CI sanity tests using python 3.5.
* Disable pylint non-iterator-returned test to pass on python 3.5.
2017-04-13 00:07:40 -07:00
Matt Clay
442768c45e Fix module validator blacklist handling.
Process the blacklist before creating a validator instance.
2017-04-12 23:19:39 -07:00
Brian Coca
8382ed7200 added test emulating #23180 use case 2017-04-12 18:34:29 -04:00
Toshio Kuratomi
4e8e366739 Ryanpineo fix ipaddr netmask with 32 cidr (#23506)
* Fix bug in ipaddr netmask filter when cidr is 32

* Add requirement on netaddr to the units.txt file
2017-04-11 14:10:43 -07:00
Sloane Hertel
5f517fdfa9 [cloud] route53_zone: allow split horizon for route53_zone and refactor - fixes #22939 (#23190)
* allow split horizon for route53_zone and refactor

* fix documentation

remove comment

fix version_added

* Remove unused imports

* Only include zone as matching if it has the same privacy setting

* Use `.endswith` instead of indexing into a string

* Update public zone behavior to only create new if there is no matching public zone

* Remove from legacy PEP8 files
2017-04-11 16:02:14 -04:00
Lumír 'Frenzy' Balhar
9d41aefd71 Add Python 3 support for validate-modules test. (#21195)
* Improve PEP8 compatibility

* Fix Python 3 incompatibility

Is prohibited to mutate OrderedDict during iteration through it so
is better to add records with error or warning to empty dictionary
instead of delete records from copy of dictionary during iterating.

* Decode output of subprocess from bytes to unicode.

* Add Python 3 support for validate-modules test.

Fix #18367
2017-04-10 07:43:39 -07:00
Matt Clay
eec01e2137 Set IO encoding for ansible-test on Shippable. 2017-04-08 23:06:44 -07:00
Matt Clay
92ad9a19b6 Fix ansible-test empty diff handling on Shippable. 2017-04-08 22:08:08 -07:00
Dmitry Sobolev
1cf607d8a8 Telegram notification module updated (#22858)
* msg_format parameter added
error message received from telegram API is added to fail json
compatibility with python3 added
* pep8 formatted
* version_added property added for msg_format
* bot token must be set without 'bot' prefix in module parameters
* formatting options described in documentation
* six module for compatibility used
telegram.py removed from legacy-files.txt
2017-04-08 12:53:35 -07:00
Matt Clay
0cf1e8e061 Fix ansible-test handling of import/syntax errors. 2017-04-07 12:20:31 -07:00
Matt Martz
621e27b5dd Urls client cert auth (#18141)
* Build HTTPSClientAuthHandler more similarly to how HTTPSHandler works

* Add docs for new client cert authentication

* Support older versions of python

* Simplify logic

* Initial support for client certs in urls.py

* Add an extra test

* Add a get_url test for client cert auth

* Add additional test for client cert auth, with validation and ssl mismatch

* Skip assert when http tester not available

* Update version_added for new options
2017-04-07 09:54:37 -07:00
Toshio Kuratomi
78ced5318f Fix for recursive copy slowness
Copy module was walking over files in subdirectories repeatedly (a
directory tree a few levels deep could bring the time spent into the
tens of minutes)

This was traced to the fix for this bug report: https://github.com/ansible/ansible/issues/13013

Fixed #13013 a different way and added an integration test to check for
regressions of #13013 as we optimize this code.

Fixes #21513
2017-04-07 12:41:42 -04:00
Matt Martz
ac61f09203 Extra deps needed for building cryptography 2017-04-07 09:19:26 -07:00
Matt Martz
13ac993d25 Fallback to old ssl_wrap_socket 2017-04-07 09:19:26 -07:00
Matt Martz
b4b76bab14 Update install deps for SNI tests 2017-04-07 09:19:26 -07:00
Strahinja Kustudić
9f0be5a556 Ignores ControlPersist broken pipe errors. Fixes #16731
Ansible will now automatically retry a connection if SSH returns an error:

mux_client_hello_exchange: write packet: Broken pipe

This is probably a bug in SSH, but because it's safe to retry this
connection there is no need for Ansible to fail because of it.
2017-04-07 09:06:28 -07:00
Ricardo Carrillo Cruz
13b2f11139 Do not assert session name on idempotent eos banner (#23402)
* Check for proper response key on eos_banner map_config_to_obj

If we run the task with 'login' banner, the 'show banner' command
will return a dict containing key 'loginBanner'.
However for motd, it will just return 'motd'.
Yay naming consistency!

* Do not assert session exists on eos_banner response not changing device
2017-04-07 15:44:06 +02:00
Ricardo Carrillo Cruz
ce9826d76e Fix eos_banner basic-motd eapi asserts (#23398)
The commands in EAPI does not contain the plain command sent to the
device as a one liner, but it is split in cmd/input keys.
2017-04-07 14:18:40 +02:00
Ricardo Carrillo Cruz
2cc2b8fb4d Add missing provider to eos_banner basic-motd eapi test (#23396)
Otherwise this stalls and timeouts, it doesn't have creds to run.
2017-04-07 13:39:33 +02:00
Matt Clay
48eeab8a53 Fix errors reported by pylint. (#23282)
* Fix pylint misplaced-bare-raise errors.
* Fix pylint return-in-init error.
* Fix pylint bad-format-character error.
* Fix pylint too-many-format-args errors.
* Fix pylint too-few-format-args errors.
* Fix pylint truncated-format-string error.
2017-04-06 16:58:16 -07:00
Matt Clay
9e1bf1c6f2 Update fedora24 Dockerfile to resolve dnf issue. 2017-04-06 16:03:29 -07:00
Chris Alfonso
394cb3477b Fixes loginBanner plucking over eapi transport when loginBanner isn't set. (#23363) 2017-04-06 10:58:04 -06:00
Nathaniel Case
98c23a3342 Attempt to clear up nxos_mtu tests and documentation (#23361)
nxos_system wasn't added until 2.3, so nxos_mtu should have been deprecated
then.
2017-04-06 12:26:17 -04:00
Matt Clay
40e88dadbe Disable zypper tests for CI due to timeouts. 2017-04-06 08:48:31 -07:00
Peter Sprygada
f0008248d4 fix iosxr commands to encode json (#23346)
the command dict in the iosxr module_utils wasn't encoding the request
to json.  this patch will fix that problem
2017-04-06 15:44:21 +01:00
Ricardo Carrillo Cruz
4571ff0b52 Fix eapi basic-login asserts (#23318)
The asserts where not checking the commands sent to the device
2017-04-05 20:37:58 +02:00
Ricardo Carrillo Cruz
cf30f0f27d Fix asserts on ios_banner tests (#23315)
The contain assert was broken.
2017-04-05 20:00:10 +02:00
Ricardo Carrillo Cruz
d268471739 Fix basic-login eapi tests for eos_banner (#23304)
We should be passing the provider dict, not the transport.
2017-04-05 19:11:12 +02:00
John R Barker
f22702eee2 enable ios_facts tests again (#23310) 2017-04-05 17:50:32 +01:00
Nathaniel Case
d890167575 Fix nxos_facts for nxapi transport (#23302)
* Partial revert of 2e476e64cd

This broke handling of nxos_facts over nxapi

* Fix nxos_facts tests not run in isolation
2017-04-05 11:47:37 -04:00
Matt Clay
1daa69d685 Initial pylint support for ansible-test sanity. 2017-04-04 16:16:21 -07:00
Matt Clay
a6ca849643 Fix PEP 8 issues. 2017-04-04 12:22:47 -07:00
Robin Roth
6f40cb9647 Add workaround for evasive in apache2_module (#22649)
* Add workaround for evasive in apache2_module

* Fixes #22635
* Clean up workarounds for php/shib
* Add test for evasive workaround
* Remove use of re module, since all searches work with native python

* Add unit tests to apache2_module name replacements

Go back to using re package where needed

* Rename replace_name to create_apache_identifier
2017-04-04 14:12:06 -04:00
Matt Clay
1ad2e1059c Update unit test requirements in README. 2017-04-04 10:55:49 -07:00
Chulki Lee
99ef1f3a9f git: git reset with branch
`git reset <ref>` can be ambiguous and fail to switch to the correct branch.
To avoid it, specify branch as well.
2017-04-04 10:45:04 -07:00
Matt Clay
79fa5ef4cb Add missing group_vars to group_by test. 2017-04-04 10:14:10 -07:00
Brendan Jurd
7fb1519035 Add integration tests for group_by precedence.
Test that, when a group is created with group_by, variables from the
corresponding group_vars/ file are correctly pulled in, and override
variables specified in group_vars/all.

See ansible/ansible#8664.
2017-04-04 10:14:10 -07:00
Toshio Kuratomi
6bad4e57bd Migrate most uses of if type() to if isinstance()
Also convert those checks to use abcs instead of dict and list.

Make a sentinel class for strategies to report when they've reache the end
2017-04-04 08:17:20 -07:00
Will Thames
bded5ac987 [cloud] Support check_mode for ec2_vpc_subnet_facts (#23111)
* Support check_mode for ec2_vpc_subnet_facts

facts modules support check mode by default

* ec2_vpc_subnet_facts pep8 tidy up
2017-04-04 08:34:49 -04:00
Will Thames
e61be9ea78 [cloud] Remove DryRun parameter in ec2_vpc_igw_facts check_mode (#23113)
* Remove DryRun parameter in ec2_vpc_igw_facts check_mode

Using DryRun in check mode causes errors, and is not required
(as nothing changes when calling describe_internet_gateways)

Prevents the following error:
```
{"changed": false,
 "failed": true,
  "msg": "An error occurred (DryRunOperation) when calling
          the DescribeInternetGateways operation: Request
          would have succeeded, but DryRun flag is set."}
```

* ec2_vpc_igw_facts pep8 tidy up
2017-04-04 08:29:48 -04:00
Matt Clay
b7cc4616b1 Fix integration aliases. 2017-04-03 17:49:35 -07:00
Matt Clay
58c2470e8f Fix deploy_helper integration tests. 2017-04-03 16:59:40 -07:00
Ramon de la Fuente
550d229c7b added deploy_helper module tests 2017-04-03 16:59:40 -07:00
Jordan Borean
3e1a16c574 win_find fix up age parameter (#23195) 2017-04-03 11:43:07 -07:00
Jordan Borean
4d1b97d1ae win_stat change return islink to islnk to match stat (#23196) 2017-04-03 11:38:34 -07:00
Sergey
9a43603761 [cloud] Added account selection to PubNub BLOCKS (#23160)
* . switched from 'user.id' to 'account.id' in REST API calls.
+ added ability to select desired account (by name or identifier) from list of accounts to which authorized user have access.

* + added account option addition version.

* Remove pubnub_blocks from PEP8-legacy list
2017-04-03 14:05:38 -04:00
Matt Clay
11138abc51 Fix PEP 8 issues. 2017-03-31 14:21:54 -07:00
Ryan Brown
2196fa0e95 [cloud][tests] fixtures for placebo to test AWS modules using boto3 (#21253)
* [cloud][tests] Create fixtures for using placebo to test boto3-using modules

* Use pytest's importorskip instead of manually skipping on missing deps

* Fix imports in cloudformation module

* Delete unused code

* Add maybe_sleep fixtures to speed up recorded test runs

* Build basic placebo-CFN tests

* Commit placebo recordings of basic stack operations

* Add placebo to test-requires

* Allow unit tests to run regardless of environment by setting a default region

* Use explicit relative import for Python 3 compat

* Use __name__ attribute that works on Python 2 and 3
2017-03-31 15:31:12 -04:00
Matt Clay
9713abe9f7 Remove references to deleted files. 2017-03-31 09:20:15 -07:00
Ricardo Carrillo Cruz
9cc47df30e Fix eos_banner cli basic_motd integration test (#23158)
A task was lacking the provider variable, causing the test to fail.

Fixes #23130
2017-03-31 00:21:23 +02:00
Senthil Kumar Ganesan
a0344acd78 Ansible 2.3 feature support for dellos6. (#23084)
* Ansible 2.3 feature support for dellos6.

- With the new Ansible 2.3 infra changes, the dellos modules doesn't work
  (the new infra changes are not backward compatible), so added the below
  changes support it.
- Added the new terminal plugin for DellOS6
- Added the new action plugin for DellOS6
- Modified the modules to work with the new infra.
- with that it adds support for DellOS6 Persistent Connection support.

* Remove pep8 confirming files from dellos6.py and dellos6_config legacy-files
2017-03-30 15:26:32 +02:00
Konstantin Suvorov
c1b3d6a51f Fix 'sequence' lookup shortcut syntax and documentation (#22989)
* fix 'sequence' lookup shortcut syntax and documentation

* Update playbooks_loops.rst

Minor edits for grammar and clarity.

* Update playbooks_loops.rst

Another tweak for clarity.
2017-03-29 19:11:19 -04:00
Pavel Glushchak
097173c6f5 Added Virtuozzo distribution support
Virtuozzo Linux is based on CentOS sources. Thus OS family
should be recognized as 'RedHat'.

Signed-off-by: Pavel Glushchak <pglushchak@virtuozzo.com>
2017-03-29 08:47:05 -07:00
Ricardo Carrillo Cruz
1fd58c295c Add missing aliases files on nxos integration targets (#23070) 2017-03-29 13:28:43 +02:00
Ricardo Carrillo Cruz
0e954b0fd9 Add aliases file to nxos_interface integration target (#23069) 2017-03-29 12:50:16 +02:00
Ricardo Carrillo Cruz
ac6465689c Add nxos_interface integration testing (#23030)
This is a first step before starting the refactoring of
the nxos_interface code.
2017-03-29 11:01:38 +02:00
Toshio Kuratomi
ade3fc2893 Fix for tests run with no .ssh user dir
When building in automated build systems, there are sometimes cases
where the user doing the building does not have a .ssh directory.  In
this case, we need to mock out some os.path functions so that the
add_host_key() function we're testing won't complain or try to create
one.
2017-03-28 19:27:22 -07:00
Toshio Kuratomi
b0d75a0ecb Fix synchronize tests for the updated quoting change between action and module 2017-03-28 14:15:18 -07:00
Miyurz
1ea1becf23 Fixes bug https://github.com/ansible/ansible/issues/22455 - Git reset… (#22502)
* Fixes bug https://github.com/ansible/ansible/issues/22455 - Git reset fails when file with the name 'origin' is present in the repository

* #22455 Integration test for git module to test if it clones a repository with a file named origin

* Fixed yaml errors for test/integration/roles/test_git_clone/tasks/main.yml

* Removed the newly added target git and moved the code to test/integration/targets/git

* Reorganised code structure as per comments

* Fixed playbook name

* Added code that didn't make it to the playbook before.

* No longer need git.yml

* Remove non tasks specific code from tasks file and use existing variables

* Removed msg var from the vars.yml
2017-03-28 08:41:25 -04:00
Senthil Kumar Ganesan
dd63dfcf1e Ansible 2.3 feature support for dellos9 and dellos10 (#22856)
* Ansible 2.3 feature support for dellos9 and dellos10
* Use Persistent Connection Manager

* Fix CI issue, revert the doc and metadata changes

* Reverted the meta_info (supported_by) to community from core

* Fixed the CI issues, use module_utisl.six and updated legacy-files
2017-03-27 19:32:57 +01:00
Alex Lo
ac74520b6f ec2_group: description property is immutable (#19790)
* update integration tests for updated boto exception message

* integration tests fail on both "test credential" test cases

exception bubbles out of module.  instead catch and wrap

* ec2_group does not support updating a security group's description

AWS security group descriptions are immutable.
if ec2_group finds a group that matches by name, but the descriptions do not match, the module does not support this case
previously it would check if the group was used, but would not do anything if it was

old behavior was erroneous because it could make a user expect that the description change of a group was fine when in fact it did not occur
also, it made an expensive check against all ec2 instances for no good reason

* comments not doc strings

* else must have pass w/o doc-string statement

* Catch specific BotoServerException, give context around error when fetching SGs

* python3 compatible exception blocks

* add traceback to fail_json

* two blank lines before first function
2017-03-26 09:33:29 -04:00
Matt Clay
dfe8eca3d2 Update Shippable downloader to support new API.
- Download run/jobs by URL (old or new).
- Download run metadata.
- Download job metadata.
- Format downloaded JSON.
- Handle and save coverage/testresults download errors.
2017-03-24 14:24:38 -07:00
Matt Clay
318445fe19 Associate systemd module with service test. (#22847) 2017-03-24 13:29:18 -07:00
Brian Coca
18a7a1ec31 added docs to CLI docstringsadded
removed 'now intermediate build files' from repo
adjusted gitignore
2017-03-24 15:52:36 -04:00
Matt Davis
e084e8809e force Windows to always use preamble-free UTF8 input encoding (#22934)
* fixes #15770
* When running under the UTF-8 codepage, Powershell subprocesses will fail (eg, Start-Job, others) if the input encoding is using the default BOM preamble. This fix forces it to use no preamble in leaf_exec and win_shell, and includes tests to verify that Start-Job works.
2017-03-24 00:02:39 -07:00
Artem Zinenko
f4b34a4c3b win_firewall_rule doesn't fail when profile is "any" or remoteip is IPv4 and the task runs more than once. (#22555)
* Fixed #22554

* Wrote tests for win_firewall_rule module

* Fixed #22786

* Fixed review comments

* Fixed #22799

* Added test when RemoteIP containt a netmask

* Revert comment
2017-03-23 20:01:26 -07:00
Dag Wieers
ac43a1bbbc Windows: Use the correct newline sequence for the platform (#21846)
This change to the template action plugin make template use the
platform's native newline_sequence for Jinja.

We also added the option `newline_sequence` to change the newline
sequence using by Jinja if you need to use another newline sequence than
the platform default.

This was previously discussed in
https://github.com/ansible/ansible/issues/16255#issuecomment-278289414

And also relates to issue #21128
2017-03-23 19:47:10 -07:00
Dag Wieers
ef36d7de68 win_scheduled_tasks: Improve example test framework (#22833)
Updated as discussed in previous Test Working Group.
2017-03-23 19:42:12 -07:00
Matt Davis
73f50b4f9f fix Windows env handling (#22927)
* fixes #22441
* fixes #22655
* moves all env handling into the exec wrapper; this should work for everything but raw, which is consistent with non-Windows.
2017-03-23 17:48:15 -07:00
Jordan Borean
f1ab879bb6 win_reg_stat change the module parameters for standardisation (#22732) 2017-03-23 15:15:28 -07:00
Toshio Kuratomi
2fff690caa Update module_utils.six to latest (#22855)
* Update module_utils.six to latest

We've been held back on the version of six we could use on the module
side to 1.4.x because of python-2.4 compatibility.  Now that our minimum
is Python-2.6, we can update to the latest version of six in
module_utils and get rid of the second copy in lib/ansible/compat.
2017-03-23 13:35:05 -07:00
Matt Martz
0ced29c51b Don't skip action/__init__.py (#22911) 2017-03-23 13:40:02 -05:00
Matt Martz
ed52d91249 Swap pep8 current to legacy (#22891) 2017-03-23 13:16:55 -05:00