Commit graph

3495 commits

Author SHA1 Message Date
Adrian Likins 12404f470a Fix pkg_mgr fact on OpenBSD (#30725)
* Fix pkg_mgr fact on OpenBSD

Add a OpenBSDPkgMgrFactCollector that hardcodes pkg_mgr
to 'openbsd_pkg'. The ansible collector will choose the
OpenBSD collector if the system is OpenBSD and the 'Generic'
one otherwise.

This removes PkgMgrFactCollectors depenency on the
'system' fact being in collected_facts, which also
avoids ordering issues (if the pkg mgr fact is collected
before the system fact...)

Fixes #30623
2017-09-22 14:22:05 -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
Ganesh Nalawade d72eb08902 Fix nxos provider transport warning issue (#30610)
* Fix nxos provider transport warning issue

*  Add default value of transport arg in provider spec
*  Remove default value if transport arg in top level spec
   This ensure deprecation warning is seen only in case transport
   is given as a top level arg in task
*  Refactor nxos modules to reference transport value from provider
   spec

* Fix unit test

* Remove transport arg assignment in nxos action plugin

* As assigning transport value is handled in provider spec
  top level task arg assignment is no longer required
2017-09-22 10:32:25 +05:30
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
Hervé Beraud 0e9ae5b8cc [fix] no-unicode-literals sanity error on ansible.egg-info (#30446)
* [fix] no-unicode-literals sanity error on ansible.egg-info
2017-09-21 12:47:24 -07: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
Dag Wieers f5dded59c2 mail: Fix charset encoding issue
This PR includes:
- An important fix to charset encoding of from address
- Documentation and examples cleanup
- PEP8 fixes
- Warning on insecure access
- Strict parameter typing
- More modern interface (using lists rather than comma, space or pipe-delimited strings)
- Warn on failure to send mail to some recipients
  ```
   [WARNING]: Failed to send mail to 'foobar': 550 5.1.1 <foobar>:
Recipient address rejected: User unknown in local recipient table
  ```
- Warn on failure to parse some headers
  ```
  [WARNING]: Skipping header 'Foobar', unable to parse
  ```
- Return failed recipients as return value
- Changed default encoding to utf-8
2017-09-21 01:07:53 +02: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
dteach ca56a248d8 junos_facts: Add Hardware facts. (#30304)
* Add Routing Engine Facts

 - Map routing engine output information to routing_engines facts dict.
 - Add fact 'has_2RE', which is a quick way to determine how many REs
   the chassis has.

* Fix a typo

* Fix more typos

* Add slot number to routing_engine dict

* Add facts about the installed chassis modules

* Fix typo

* Fixed another typo

* Fix Path

* Change path again.

* More Typos

* Add some deubgging

* Add additional information for hardware components.

 - Return information about the Routing Engines.
 - Return a fact to easily determine if the device
   has two routing engines.
 - Return information about the hardware modules.

* Addressed pep8 stardard failures.

* Add unit test fixtures.

* Rename fixture.

* Fix unit test failures.

 - Rename the fixture file to what the unit test expects.
 - Strip out junos namespace attributes.
Rename file to match what the unit test expects.

* Scrubbed the routing engine serial numbers.

* Add unit test facts for new tests.

 - Add unit test for ansible_net_routing_engines fact
 - Add unit test for ansible_net_modules fact
 - Add unit test for ansible_net_has_2RE

* Fixed spacing.
2017-09-20 12:43:07 +05:30
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
Adrian Likins 307be59092 Don't ask for password confirm on 'ansible-vault edit' (#30514)
* Don't ask for password confirm on 'ansible-vault edit'

This is to match the 2.3 behavior on:

        ansible-vault edit encrypted_file.yml

Previously, the above command would consider that a 'new password'
scenario and prompt accordingly, ie:

        $ ansible-vault edit encrypted_file.yml
        New Password:
        Confirm New Password:

The bug was cause by 'create_new_password' being used for
'edit' action. This also causes the previous implicit 'auto prompt'
to get triggered and prompt the user.

Fix is to make auto prompt explicit in the calling code to handle
the 'edit' case where we want to auto prompt but we do not want
to request a password confirm.

Fixes #30491
2017-09-19 17:39:51 -04:00
Toshio Kuratomi 0a69e27e62 Fix jenkins_plugin test for no net situations (#30568)
Unittests are sometimes run without network connectivity in build
systems.  Make that work correctly by mocking out _get_url_data with the
expected return value.
2017-09-19 13:12:45 -07:00
Matt Clay dbf9634b1b Enable more pylint rules and fix reported issues. (#30543)
* Enable pylint invalid-encoded-data test.
* Enable pylint anomalous-unicode-escape-in-string test.
2017-09-19 00:45:35 -07:00
Matt Clay 7714dcd04e Enable more pylint rules and fix reported issues. (#30539)
* Enable pylint unreachable test.
* Enable pylint suppressed-message test.
* Enable pylint redundant-unittest-assert test.
* Enable pylint bad-open-mode test.
* Enable pylint signature-differs test.
* Enable pylint unnecessary-pass test.
* Enable pylint unnecessary-lambda test.
* Enable pylint raising-bad-type test.
* Enable pylint logging-not-lazy test.
* Enable pylint logging-format-interpolation test.
* Enable pylint useless-else-on-loop test.
2017-09-18 23:20:32 -07: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
Toshio Kuratomi c82cf791dd Add a code-smell test for smart quotes and remove smart quotes from all files 2017-09-18 16:49:16 -07:00
Dag Wieers 6a6f88d035 Clean up ACI error text (#30501)
* Clean up ACI error text
* Get rid of explicit unicode strings, use PY2
2017-09-18 11:51:58 -07:00
Toshio Kuratomi 1fa3fb45bc Update aci tests for new messages from lxml-4.0+ 2017-09-17 19:04:17 -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 397918435b Fix docker error handling for cs/vcenter tests. 2017-09-15 16:49: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
René Moser f128796782 cs_volume: fix CloudStackException dependency (#30389)
fixes pep8
2017-09-15 20:40:28 +02: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
Pierre-Louis Bonicoli e9d202f944 module_utils/avi.py: fix broken import 2017-09-14 10:59:25 -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
Matt Clay 0ce9e84f38 Fix import test handling of multi-line messages. 2017-09-14 10:09:54 -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