summaryrefslogtreecommitdiff
path: root/lib/ansible/plugins/callback
Commit message (Collapse)AuthorAgeFilesLines
* Transition inventory into plugins (#23001)Brian Coca2017-05-231-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * draft new inventory plugin arch, yaml sample - split classes, moved out of init - extra debug statements - allow mulitple invenotry files - dont add hosts more than once - simplified host vars - since now we can have multiple, inventory_dir/file needs to be per host - ported yaml/script/ini/virtualbox plugins, dir is 'built in manager' - centralized localhost handling - added plugin docs - leaner meaner inventory (split to data + manager) - moved noop vars plugin - added 'postprocessing' inventory plugins - fixed ini plugin, better info on plugin run group declarations can appear in any position relative to children entry that contains them - grouphost_vars loading as inventory plugin (postprocessing) - playbook_dir allways full path - use bytes for file operations - better handling of empty/null sources - added test target that skips networking modules - now var manager loads play group/host_vars independant from inventory - centralized play setup repeat code - updated changelog with inv features - asperioribus verbis spatium album - fixed dataloader to new sig - made yaml plugin more resistant to bad data - nicer error msgs - fixed undeclared group detection - fixed 'ungrouping' - docs updated s/INI/file/ as its not only format - made behaviour of var merge a toggle - made 'source over group' path follow existing rule for var precedence - updated add_host/group from strategy - made host_list a plugin and added it to defaults - added advanced_host_list as example variation - refactored 'display' to be availbe by default in class inheritance - optimized implicit handling as per @pilou's feedback - removed unused code and tests - added inventory cache and vbox plugin now uses it - added _compose method for variable expressions in plugins - vbox plugin now uses 'compose' - require yaml extension for yaml - fix for plugin loader to always add original_path, even when not using all() - fix py3 issues - added --inventory as clearer option - return name when stringifying host objects - ajdust checks to code moving * reworked vars and vars precedence - vars plugins now load group/host_vars dirs - precedence for host vars is now configurable - vars_plugins been reworked - removed unused vars cache - removed _gathered_facts as we are not keeping info in host anymore - cleaned up tests - fixed ansible-pull to work with new inventory - removed version added notation to please rst check - inventory in config relative to config - ensures full paths on passed inventories * implicit localhost connection local
* Fixed import of urlencode and pathname2url from urllib for python3 (#24424)Michael2017-05-191-2/+2
|
* Fix circular import with unsafe_proxy, template, and varsToshio Kuratomi2017-04-281-2/+2
| | | | | | | 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.
* Fix nonexistent module_name in callbacks (#23587)Antoine Cotten2017-04-172-5/+3
|
* removed extra 'changed' from debug outputBrian Coca2017-04-131-2/+4
|
* Migrate most uses of if type() to if isinstance()Toshio Kuratomi2017-04-042-4/+8
| | | | | | 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
* Update module_utils.six to latest (#22855)Toshio Kuratomi2017-03-233-3/+5
| | | | | | | | * 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.
* Enable documentation in pluginsBrian Coca2017-03-231-1/+8
| | | | | | | | | | | | | Made ansible-doc more plugin agnostic We can have docs in lookup, callback, connectionm strategy, etc Use first docstring and make pepizis happy generalized module_docs to plugin_docs documented cartesian, ssh, default, jsonfile, etc as examples changed lack of docs to warning when listing made smarter about bad docstrings better blacklisting added handling of options/config/envs/etc move blacklist to find_plugins, only need once
* E501 fixes (#22879)Matt Martz2017-03-223-5/+12
|
* Cast syslogport value from getenv as int (#22664)jralbert2017-03-161-1/+1
| | | | SysLogHandler requires an int for port, but getenv produces a string. Cast return from getenv as int to overcome this mismatch.
* Exceptit (#21864)Brian Coca2017-02-273-28/+19
| | | | | | * more centralized exception handling * only remove when verboxse
* Fix 'task name is not templated in retry callback' (add task_name property ↵Adrian Likins2017-02-241-1/+2
| | | | | | | | | | | | | | to TaskResult) (#21214) Fix 'task name is not templated in retry callback' Add a task_name property to TaskResult that knows to check in TaskResult._task_fields. Add integration test for v2_retry_runner callback Fixes #18236
* Remove the end of the task_data.path which causes #21461James2017-02-151-3/+12
|
* Fix junit callback handling of surrogate escapes.Matt Clay2017-02-151-1/+6
|
* default and minimal callback: display warnings in a consistent manner (#21144)Pilou2017-02-082-4/+10
| | | | | | * default/minimal callback: don't display warnings twice * minimal callback: display warnings raised by MODULE_NO_JSON modules
* remove warning/deprecation keys after usageBrian Coca2017-02-081-0/+2
|
* allow debug to be 'changed' (#20957)Brian Coca2017-02-021-2/+0
| | | | | | | | * allow debug to be 'changed' fixes #14430 * removed test that checked against this
* module_utils: implement deprecation warning for params (#20884)René Moser2017-02-011-1/+1
| | | | | | | | * module_utils: implement deprecation warning for params * rename deprecated_version to removed_in_version * fix pep8 E121
* added warnings list to module and autoaddBrian Coca2017-01-311-3/+7
| | | | | | | | | added better way of adding warnings to return data backwards compatible if warnings key already exists added deprecations made iface more generic changed to enforce type per item added logging of warnings/deprecations also display deprecations by default
* PEP 8 indent cleanup. (#20800)Matt Clay2017-01-293-6/+6
| | | | | | | | * PEP 8 E121 cleanup. * PEP 8 E126 cleanup. * PEP 8 E122 cleanup.
* PEP 8 cleanup. (#20789)Matt Clay2017-01-281-1/+1
| | | | | | | * PEP 8 E703 cleanup. * PEP 8 E701 cleanup. * PEP 8 E711 cleanup. * PEP 8 W191 and E101 cleanup.
* PEP 8 W291 whitespace cleanup.Matt Clay2017-01-272-5/+5
|
* PEP 8 whitespace cleanup. (#20783)Matt Clay2017-01-272-2/+2
| | | | | | * PEP 8 E271 whitespace cleanup. * PEP 8 W293 whitespace cleanup. * Fix whitespace issue from recent PR.
* Fix issue with cc and bcc getting added to mail if unset (#20610)jonathanbouvier2017-01-251-2/+2
|
* First release of the callback selective.py (#17309)David Barroso2017-01-231-0/+258
|
* Improve --diff output when files lack trailing newlinesMarius Gedminas2017-01-091-5/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The behavior now matches GNU diff. Fixes #14094. Example of output before this change: TASK [healthchecks.io : hourly healthchecks.io ping] *************************** changed: [ranka] --- before: /etc/cron.hourly/mg-healthchecks-dot-io +++ after: /tmp/tmpOTvXTw @@ -1,2 +1,2 @@ #!/bin/sh -curl -sS https://hchk.io/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx > /dev/null+curl -sS https://hchk.io/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx > /dev/null after this change: TASK [healthchecks.io : hourly healthchecks.io ping] *************************** changed: [ranka] --- before: /etc/cron.hourly/mg-healthchecks-dot-io +++ after: /tmp/tmpOTvXTw @@ -1,2 +1,2 @@ #!/bin/sh -curl -sS https://hchk.io/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx > /dev/null \ No newline at end of file +curl -sS https://hchk.io/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx > /dev/null The added unit tests contain more examples. This commit also takes care to avoid "no newline at EOF" warnings when no_log is in effect, and also when modules return dicts rather than strings. (It also removes trailing whitespace from using json serialization when diffing dicts, because I hate trailing whitespace in Python source files, even if they're test files.)
* allow modules to set custom stats (#18946)Brian Coca2017-01-051-0/+16
| | | | | | | can be per run or per host, also aggregate or not set_stats action plugin as reference implementation added doc stub display stats in calblack made custom stats showing configurable
* runner_on_async_failed missing argTom Booth2016-12-221-1/+1
| | | missing and argument from CallbackModule
* Also fix default callback to use ignore_errors paramJames Cammarata2016-12-211-1/+1
| | | | | | Rather than the value in the task, which may not be templated. Related to #18289
* Ensure that command/shell errors are displayedDag Wieers2016-12-162-5/+5
| | | | | | | | | | | | | | | This fix ensures that if there are specific module errors (in our case the python interpreter was not found) then command and shell returns a proper error. It also fixes a few other imperfections that we noticed during troubleshooting: - Return the real RC if it were available - Improve a dictionary evaluation using .get() - Return an RC of -1 if it is unknown (instead of returning 0) This fixes #18846
* Removed dict.iteritems() in several other files.Andrea Tartaglia2016-12-141-1/+1
| | | | This is for py3 compatibility #18506
* minor spelling changesCarlos E. Garcia2016-12-131-1/+1
|
* import reduce from six label:python3 (#18561)koralsky2016-11-221-0/+1
| | | | | * import 'reduce' from six * import reduce in facts fix
* disable 'dense' callback in py26Brian Coca2016-11-181-28/+40
|
* Adapt callback functions to changes in 13f3cbaf3b82e28de334162f04d498f6cac8ab0eDag Wieers2016-11-171-0/+12
|
* Implement destructor to ensure newline and terminal attributesDag Wieers2016-11-171-2/+5
| | | | Also fixed a typo
* Reset VT100 attributes in case we get unexpected outputDag Wieers2016-11-171-0/+2
|
* Rename ansi to the more correct name vt100Dag Wieers2016-11-171-52/+51
|
* Implement our own detailed task outputDag Wieers2016-11-171-46/+56
| | | | | | Also: - Streamline ANSI calls - Implement v2_playbook_on_include
* Ensure we end with a newline in normal modeDag Wieers2016-11-171-9/+10
|
* Small fix so diff output starts on a new lineDag Wieers2016-11-171-13/+33
|
* Don't try to be smart with cmd output !Dag Wieers2016-11-171-3/+0
|
* Make everything work magically !Dag Wieers2016-11-171-48/+48
| | | | | - Support item-loops correctly - Support notification handlers
* Assorted improvementsDag Wieers2016-11-171-102/+131
| | | | | | | | - Better switch between *dense* and *default* - Reimplement C.COLOR* out of necessity (help!) - Make verbose output more dense (clean up result) - Implement our own dumper - Improve delegation support
* Assorted fixesDag Wieers2016-11-171-16/+91
| | | | | | - Implement delegate support - Implement preliminary handler support - Implement our own recap/summary (still fails)
* Implement support for itemized tasksDag Wieers2016-11-171-13/+23
|
* Preliminary support for items, WIPDag Wieers2016-11-171-6/+15
|
* Improve readabilityDag Wieers2016-11-171-35/+35
|
* Various improvements, now supports different verbosity levelsDag Wieers2016-11-171-57/+153
|
* New "dense" callback pluginDag Wieers2016-11-171-0/+221
| | | | | | | | | | | | | | | | | | | | | | | | | | The goal for the "dense" output is to only show changes and failures on-screen (the Unix-way). However, since we still want to have a sense of progress, we use terminal capabilities to display progress. - On screen there should only be relevant stuff - How far are we ? (during run, last line) - What issues occured - What changes occured - Diff output - If verbosity increases, act as default output So that users can easily switch to default for troubleshooting - Leave previous task output on screen - If we would clear the line at the start of a task, there would often be no information at all - We use the cursor to indicate where in the task we are. Output after the prompt is the output of the previous task - Use the same color-conventions of Ansible This is still a work in progress. It was released to give a glimpse of what would be possible. The Ansible callback mechanism currently does not have all the functionality we need to do this efficiently.