summaryrefslogtreecommitdiff
path: root/lib
Commit message (Collapse)AuthorAgeFilesLines
* Avoid copying task parents in TaskExecutorperformance_improvementsJames Cammarata2016-08-081-1/+2
| | | | | As Block.copy() is potentially expensive, avoid copying the parent structure of tasks in TaskExecutor.
* Move tasks/blocks to a single parent modelJames Cammarata2016-08-0811-165/+182
|
* Performance improvementsJames Cammarata2016-08-0814-442/+277
|
* correctly detect actionBrian Coca2016-08-081-1/+1
| | | | | named matched only cause i set it to the same in my tests fixes #14857
* Update submodule refsToshio Kuratomi2016-08-082-11/+14
|
* Fix from @jimi-c to use task_vars when polling async tasks. (#17003)Toshio Kuratomi2016-08-081-3/+6
| | | | | | This is needed so that async_status can use ansible_python_interpreter for the host being contacted. Fixes #14101
* Add partition uuid to facts for Linux. (#16986)Erik Berg2016-08-081-0/+14
| | | Works by looking for partition name in /dev/disk/by-uuid
* Add generic data structures querying (#13684)Filipe Niero Felisbino2016-08-081-0/+48
| | | | | | | | | | | | | | | | | | | | | | * Query lookup plugin * Add license and docstrings * Add python3-ish imports * Change query plugin type from lookup to filter * Switch from dq to jsonpath_rw * Add integration test for query filter * Rename query filter to json_query * Add jsonpath-rw * Rename query filter to json_query * Switch query implementation from jsonpath-rw to jmespath
* Fix hipchat callback "has no attribute display'" (#16998)Adrian Likins2016-08-081-4/+4
| | | | | | Use self._display for access to display object for the hipchat callback plugin. Fixes #16946
* Use file list, not recursion, in _fixup_perms. (#16924)Matt Clay2016-08-0510-75/+54
| | | | | | | | | Run setfacl/chown/chmod on each temp dir and file. This fixes temp file permissions handling on platforms such as FreeBSD which always return success when using find -exec. This is done by eliminating the use of find when setting up temp files and directories. Additionally, tests that now pass on FreeBSD have been enabled for CI.
* Add missing boilerplate code. (#16980)Matt Clay2016-08-051-0/+3
|
* Update submodule refs.Matt Clay2016-08-051-5/+5
|
* Debug output callback (#16839)James Pic2016-08-051-0/+35
| | | | | | | | * Added debug output callback * Better import * Comment on line
* Update submodule refsToshio Kuratomi2016-08-052-16/+11
|
* Tweak the way the debug strategy imports the linear strategy parentJames Cammarata2016-08-051-2/+2
| | | | | | | | Due to the way we load plugins, internally to Python there can be issues when the debug strategy is loaded after the linear strategy. To work around this, we're changing the import line for the linear strategy to avoid the problem. Related to #16825
* YAML treats some unquoted strings as booleans. For instance, (#16961)Toshio Kuratomi2016-08-051-3/+35
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | uri: follow_redirects: no Will lead yaml to set follow_redirects=False. This is problematic when the module parameter is not a boolean value but a string. For instance: follow_redirects = dict(required=False, default='safe', choices=['all', 'safe', 'none', 'yes', 'no']), Our parameter validation code ends up getting follow_redirects="False" instead of "no". The 100% fix is for the user to quote their strings in playbooks like: uri: follow_redirects: "no" But we can fix quite a few common cases by trying to switch "False" back into the string that it was specified as. We only do this if there is only one correct choices value that could have been specified. In the follow_redirects example, a value of "True" only maps back to "yes" and a value of "False" only maps back to "no" so we can do this. If choices also contained "on" and "off" then we couldn't map back safely and would need to force the module author to change the module to handle this case. Fixes parts of the following PRs: * https://github.com/ansible/ansible-modules-core/pull/4220 * https://github.com/ansible/ansible-modules-extras/pull/2593
* * Fix race in creating temp directories pre-fork (#16965)Toshio Kuratomi2016-08-042-2/+3
| | | | | | * 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.
* fix for unspecified retries on until + test (#16963)Matt Davis2016-08-041-1/+3
| | | fixes #16907
* add transparent vault use to other plugins (#16957)Brian Coca2016-08-043-3/+4
| | | assemble, script and unarchive (copy already had it).
* task_result _check_key should handle empty results (#16766)Will Thames2016-08-041-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | 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
* Merge pull request #16879 from alikins/gce_module_utilsRyan Brown2016-08-042-2/+4
|\ | | | | Fix import of gce/gcdns without a libcloud module
| * Fix import of gce/gcdns without a libcloud moduleAdrian Likins2016-07-292-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | 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.
* | FEATURE: adding variable serial batchesJames Cammarata2016-08-044-24/+79
| | | | | | | | | | | | | | | | | | | | | | 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: ...
* | Fix for issue @synchronize doesn't substitute variables properly #16347 (#16349)ovcharenko2016-08-041-4/+1
| | | | | | * Fix for issue @synchronize doesn't substitute variables properly #16347
* | Fix the security rules name duplication of azure_rm_common. (#16897)Hidetoshi Hirokawa2016-08-041-3/+3
| |
* | raise AnsibleError in hashi_vault lookup plugin when hvac module is not ↵victoru2016-08-041-1/+1
| | | | | | | | installed (#16859)
* | optimize booleanifycationBrian Coca2016-08-041-1/+3
| |
* | actually skip bad/broken module files foundBrian Coca2016-08-041-0/+1
| |
* | added y/n to list of module booleansBrian Coca2016-08-041-2/+2
| |
* | refactored ethtool data to allow for other callersBrian Coca2016-08-041-18/+18
| |
* | Implicit localhost ondemand (#16900)Brian Coca2016-08-022-29/+51
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Revert "There can be only one localhost" This reverts commit 5f1bbb4fcdea21b106367a5a426dc6f2b4851b9c. 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
* | added pid to backup file name to avoid collisionsBrian Coca2016-07-291-1/+1
| |
* | Fix funcd to at least import without errors. (#16288)Adrian Likins2016-07-291-9/+14
| | | | | | | | | | | | This plugin was using very old api, so was updated to newer api. Also misc style/pep8 cleanups.
* | Fix syntax error in json/jsonarg type parserRyan S. Brown2016-07-281-1/+1
|/ | | | | | 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.
* Refactored gce util module to support other GCP services (#15924)William Albert2016-07-283-82/+177
| | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* (re)allow ansible_python_interpreter to contain more than 1 arg (#16247)Lukas Pirl2016-07-261-9/+4
|
* jsonarg bikeshed to json, arg type implies 'arg'Brian Coca2016-07-261-0/+1
|
* warn when searching for an empty string or nullBrian Coca2016-07-261-1/+3
|
* Update submodule refsToshio Kuratomi2016-07-262-10/+17
|
* No longer try to import __version__ from release.py. (#16817)Toshio Kuratomi2016-07-251-1/+3
| | | | | | | | | | | | | | | | 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
* Update submodule refsToshio Kuratomi2016-07-252-13/+10
|
* set cwd to task's basedir (#16805)Brian Coca2016-07-252-2/+8
| | | | | | | | | | | | | * switch cwd to basedir of task This restores previous behaviour in pre 2.0 and allows for 'local type' plugins and actions to have a more predictable relative path. fixes #14489 * removed FIXME since prev commit 'fixes' this * fix tests, now they need a loader (thanks jimi!)
* added check and diff mode control to consoleBrian Coca2016-07-252-1/+17
| | | | | also expanded mk_boolean to allow for 'on/off' fixes #16815
* Adding ethtool info to Ansible interface facts (#16513)Joe (rook)2016-07-241-2/+21
| | | | | This will give the user details on how the interfaces are configured. They user could query to see if TSO, GSO, etc are enbaled on an interface.
* allow include_vars to namespace importsBrian Coca2016-07-241-1/+11
|
* Merge pull request #16779 from mirskifa/develJames Cammarata2016-07-241-7/+11
|\ | | | | Make returning results after loading vars optional
| * Make returning results after loading vars optionalAlex Mirski-Fitton2016-07-211-7/+11
| | | | | | | | | | Reinstates some functionality removed by commit 0ba9a6a but makes the expensive operation optional (and default to off)
* | indent callback output if using 3verbosity or higher (#16231)Matt Martz2016-07-231-1/+1
| |
* | Colorize around text (#16415)Alexandre Garnier2016-07-231-3/+3
| | | | | | | | Avoid to colorize separately `lead`, equals sign and `num` and separate them by coloring characters.
* | add check_mode option for tasks (#16056)Robin Roth2016-07-222-1/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * add check_mode option for tasks includes example testcases for the template module * extend check_mode option * replace always_run, see also proposal rename_always_run * rename always_run where used and add deprecation warning * add some documentation * have check_mode overwrite always_run * use unique template name to prevent conflicts test_check_mode was right before, but failed due to using the same filename as other roles * still mention always_run in the docs * set deprecation of always_run to version 2.4 * fix rst style * expand documentation on per-task check mode