Commit graph

20072 commits

Author SHA1 Message Date
Toshio Kuratomi
1ecf51d87e * Fix race in creating temp directories pre-fork (#16965)
* These can still race when multiple ansible processes are created at
    the same time.
* Reverse order of expanduser and expandvars in unfrakpath(). So that
  tildes in environment variables will be handled.
2016-08-04 19:35:36 -04:00
Matt Davis
746ea64d30 fix for unspecified retries on until + test (#16963)
fixes #16907
2016-08-04 19:20:45 -04:00
Brian Coca
bced8715cd add transparent vault use to other plugins (#16957)
assemble, script and unarchive (copy already had it).
2016-08-04 18:35:30 -04:00
Will Thames
eb2a3a91a8 task_result _check_key should handle empty results (#16766)
When a task result has an empty results list, the
list should be ignored when determining the results
of `_check_key`. Here the empty list is treated the
same as a non-existent list.

This fixes a bug that manifests itself with squashed
items - namely the task result contains the correct
value for the key, but an empty results list. The
empty results list was treated as zero failures
when deciding which handler to call - so the task
show as a success in the output, but is deemed to
have failed when deciding whether to continue.

This also demonstrates a mismatch between task
result processing and play iteration.

A test is also added for this case, but it would not
have caught the bug - because the bug is really in
the display, and not the success/failure of the
task (visually the test is more accurate).

Fixes ansible/ansible-modules-core#4214
2016-08-04 17:13:33 -05:00
Ryan Brown
4f7996fbc1 Merge pull request #16879 from alikins/gce_module_utils
Fix import of gce/gcdns without a libcloud module
2016-08-04 16:16:01 -04:00
James Cammarata
159aa26b36 FEATURE: adding variable serial batches
This feature changes the scalar value of `serial:` to a list, which
allows users to specify a list of values, so batches can be ramped
up (commonly called "canary" setups):

- hosts: all
  serial: [1, 5, 10, "100%"]
  tasks:
  ...
2016-08-04 15:04:10 -05:00
Nick Heiner
3a83333ef2 Small grammar fixes. (#16955) 2016-08-04 15:13:41 -04:00
ovcharenko
f326e49d75 Fix for issue @synchronize doesn't substitute variables properly #16347 (#16349)
* Fix for issue @synchronize doesn't substitute variables properly #16347
2016-08-04 11:27:44 -07:00
Hidetoshi Hirokawa
595946b80e Fix the security rules name duplication of azure_rm_common. (#16897) 2016-08-04 10:43:30 -07:00
victoru
14901b65d9 raise AnsibleError in hashi_vault lookup plugin when hvac module is not installed (#16859) 2016-08-04 10:06:12 -07:00
Andrew Dolby
cbbc643317 add default location and env override (#16854) 2016-08-04 09:54:44 -07:00
Oskar Wyciślak
8e956675f7 Strip group names of whitespaces, so we can use space after comma in openstack's groups metadata field. (#16843) 2016-08-04 09:45:15 -07:00
Brian Coca
7ea56e1c79 optimize booleanifycation 2016-08-04 11:32:26 -04:00
Brian Coca
b0786a1845 actually skip bad/broken module files found 2016-08-04 11:32:08 -04:00
Brian Coca
98c149859a added y/n to list of module booleans 2016-08-04 10:47:05 -04:00
Brian Coca
27691991c3 refactored ethtool data to allow for other callers 2016-08-04 10:41:50 -04:00
Brian Coca
dd12a6b310 document 'no booleans in choices' 2016-08-04 10:41:50 -04:00
Adrian Likins
d8ea0c3dfe Add links to gh issues for vault roadmap items 2016-08-04 10:20:45 -04:00
James Cammarata
a9b725aa10 Updating packaging vars for new version 2.1.1 2016-08-03 15:48:14 -05:00
James Cammarata
a6840b940b Updating release playbook
* Now generates SHA file for tar.gz too
2016-08-03 15:48:14 -05:00
Matt Clay
5f12731797 Run more integration tests on FreeBSD. (#16923) 2016-08-02 14:00:56 -07:00
Matt Clay
00fbc76e69 Increase async time limit on tests to 10 seconds. (#16921) 2016-08-02 13:30:26 -07:00
Matt Clay
ff4f4bc8a0 Add binary module tests to Windows CI. (#16914) 2016-08-02 10:42:07 -07:00
Brian Coca
f7570f1dc4 Implicit localhost ondemand (#16900)
* Revert "There can be only one localhost"

This reverts commit 5f1bbb4fcd.
this broke several usages of localhost, see #16882, #16898 and #16886

* ensure there is only 1 localhost

fixes #16886, #16882 and #16898

- make sure localhost exists before returning it
- optimzed host caching
- ensure we always return a host object
2016-08-02 10:39:00 -04:00
Matt Clay
17e4629d52 Add remote CI support for modules. (#16908) 2016-08-01 15:39:17 -07:00
Dick Davies
fc6b841b2f correct ini variable name (#16901)
cache_path is used to calculate cache_dir , the script doesn't actually read cache_dir from this file.

This makes the setting work (otherwise it always uses the default).
2016-08-01 17:34:06 -04:00
Matt Clay
e2602e9be0 Add FreeBSD to Shippable CI. (#16883) 2016-08-01 13:46:37 -07:00
Matt Clay
6dc148d82c Download files from S3 to improve reliability. (#16891)
Binary module tests now download pre-compiled binaries from S3
instead of downloading go and compiling the modules.

Files downloaded form SourceForge are now downloaded from S3.
2016-07-31 08:48:32 -07:00
Brian Coca
123d54e736 added pid to backup file name to avoid collisions 2016-07-29 23:04:57 -04:00
Adrian Likins
36bf1e6b7e Fix funcd to at least import without errors. (#16288)
This plugin was using very old api, so was
updated to newer api.

Also misc style/pep8 cleanups.
2016-07-29 16:19:38 -04:00
Adrian Likins
20ef8d5aaf Disable 'xmllint' checks in a2x (#16317)
It brings in a libxml2 dep to the docs build
require. The a2x default of xmllint invocation
attempts to make outgoing requests to download
XML DTD's, despite a2x using the '--nonet' flag.
2016-07-29 16:02:02 -04:00
Adrian Likins
6fdd8c4a98 Fix the doctype attribute in man page asciidocs (#16696)
The asciidoc.in sources had an attribute like:

:doctype:manpage

That attribute was not being correctly rendered in a2x
resulting in the 'doctype:manpage' showing up in a spurious
additional AUTHOR section at the end of the generated man pages like:

AUTHOR
       :doctype:manpage

Fix with correct formatting of 'doctype' attribute.
2016-07-29 15:59:35 -04:00
scottb
e0318f752d Merge pull request #16418 from alikins/docs-api
Add docs-api to generate api docs with sphinx
2016-07-29 12:37:02 -07:00
Adrian Likins
fa1d55f683 Fix import of gce/gcdns without a libcloud module
The module level function defs for gcdns_connect() and
gce_connect() provide a default arg for 'provider' that
references into the libcloud module. If the libcloud
modules were not installed, the gce/gcdns python modules
would throw ImportError.

Let the provider arg default to None and if not provided,
set it to the default libcloud.compute.types.Provider.*
value if the modules are installed.
2016-07-29 13:34:09 -04:00
Gennady Trafimenkov
2bc679be07 Testing that service not enabled during check run (#16739)
* Enabled more tests in test_service on systems with systemd.
* Fix inconsistency in cleaning up test service. The conditions for service setup and service cleanup were different.
* Add check mode run for service enable.
2016-07-29 08:35:03 -07:00
Matt Clay
380ed053e8 Add Windows integration tests to Shippable. (#16803)
Enable Windows integration tests on Shippable.
2016-07-28 21:03:14 -07:00
Ryan S. Brown
bed24689ec Fix syntax error in json/jsonarg type parser
The lack of a comma caused the statement to always evaluate as a
`TypeError` when python interpreted `value (list, tuple, dict)` to call
value with the arguments list, tuple, and dict.
2016-07-28 15:54:09 -04:00
William Albert
409d95d67e Refactored gce util module to support other GCP services (#15924)
This is a refactoring of the existing GCE utility module to support other projects on Google Cloud Platform.

The previous gce.py module was hard-coded specifically for GCE, and attempting to use it with other projects in GCP failed.

See https://github.com/ansible/ansible/pull/15918#issuecomment-220165913  for more detail.

This has also been an issue for others in the past, although they've handled it by simply
duplicating some of the logic of gce.py in their own modules.

-   The existing gce.py module was renamed to gcp.py, and modified to remove any 
     imports or other code that refers to libcloud.compute or GCE (the GCE_* params were
     retained for compatibility). I also renamed the gce_connect function to gcp_connect, 
     and modified the function signature to make supplying a provider, driver, and agent 
     information mandatory.

-  A new gce.py module was created to handle connectivity to GCE. It imports the
   appropriate libcloud.compute providers and drivers, and then passes them on
   to gcp_connect in gcp.py. The constants and function signatures are the same
   as the old gce.py, so compatibility with existing modules is retained.

- A new gcdns.py module was created to support PR ansible/ansible-modules-extras#2252
  for two new Google Cloud DNS modules, and to demonstrate support for a non-GCE 
  Google Cloud service. It follows the same basic structure as the new gce.py module,
  but imports from libcloud.dns instead.
2016-07-28 12:54:39 -04:00
Abhijit Menon-Sen
99ae82dc1b Merge pull request #16852 from yunque/patch-1
Grammatical clarification and stylistic uniformity
2016-07-28 16:22:30 +05:30
yunque
d1e4aa76a7 Grammatical clarification and stylistic uniformity
Made more legible by removing unnecessary punctuation, formatting special words (e.g. `sudo`), and a few other minor grammatical changes.
2016-07-28 11:25:07 +01:00
David Shrewsbury
73f06e67df Update CHANGELOG for new os_zone and os_recordset modules (#16847) 2016-07-27 18:42:32 -04:00
Adrian Likins
aece03312f Add a doc note that local_tmp was added in 2.1 (#15730)
Fixes #15719
2016-07-26 10:57:06 -07:00
Lukas Pirl
a9aea3c6d4 (re)allow ansible_python_interpreter to contain more than 1 arg (#16247) 2016-07-26 07:46:16 -07:00
Brian Coca
92870ee996 jsonarg bikeshed to json, arg type implies 'arg' 2016-07-26 09:50:21 -04:00
Brian Coca
4e14b7b783 warn when searching for an empty string or null 2016-07-26 08:26:07 -04:00
Toshio Kuratomi
04a60a1db4 Update submodule refs 2016-07-26 05:22:59 -07:00
scottb
eba3e51cb9 Merge pull request #15172 from charleswhchan/patch-1
Improve documentation.
2016-07-25 23:50:48 -07:00
Gennady Trafimenkov
ad24f2d206 Enable color output from integration tests in Docker containers (#16660)
Enable color output from integration tests in Docker containers:

* In run_tests.sh when output is attached to a terminal.
* In shippable/integration.sh using force mode (can be disabled).

Also fix blocks tests to work with or without color output
2016-07-25 14:07:15 -07:00
Toshio Kuratomi
7e54c9a468 No longer try to import __version__ from release.py. (#16817)
I'm not sure why that would be desirable -- we really want __version__
to come from the controller whereas importing will come from the client
node.  If it turns out there was a reason to do that, please be sure to
use an exception handler that catches all exceptions instead of only
catching ImportError:

```
try:
    from ansible.release import __version__, __author__
except:
    __version__ = [...]
```

Fixes #16523
2016-07-25 11:16:27 -07:00
Matt Clay
9497a814a8 Add apache2 to improve test speed and reliability. (#16819) 2016-07-25 07:19:49 -07:00