Commit graph

17260 commits

Author SHA1 Message Date
Dag Wieers
ca7ce4459d aci.py: Add use_proxy support (#27735)
This PR includes:
- Support for the use_proxy parameter
- Additional notes related to proxy support and use_proxy parameter
2017-08-07 16:08:20 +02:00
Patrick Marques
f1816bb438 Update module digital_ocean_sshkey (#18930)
* add new module do_sshkeys

* Deprecate digital_ocean_sshkey.py in favor of do_sshkeys

* Should not exit changed if name not set and key exist

* Add ansible metadata

* Return "ansible_facts" instead of "data" key

* Update documentation and remove unused import

* Remove facts module (1 module / PR)

* Fix

* Fix

* fix version_added

* Change old module status to deprecated

* Change old module status to deprecated

* Fix module deprecation

* Add support for new DO_OAUTH_TOKEN env var

* Fix python 2.6 positional index

* Update deprecation info

* Configure timeout and validate_certs for fetch_url

* rename do_sshkeys to digital_ocean_sshkeys

* Module is replaced, not deprecated anymore

* Fix module name

* Add version to new parameters

* Update module from boilerplate
2017-08-07 09:58:47 -04:00
colin-hanson-zocdoc
ac15df8ab9 [cloud] Extend AWSRetry to also retry on Throttling exceptions (#22698)
We use ansible+cloudformation pretty heavily in our CI environments and occasionally bump into throttling issues.  By adding this error code to the retry system we should be able to achieve better stability.
2017-08-07 09:53:20 -04:00
Will Thames
2276c5f206 apt: Update cache if cache_valid_time is set (#27618)
It's not clear from the docs whether you need to set `update_cache`
when using `cache_valid_time`.

Setting `cache_valid_time` should imply `update_cache`. Update docs
to reflect this.
2017-08-07 14:36:51 +02:00
Nicolas Porcel
fa6ce54011 Fix yum with rpm file or url when state=latest (#27775) 2017-08-07 10:48:30 +02:00
Slezhuk Yevgeniy
54035d5c59 Fix documentation issue in jira module (#27820) (#27823)
Fixes #27820
2017-08-07 14:04:35 +05:30
Nicolas Porcel
616d5ddc93 Clean downloaded rpm files after install (#20594) 2017-08-07 09:17:49 +02:00
Markus Krogemann
d2f9160bc1 Fix documentation of name field in return values (#27822) 2017-08-07 16:21:29 +10:00
Jordan Borean
107e177658 win_stat: add explicit error message when file is in use (#27826)
* win_stat: add explicit error message when file is in use

* make the lock last a bit longer
2017-08-07 12:04:42 +10:00
Ricardo Carrillo Cruz
b51a1e9045 Fix junos_netconf idempotency issues (#27804)
* Fix junos_netconf idempotency issues

* Fix pep8 issue

* Fix pep8 issue
2017-08-05 17:07:51 +02:00
René Moser
fdaa803cca cloudstack: cs_vmsnapshot: fix pep8 (#27792) 2017-08-05 10:34:17 +02:00
René Moser
f1ef61da4e cloudstack: cs_domain: tests: add update tests (#27791) 2017-08-05 10:33:01 +02:00
Trishna Guha
edb5760723 nxos_vpc doc update to handle confirmation prompt (#27796)
Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>
2017-08-05 11:05:38 +05:30
Sam Doran
cb7b44f9e4 Remove _diff from play_context default
Follow up from PR #27746
2017-08-04 15:25:40 -04:00
Dag Wieers
25e67d804c iso_extract: Reimplement using 7zip (not requiring root) (#24937)
* Reimplement iso_extract using 7zip (not requiring root)

So one of the drawbacks of the original implementation is that it required root for mounting/unmount the ISO image.
This is now no longer needed as we use 7zip for extracting files from the ISO.

* Fall back to using mount/umount if 7zip not found

As discussed with others.

Also improved integration tests.
2017-08-04 14:38:42 -04:00
James Cammarata
e0b0e61b32 Properly copy the role path when the IncludeRole object is copied
This exposed some additional errors in logic in IncludeFile, which
had to be fixed to deal with the fact that the role path (unlike paths
from includes) are always absolute paths.

Fixes #27345
2017-08-04 14:30:40 -04:00
Jacky Hu
c770d657f3 Enable url lookup without a proxy
By introducing a use_proxy parameter to url lookup, the usage of proxy
is totally controllable.

(cherry picked from commit 11e4e51235)
from #23811
2017-08-04 14:20:43 -04:00
Benjamin
8fc113219c Enhance maven_artifact with a keep_name option (#22339)
It allows retaining the version number in the downloaded artifact's name when the version to be downloaded is dynamically determined ('latest').

So far, the behavior was to overwrite the version string in the artifact name with 'latest' which leaves no trace of what version the downloaded artifact has. E.g., you cannot use this information for further processing like transferring it to an RPM that is built from the artifact.

This fulfills feature request ansible/ansible#22337
2017-08-04 11:30:37 -06:00
Jérôme Guilbot
e29daf34f7 [s3_sync] Add cache_control option (#27388) 2017-08-04 12:35:08 -04:00
David Barroso
0f60041dea Handle better the many ways information can be passed around (#27506)
* Handle better the many ways information can be passed around

* Fixing pep8 complaints

* Removing message
2017-08-04 09:25:11 -07:00
Dag Wieers
a98e3fb81f Add RETURN information, doc improvements and PEP8
This PR includes:
- RETURN information (since the difference between status_code and
  status was confusing)
- Improvements to parameter definition (and docs)
- PEP8 compliancy
2017-08-04 08:21:50 -07:00
10sr
000f8dcc8f Fix bug that diff.always = yes in ansible.cfg won't be respected (#27746) 2017-08-04 10:42:38 -04:00
Keith Hawkridge
f62fa16a89 [cloud] Fix Dead Letter config property name (#27733)
Closes #27688
2017-08-04 10:21:36 -04:00
Pilou
b57af4428d rhn_register: fix broken imports, add unit tests (#26878)
Fix 'module' object is not callable

* rhn_register: fix Python 3 compatibility
* rhn_register: update requirements
* rhn_register: add unit tests
* Add missing method name
* use a dedicated line for XML related requirements
* rhn_register: drop support for Python 2.4
* rhn_register unit tests: fix Python 3 compatibility
* refactor in order to check order of the requests
2017-08-04 10:12:27 -04:00
Dag Wieers
0342760f5b sefcontext: PEP8 compliancy (#27742) 2017-08-04 10:01:17 -04:00
Philippe Dellaert
6d33e59ca1 Fix for subspec options validation issue #27715 (#27728)
* Fix for issue ansible/ansible#27715

* Also fixing mutually exclusive check

* Updating subspec checks
These changes take into account a spec with all features enabled and do
the following tests for subspecs:
1. Test proper specs
2. Test Alias
3. Test missing required param
4. Test mutually exclusive params
5. Test required if params
6. Test required one of params
7. Test required together params
8. Test required if params with a default value
9. Test basis subspec params
10. Test invalid subsec params
2017-08-04 19:10:38 +05:30
Toshio Kuratomi
3f12fccd02 Fix several things causing tracebacks with unicode cwd (#27731)
Fixes #27511
2017-08-04 09:25:08 -04:00
Sloane Hertel
de5f8f1ec4 [cloud] allow module_utils to get creds without boto installed (#27647)
Would try to grab creds from `boto.config` and lead to a NameError in some cases.
2017-08-04 09:02:21 -04:00
René Moser
5700b09610 cloudstack: new module cs_instance_nic_secondaryip, replaces cs_nic (#26491) 2017-08-04 15:01:12 +02:00
Peter Sprygada
7b604368d3 adds new filter plugins for network use cases (#27695)
* adds new filter plugins for network use cases

* adds parse_cli filter
* adds parse_cli_textfsm filter
* adds Template class to network_common
* adds conditional function to network_common

* fix up PEP8 issues
2017-08-04 07:47:12 -04:00
Dag Wieers
a34ef12d73 hpilo modules: PEP8 fixes (#27739) 2017-08-04 11:52:31 +02:00
Ganesh Nalawade
d3e5d30f7c Add aggregate for junos modules and sub spec validation (#27726)
* Add aggregate for junos modules and sub spec validation

*  aggregate support of junos modules
*  aggregate sub spec validation
*  relevant changes to junos integration test
*  junos module boilerplate changes

* Add new boilerplate for junos modules

* Fix CI issues
2017-08-04 14:55:58 +05:30
Dag Wieers
bcb3e33adb command: PEP8 compliancy (#27740) 2017-08-04 08:39:13 +02:00
Dag Wieers
d125520071 imc_rest: Increase default timeout, add elapsed time (#26743)
The IMC interface can be quite slow depending on the XML fragments used.
So we increase the default timeout to 60 seconds, and return the elapsed
time so it is easier to determine what timeout value makes sense from
earlier runs.

We also renamed **imc_xml** to **imc_rest**, now that we still can.
2017-08-04 07:15:27 +01:00
Alex Bush
8e8d4df340 #26903 Invalid JSON-RPC request (#26906) 2017-08-04 01:26:20 -04:00
Dag Wieers
60276b60a2 win_stat: Add stat.isreg support (#27732)
* win_stat: Add stat.isreg support

This PR includes the following changes:
- Adds stat.isreg support (cfr. the stat module)
- Always returns stat.isdir, stat.islnk, stat.isreg, stat.isshared

* Remove the controversial part
2017-08-04 13:55:58 +10:00
Adam Miller
91ea8e5eaf Fixes #23895 firewalld handle port arg whitespace (#27577)
Signed-off-by: Adam Miller <maxamillion@fedoraproject.org>
2017-08-03 14:19:25 -07:00
Will Thames
4e0666fc4a Add oracle-se2 database support (#23482)
Fixes ansible-modules-core#4808
2017-08-03 17:15:18 -04:00
Toshio Kuratomi
fbf6cb8fff Add boilerplate to fetch.py
This completes the modules/files directory so we can now check it for
regressions.
2017-08-03 13:15:12 -07:00
Sloane Hertel
467a1f54a3 s3_bucket: fix python3 sorting incompatibility (#27502)
* s3_bucket: fix policy sorting for python3 so strings are evaluated as less than tuples.

Add tests to ensure this behavior is maintained.

* Fix s3_bucket comparison function to work on both Python 3.5 and 3.6

* s3_bucket: document that cmp_to_key is used for python 2.7.

Add another test for s3_bucket to compare policies of different sizes.

* fix pep8

* Work around code-smell grepping by not using the word 'cmp'.
2017-08-03 15:41:26 -04:00
Pilou
96784160b1 rhn_register: call logout (#27533)
* missing requirement: list sufficient pkgs in error

* rhn_register: call logout when necessary

* rhn_register: remove useless return, small rewrite
2017-08-03 15:05:59 -04:00
Sloane Hertel
dbbad16385 [cloud] New module: Add module for managing AWS Datapipelines (cloud/amazon/data_pipeline) (#22878)
* New module for managing AWS Datapipelines

* Supports create/activate/deactivate and deletion
* Handles idempotent creation by embeding the version in the
uniqueId field
* Waits for requested state to be reached, as Botocore doesn't
have waiters yet for datapipelines

* rename module, fix imports, add tags option, improve exit_json results, fix a couple bugs, add a TODO so I don't forget

fix pep8

allow timeout to be used for pipeline creation

make .format syntax uniform

fix pep8

fix exception handling

allow pipeline to be modified, refactor, add some comments, remove unnecessary imports

pipeline activation may not be in the activated state long

remove datapipeline version option

change a loop to a list comprehension

create idempotence by hashing the options given to the module minus the objects (which can be modified)

small bugfix

* data_pipeline unittests

make unittests pep8

fix bug in unittests

* remove exception handling that serves no purpose

* Fix python3 incompatibilities in datapipeline tests and add placebo fixture maybe_sleep for faster tests

Fix python3 incompatibilities in data_pipeline build_unique_id()

Don't delete a pipeline in diff_pipeline() because it's unexpected

Don't use time.time() because it causes an issue with placebo testing

re-recorded tests

fix pep8 in data_pipeline

Remove disable_rollback from tests

Make sure unique identifier is a string

re-record tests

* improve documentation and add another example

* use a placebo fixture instead of redundant code in tests

fix tests for PLACEBO_RECORD=false

* Fix data_pipeline docs

use isinstance instead of type()

fix documentation

* fix documentation

* Remove use of undefined variable from data_pipeline module and fix license

* fix copyright header
2017-08-03 15:04:10 -04:00
Dmitry Telegin
6841763d70 Support install root in URPMI module. Fixes #23475 2017-08-03 11:35:33 -07:00
Sam Doran
af558698a0 Include aliases in ansible-doc output (#27702)
* Properly include aliases in ansible-doc output

Use correct variable name for storing aliases and only print them out if the list isn't empty.

Fixes #24498

* Only include choices in output if choices exist in the list
2017-08-03 10:38:08 -07:00
Abhijeet Kasurde
97240a9ebc Fix for missing import and boilerplate
Fix adds missing imports and boilerplate for proxysql.
It also remove get_exception calls in-favor of native exception.

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2017-08-03 09:40:44 -07:00
Chris Chambers
afbad8789f cachamber - Issue #27566 - Correct urlparse import for maven_artifact module 2017-08-03 09:33:55 -07:00
Chad Bean
661d81ef86 Add new API param for new_host_delay (#21262) 2017-08-03 10:31:11 -06:00
Abhijeet Kasurde
bf54a0c3e5 Fix missing import and boilerplate
Added fix for missing imports and boilerplate in files modules,
also, removed get_exception calls to match 2.6> exception handling.

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2017-08-03 08:39:15 -07:00
Will Thames
11da85f938 timer callback plugin: handle timezone changes better
A playbook that does `timezone name=Australia/Brisbane` on
a host previously in UTC will appear to take 10 hours.

Improve the seconds handling for playbooks that take longer
than one hour.
Improve the hours handling for playbooks that take longer than
one day.

TZ change before:
```
Playbook run took 0 days, 10 hours, 0 minutes, 36055 seconds
```
After:
```
Playbook run took 0 days, 0 hours, 0 minutes, 55 seconds
```

Sleep for 100s more than one hour before:
```
Playbook run took 0 days, 1 hours, 1 minutes, 3641 seconds
```

After:
```
Playbook run took 0 days, 1 hours, 1 minutes, 41 seconds
```
2017-08-03 11:09:27 -04:00
Mark McKinstry
f17cb253a4 pear: add option for path to pear executable (#19200)
* add option for path to pear executable

this is useful if you have multiple versions of PHP installed at once,
using SCL PHP RPMs from Red Hat or some other method

* update version number

* improve wording
2017-08-03 17:08:16 +02:00