Toshio Kuratomi
4ed88512e4
Move uses of to_bytes, to_text, to_native to use the module_utils version ( #17423 )
...
We couldn't copy to_unicode, to_bytes, to_str into module_utils because
of licensing. So once created it we had two sets of functions that did
the same things but had different implementations. To remedy that, this
change removes the ansible.utils.unicode versions of those functions.
2016-09-06 22:54:17 -07:00
Brian Coca
ff34f5548d
Dynamic role include ( #17401 )
...
* dynamic role_include
* more fixes for dynamic include roles
* set play yfrom iterator when dynamic
* changes from jimi-c
* avoid modules that break ad hoc
TODO: should really be a config
2016-09-05 20:07:58 -04:00
Andrew Gaffney
f65a3ce547
Support for specifying item label in a loop ( #17294 )
2016-08-31 09:59:43 -04:00
Chris Faulkner
dbab23e68f
Fix context_demo callback plugin. ( #17235 )
2016-08-25 10:22:27 -07:00
Toshio Kuratomi
a22909c226
Migrate basestring to a python3 compatible type ( #17199 )
2016-08-23 13:13:44 -07:00
Adrian Likins
71118b2720
Show where plugins were loaded in vvv/vvvv ( #15757 )
...
Make the plugin loading info displayed by callback plugins
match.
In debug mode (ANSIBLE_DEBUG=1 env), log all requests for
plugins including already cached plugins and class_only
requests.
2016-08-23 11:54:14 -04:00
Adrian Likins
f21df311bc
Fix hipchat callback "has no attribute display'" ( #16998 )
...
Use self._display for access to display object for
the hipchat callback plugin.
Fixes #16946
2016-08-08 11:04:06 -04:00
Matt Clay
e07fbba0a5
Add missing boilerplate code. ( #16980 )
2016-08-05 12:22:52 -07:00
James Pic
d2438b6b6b
Debug output callback ( #16839 )
...
* Added debug output callback
* Better import
* Comment on line
2016-08-05 13:57:13 -04:00
Matt Martz
4065acc37d
indent callback output if using 3verbosity or higher ( #16231 )
2016-07-23 18:10:53 -04:00
Brian Coca
729686a434
added back spaces for profile_tasks formatting
2016-07-06 15:39:09 -04:00
NAGA RAVI CHAITANYA ELLURI
b312a43544
fix(callback-mail plugin): fixes the warning 'TaskResult' object has no attribute '__getitem__' because of which its not sending an email on failure ( #16547 )
2016-07-01 13:25:48 -04:00
Brian Coca
faec03aabc
fix encoding issues in profile_tasks ( #16522 )
...
* fix encoding issues in profile_tasks
fixes #16521
* really fix it
* unicode the nested
* simpler format
* readded space after name
2016-07-01 10:21:49 -04:00
Matt Clay
8f1b487141
Handle repeat includes in junit callback. ( #16484 )
2016-06-28 15:55:46 -07:00
Matt Clay
c2a5cb6174
Fix junit callback plugin for Python 2.6. ( #16440 )
2016-06-24 14:22:27 -07:00
Krzysztof Magosa
721da46842
fix: playbook_on_task_start expects name and not task object ( #16168 )
2016-06-07 09:43:01 -04:00
Matt Clay
7edfeb3665
Add junit callback plugin. ( #16089 )
...
Add junit callback.
2016-06-01 13:34:00 -07:00
Matt Clay
126bc40ecf
Do not remove exception from result, hide output.
...
This allows all callback plugins access to exception details.
2016-05-31 11:28:22 -07:00
Tobias Wolf
87648f7bdf
actionable.py: Do not print next task banner in handler callback ( #15698 )
...
Fix actionable callback plugin to not print the banner of the previous
task.
When a handler is executed there is no task banner, so in case it is run,
it will reference the banner from the preceding task.
**Author:** @hvhaugwitz
Test case:
---
- name: actionable filter
hosts: all
handlers:
- name: handler
command: "true"
tasks:
- name: task 1
file: path=/tmp/test state=touch
notify: handler
- name: task 2
file: path=/tmp/test state=absent
- name: task 3
file: path=/tmp/test state=absent
- name: task 4
file: path=/tmp/test state=absent
- name: task 5
file: path=/tmp/test state=absent
- name: task 6
file: path=/tmp/test state=absent
Example output:
BEFORE
------
PLAY [actionable filter] *******************************************************
TASK [task 1] ******************************************************************
changed: [localhost]
TASK [task 2] ******************************************************************
changed: [localhost]
RUNNING HANDLER [handler] ******************************************************
TASK [task 6] ******************************************************************
changed: [localhost]
PLAY RECAP *********************************************************************
localhost : ok=8 changed=3 unreachable=0 failed=0
AFTER
-----
PLAY [actionable filter] *******************************************************
TASK [task 1] ******************************************************************
changed: [localhost]
TASK [task 2] ******************************************************************
changed: [localhost]
RUNNING HANDLER [handler] ******************************************************
changed: [localhost]
PLAY RECAP *********************************************************************
localhost : ok=8 changed=3 unreachable=0 failed=0
2016-05-03 11:25:46 -04:00
Toshio Kuratomi
f39ad1f13a
Get rid of logentries.to_unicode.
...
It wasn't doing anything that a literal couldn't do and used
unicode_escape which only understands latin1 (The author of the code
seems to have thought it took an encoding argument but it looks like
that was silently ignored.)
2016-04-30 07:45:51 -07:00
Brian Coca
6f4f8e6e79
fix typo
2016-04-29 15:01:25 -04:00
Brian Coca
d53c4b8ae7
fixed method signature as per #15668
2016-04-29 13:13:01 -04:00
Dag Wieers
d46af7cda3
On change in diff-mode we don't need to see file content in task output
...
I was surprised to see complete file content in the (JSON) task output when
in diff-mode. Since we see the diff anyhow, there's no need to send everything
on screen.
2016-04-01 18:03:51 +02:00
Brian Coca
5b11494437
python3 compatiblity
...
remove use of basestring
deal with configparser
2016-03-24 06:39:21 -07:00
Tobias Wolf
4938b98e4e
For `actionable` cb plugin also hide ok for itemized results
...
The purpose of the `actionable` callback plugin is to hide uninteresting
results.
Also hide the ok results when the task was itemized.
2016-03-21 14:59:57 +01:00
James Cammarata
13f3cbaf3b
Renaming per-item and retry callbacks
2016-03-18 15:17:43 -04:00
James Cammarata
1ee6d489ab
Make sure tuples returned by _get_item() are handled correctly in formatting
...
Fixes #14800
2016-03-17 14:19:58 -04:00
Brian Coca
bc60f52db5
avoid exceptiosn when not being called by CLI
2016-03-17 07:19:35 -07:00
Dag Wieers
ed457ad53b
Fix the color when unreachable in default cb plugin
...
The dedicated color for unreachable errors was not being used in the default cb plugin.
This corrects the color.
2016-03-17 00:18:13 +01:00
Brian Coca
2984ffdfac
now item callback honors display_skipped_hosts
...
fixes #14956
2016-03-14 13:13:50 -04:00
James Cammarata
aee2eb6287
Merge pull request #14864 from dagwieers/patch-12
...
Only show diff when the task actually induced a change
2016-03-08 15:02:49 -05:00
Dag Wieers
f5b6f52940
Only show diff when the task actually induced a change
...
This implements solution #1 in the proposal #14860 .
It only shows the diff if the task induced a change, which means that if the changed_when control overrides the task, not diff will be produced.
See #14860 for a rationale and the use-case.
2016-03-08 17:33:29 +01:00
Dag Wieers
175351f200
Little improvement in flow
...
Don't get the hostname if it's not needed.
2016-03-08 17:23:34 +01:00
Brian Coca
6cad356b3b
updated docs to show new output
2016-03-03 18:05:39 -05:00
Brian Coca
b2a6784a9f
changed the output to keep backwards compat
...
still shows path when verbose
2016-03-03 18:03:02 -05:00
Joel
b3aa373932
Update the profile task callback plugin to include a fix for duplicate named tasks. Added additional features to adjust the number of tasks output and the sort order.
2016-02-25 10:02:36 -06:00
James Cammarata
e02b98274b
issue callbacks per item and retry fails
...
- now workers passes queue to task_executor so it can send back events per item and on retry attempt
- updated result class to pass along events to strategy
- base strategy updated to forward new events to callback
- callbacks now remove 'items' on final result but process them directly when invoked per item
- new callback method to deal with retry attempt messages (also now obeys nolog)
- updated tests to match new signature of task_executor
fixes #14558
fixes #14072
2016-02-23 15:07:06 -05:00
Brian Coca
e35b1cf154
show task path on vv and above
2016-02-21 16:22:39 -05:00
Brian Coca
cea10794fd
removed unused color var
2016-02-21 02:03:48 -05:00
Brian Coca
6febb816d2
Merge pull request #14569 from sivel/json-stdout-callback
...
Add json stdout callback
2016-02-19 07:12:30 -08:00
George Christou
bbc855c218
Make --diff lines of context configurable
2016-02-19 12:18:09 +00:00
Matt Martz
7f7536f7ad
Add json callback to be used in replace of the default stdout to print a JSON structure to stdout
2016-02-18 16:39:31 -06:00
Matt Davis
4c58066153
Merge pull request #14557 from ansible/display-play-args
...
Add a configuration setting that allows the user to specify printing …
2016-02-18 07:40:50 -08:00
Toshio Kuratomi
86b8dc0e79
Add a configuration setting that allows the user to specify printing of task arguments in the header.
...
Fixes #14554
2016-02-18 04:20:35 -08:00
Brian Coca
1dba6da40f
changed filtered to actionable cb plugin
2016-02-18 02:32:05 -08:00
Brian Coca
54942ee8ff
Merge pull request #13593 from agaffney/devel
...
Add 'filtered' stdout callback plugin
2016-02-18 02:30:32 -08:00
Brian Coca
22082216a4
Merge pull request #13408 from sivel/v2-slack-callback
...
V2 slack callback plugin
2016-02-18 02:12:39 -08:00
Brian Coca
6012646d8c
added playbook and options info to callbacks
...
will display on certain verbosity levels, both playbook/file info
and non empty options with which it's running.
avoid errors when not using CLI classes
2016-02-18 02:09:07 -08:00
George Christou
56239ee347
Make --diff colours configurable
2016-02-17 10:25:54 +00:00
George Christou
8edcca0ef5
Add simple --diff colour support
2016-02-15 22:23:03 +00:00
Sandra Wills
edf776d6a4
Merge pull request #13805 from aioue/patch-1
...
profile_tasks README.md
2016-02-12 12:23:45 -05:00
Tom Paine
edb36b6c4a
Update profile_tasks.rst
...
remove brackets on links
2016-02-12 17:13:39 +00:00
Tom Paine
8e3cc3eecd
Update profile_tasks.rst
2016-02-08 19:19:05 +00:00
Tom Paine
5a88cd8ad9
Rename profile_tasks.md to profile_tasks.rst
2016-02-08 15:02:50 +00:00
Tom Paine
9eca815377
Update profile_tasks.md
...
Converted to RST.
2016-02-05 18:06:10 +00:00
Tobias Wolf
c902f926ca
Do not print empty diffs with _display.display()
2016-02-03 16:20:16 +01:00
Tobias Wolf
28169492f9
Do not insert newlines when diff is empty
2016-02-03 16:20:16 +01:00
Tobias Wolf
67594e8ec2
Fix handling of difflist containing multiple before/after pairs
...
Commit ansible/ansible@c337293 introduced a difflist feature. The return
value was not adequately outdented to append any diff after the first.
2016-02-03 16:20:16 +01:00
Toshio Kuratomi
9e3932ffca
Some attributes of callbacks aren't in v2. Port plugins to the v2 way to do that
...
Update porting guide with info on callback porting
2016-01-29 19:45:12 -08:00
Matt Martz
4547ac7fb1
v2 version of slack callback plugin
2016-01-28 16:13:29 -06:00
Tobias Wolf
5b293b56d6
Handle the key 'prepared' in the 'diff' result from modules
...
So far, when a 'diff' dict is returned with module results, it is
checked for 'before' and 'after' texts, which are processed in
_get_diff() by python difflib. This generates the changes to display
when CLI users specify --diff.
However, some modules will generate changes that cannot easily be
expressed in a conventional diff. One example is the output of the
synchronize module, which presents changed files in a common log format
as in `rsync --itemize-changes`.
Add a check for a diff['prepared'] key, which can contain prepared diff text
from modules.
2016-01-26 09:29:37 +01:00
Tom Paine
76ac6294e0
profile_tasks README.md
...
As agreed with Brian Coca in Ansible Project group:
https://groups.google.com/forum/#!searchin/ansible-project/tom$20paine/ansible-project/__nv6BZs2yU/AkYQ0HU-BQAJ
2016-01-11 18:21:28 +00:00
James Cammarata
dc47c25e58
Minor tweak to ensure diff is not empty in callback for file diffs
2016-01-05 22:01:01 -05:00
Brian Coca
095790ac5c
Merge pull request #13691 from bcoca/colors
...
output color is now configurable
2016-01-05 14:33:01 -05:00
Brian Coca
f3c45adfb8
simplified diff handling in callback
...
no need for the copy or other complexity
2016-01-05 14:26:38 -05:00
Brian Coca
9972c27a9b
now handles 'non file diffs'
...
this allows modules to pass back a 'diff' dict and it will still show using the file interface
2016-01-05 14:26:38 -05:00
Brian Coca
d3deb24ead
output color is now configurable
2015-12-29 17:40:47 -05:00
James Cammarata
2d11cfab92
Squashed commit of the following:
...
commit 24efa310b58c431b4d888a6315d1285da918f670
Author: James Cammarata <jimi@sngx.net>
Date: Tue Dec 29 11:23:52 2015 -0500
Adding an additional test for copy exclusion
Adds a negative test for the situation when an exclusion doesn't
exist in the target to be copied.
commit 643ba054877cf042177d65e6e2958178bdd2fe88
Merge: e6ee59f
66a8f7e
Author: James Cammarata <jimi@sngx.net>
Date: Tue Dec 29 10:59:18 2015 -0500
Merge branch 'speedup' of https://github.com/chrismeyersfsu/ansible into chrismeyersfsu-speedup
commit 66a8f7e873ca90f7848e47b04d9b62aed23a45df
Author: Chris Meyers <chris.meyers.fsu@gmail.com>
Date: Mon Dec 28 09:47:00 2015 -0500
better api and tests added
* _copy_results = deepcopy for better performance
* _copy_results_exclude to deepcopy but exclude certain fields. Pop
fields that do not need to be deep copied. Re-assign popped fields
after deep copy so we don't modify the original, to be copied, object.
* _copy_results_exclude unit tests
commit 93490960ff4e75f38a7cc6f6d49f10f949f1a7da
Author: Chris Meyers <chris.meyers.fsu@gmail.com>
Date: Fri Dec 25 23:17:26 2015 -0600
remove uneeded deepcopy fields
2015-12-29 11:40:18 -05:00
Andrew Gaffney
0f4d1eb051
Add 'filtered' stdout callback plugin
...
This plugin filters output for any task that is 'ok' or 'skipped'.
It works by subclassing the 'default' stdout callback plugin and
overriding certain functions. It will suppress display of the task
banner until there is a 'changed' or 'failed' result or an
unreachable host.
2015-12-21 22:41:52 +00:00
Brian Coca
be5488cb60
clean debug output to match prev versions
2015-12-15 09:27:53 -05:00
Brian Coca
f3bedbae29
simplified skippy
...
thanks agaffney!
2015-12-12 17:50:55 -05:00
James Cammarata
14e19c239d
Make on_file_diff callback item-aware
2015-12-09 14:52:53 -05:00
Brian Coca
0719eb3e2d
clarified warning from tree callback
2015-12-09 07:29:12 -08:00
Brian Coca
795fac917e
fixed typo in tree callback, added default dir
...
this would allow it to work with playbooks also
2015-12-08 11:59:04 -08:00
Matt Martz
384b2e0234
Get v2_playbook_on_start working
...
* Move self._tqm.load_callbacks() earlier to ensure that v2_on_playbook_start can fire
* Pass the playbook instance to v2_on_playbook_start
* Add a _file_name instance attribute to the playbook
2015-12-02 11:29:51 -06:00
Brian Coca
3e01516783
fixed signature for init on callbacks
...
also removed passing display to base class which already handles this
2015-12-01 14:06:54 -08:00
James Cammarata
6671d78f95
Tweak location of stats callback execution and properly relocate stats output code
2015-11-28 14:03:21 -05:00
Brian Coca
7244b5ae49
added missing :
2015-11-25 10:52:42 -08:00
Brian Coca
0ec60ac09b
added missing events to base class
2015-11-25 10:49:03 -08:00
Brian Coca
83f7942dcf
removed print entries, corrected display calls to match latest devel
2015-11-16 11:35:10 -08:00
Brian Coca
78be81b96d
Merge pull request #12510 from jcftang/devel
...
Initial add of logentries callback plugin
2015-11-15 11:28:02 -08:00
Brian Coca
f1db99caa7
updated with latest changes to default
2015-11-15 10:09:24 -08:00
Jimmy Tang
19ba54c9fd
Don't be fatal on import errors so plays don't fail if plugin doesn't have required dependencies
2015-11-14 20:02:03 +00:00
Jimmy Tang
125370ab48
Run when whitelisted
2015-11-14 19:46:00 +00:00
Jimmy Tang
5f2f5e2b59
Add boilerplate and fix initialisation to match what 2.0 expects
2015-11-14 08:54:41 +00:00
Jimmy Tang
c02ceb8f12
Remove threading and queues. Added license information and cleaned up callback.
2015-11-14 08:40:16 +00:00
Jimmy Tang
85277c8aae
Initial add of logentries callback plugin
...
This callback plugin will generate json objects to be sent to the
logentries service for auditing/debugging purposes.
To use:
Add this to your ansible.cfg file in the defaults block
[defaults]
callback_plugins = ./callback_plugins
callback_stdout = logentries
callback_whitelist = logentries
Copy the callback plugin into the callback_plugings directory
Either set the environment variables
export LOGENTRIES_API=data.logentries.com
export LOGENTRIES_PORT=10000
export LOGENTRIES_ANSIBLE_TOKEN=dd21fc88-f00a-43ff-b977-e3a4233c53af
Or create a logentries.ini config file that sites next to the plugin with the following contents
[logentries]
api = data.logentries.com
port = 10000
tls_port = 20000
use_tls = no
token = dd21fc88-f00a-43ff-b977-e3a4233c53af
2015-11-14 08:40:16 +00:00
Toshio Kuratomi
62979efa14
Finish up plugin porting to global display
...
Also remove display = display which does nothing
2015-11-11 10:44:23 -08:00
James Cammarata
a99f2fd52f
Save delegated vars in result for use in callback methods
...
Fixes #13014
2015-11-10 10:14:30 -05:00
Brian Coca
e2c56efca6
Merge pull request #12867 from bcoca/callback_whitelist_tweak
...
make callbacks declare needing whitelisting
2015-11-05 12:58:05 -05:00
Toshio Kuratomi
658ea053ea
Cleanup timer callback plugin's overwriting of modules it imported
2015-11-03 09:53:18 -08:00
Brian Coca
467c29e3db
show task path on 2 vs
2015-11-01 17:43:11 -05:00
Brian Coca
7ba4f5ee12
removed no_log redundant code
2015-10-30 14:01:47 -04:00
Brian Coca
b97887ba41
simplified invocation removal, added no_log awareness
2015-10-30 10:17:19 -04:00
Brian Coca
8ce864db6f
sanatize results
2015-10-24 15:23:12 -04:00
Toshio Kuratomi
92dd563a75
Fix invocation from bad merge and note where it would need to go to keep
...
it out of registered vars as well.
2015-10-24 07:29:42 -07:00
Brian Coca
25e3fe04a8
finalized changed to use abridtged_result instead of result
...
removed no longer defined no_log
2015-10-23 23:10:57 -04:00
Toshio Kuratomi
3812ec8d1d
Implement invocation hiding for all callbacks if the verbosity is low
2015-10-23 11:11:34 -07:00
Brian Coca
275764d4a5
avoid showing invokation when no_log is set or verbosity is low
2015-10-23 14:06:20 -04:00
Toshio Kuratomi
99c6f77e59
Fix callback
2015-10-23 09:15:22 -07:00
Toshio Kuratomi
ce2b18174e
Merge pull request #12878 from ansible/invocation-fix
...
Invocation fix
2015-10-22 16:17:40 -07:00
Toshio Kuratomi
2e87c1f74e
Two fixes to action plugins
...
* Fix the task_vars parameter to not default to a mutable type (dict)
* Implement invocation in the base class's run() method have each action
module call the run() method's implemention in the base class.
* Return values from the action plugins' run() method takes the return
value from the base class run() method into account so that invocation
makes its way to the output.
Fixes #12869
2015-10-22 16:07:26 -07:00
Brian Coca
5017a96948
Revert "make callbacks declare needing whitelisting"
...
another premature merge
This reverts commit df8ff85787
.
2015-10-22 16:34:51 -04:00
James Cammarata
86de1429e5
Cleaning up FIXMEs
2015-10-22 16:03:50 -04:00
Brian Coca
df8ff85787
make callbacks declare needing whitelisting
...
this will allow for custom or v1 callbacks locally loaded to automatically be triggered as they were in 1.x
2015-10-22 12:30:23 -04:00
Toshio Kuratomi
6b6d03290a
Restore the automatic addition of invocation to the output
...
Revert "Remove auto-added invocation return value as it is not used by v2 and could leak sensitive data."
This reverts commit 6ce6b20268
.
Remove the note that invocation was removed as we've now restored it.
Revert "keyword not in ubuntu 14.04"
This reverts commit 5c01622457
.
Revert "remove invocation keyword check"
This reverts commit 5177cb3f74
.
2015-10-22 08:53:37 -07:00
Brian Coca
c267c23020
make callbacks declare needing whitelisting
...
this will allow for custom or v1 callbacks locally loaded to automatically be triggered as they were in 1.x
2015-10-22 08:27:32 -04:00
Toshio Kuratomi
f34b55ac2b
Add python3-compat boilerplate to all .py files in lib/ansible
2015-10-19 18:36:19 -07:00
James Cammarata
e5b6d802bf
Removing some cruft related to _local_action value on Task, which was removed
...
Fixes #12819
2015-10-19 16:52:27 -04:00
James Cammarata
1cfd941179
Adding a v2 callback for task includes
2015-10-19 13:42:17 -04:00
Toshio Kuratomi
6ce6b20268
Remove auto-added invocation return value as it is not used by v2 and could leak sensitive data.
2015-10-19 09:08:25 -07:00
Brian Coca
2d1d21228a
updated skippy to match default output
2015-10-18 11:00:50 -04:00
Brian Coca
6c8cf8acb7
now profile_tasks callback handles handlers correctly
...
fixes #12762
2015-10-16 18:01:27 -04:00
Toshio Kuratomi
baa309309d
Bundle a new version of python-six for compatibility along with some code to make it easy for distributions to override the bunndled copy if they have a new enough version.
2015-10-16 08:21:28 -07:00
Brian Coca
45788fbfad
<homer>doh!</homer>
2015-10-09 16:58:01 -04:00
Brian Coca
b9d54e9a01
corrects previous fix to deal with missing item key in results dict
2015-10-09 13:01:32 -04:00
Brian Coca
fbf4cafab5
on skipped you 'might' not have an item, changed to getattr to avoid keyerror
...
fixes #12683
2015-10-09 11:28:11 -04:00
James Cammarata
770032648a
Show -> localhost for local_action tasks
2015-10-09 10:53:53 -04:00
Brian Coca
dac3684fd1
changed task color to dark gray to keep it from being confused with ignore/skip
2015-10-07 12:12:35 -04:00
Juraci
e52950a939
Displaying task_path on task start when verbosity is more than 3
2015-10-07 10:11:50 -03:00
James Cammarata
9e364c2eb5
Don't modify results in callbacks
...
Fixes #12654
2015-10-06 21:43:43 -04:00
James Cammarata
38528c8ef3
Show more info in the minimal callback for unreachable hosts
...
Fixes #12621
2015-10-03 01:41:57 -04:00
Brian Coca
e2ae3215f6
corrected no_log for items and skipped tasks
...
corrected output from default callback
added new tests for no_log loops
updated makefile test to check for both positive and negative occurrences of no_log
2015-10-02 14:35:33 -04:00
Brian Coca
4c9f58a152
added no_log censoring to item output
...
should be last commit that fixes #12214
2015-10-02 09:11:41 -04:00
Brian Coca
6b842d9c49
fixed incorrect data passing on certain events
2015-10-01 18:49:51 -04:00
Brian Coca
6e96188085
added missing entry for dealing with bcc
2015-10-01 18:49:51 -04:00
James Cammarata
eb8d7dcd14
Make sure formatted strings don't bomb on tuples
...
Fixes #12501
2015-09-25 03:01:42 -04:00
Toshio Kuratomi
5d3d9cfe0d
Convert to byte strings to avoid UnicodeErrors
...
Fixes #12488
2015-09-23 15:24:17 -07:00
James Cammarata
c30e464388
Additional tweaks to callback output for delegate_to
2015-09-22 09:25:38 -04:00
James Cammarata
513619867a
Show delegated-to host in callback message
...
Fixes #12465
2015-09-22 08:45:04 -04:00
Toshio Kuratomi
3db8070aa3
Fix urlopen usage to use open_url instead
...
Add a travis test for urlopen usage
2015-09-16 20:40:17 -07:00
Brian Coca
9d4d7bd74d
fixed porting bugs in profile_tasks to v2
2015-09-11 16:48:09 -04:00
Brian Coca
6b73cac35a
corrected skipped_hosts constant usage, thanks @benjixx
2015-08-30 20:21:15 -04:00
James Cammarata
f0257683b0
Fixed missing constants import in default callback
...
Fixes #12145
2015-08-28 16:54:56 -04:00
Brian Coca
b6c6ed91fe
implemented not showing skipped hosts config
2015-08-28 12:32:50 -04:00
Brian Coca
861fdfc5ba
updated callbacks to properly test diff no matter if dict or list
2015-08-16 02:37:21 -04:00
Brian Coca
c3372936aa
diff can now be a list
2015-08-16 02:37:21 -04:00
Brian Coca
e46b1e8d2b
adjusted tree to work more like v1, also now skips when dir not supplied
2015-08-12 10:35:49 -04:00
Brian Coca
4d853a5d3c
implemented for v2, missing --tree option for adhoc
2015-08-11 19:18:10 -04:00
James Cammarata
169d316704
Fixing bugs in include + loops
...
Fixes #11872
2015-08-11 01:33:43 -04:00
Brian Coca
113f709eac
brought up to date with default
2015-07-30 16:53:38 -04:00
Brian Coca
a8b2b5b0c9
avoids printing blank diffs
...
fixes #10147 fixes #9471
2015-07-28 15:47:52 -04:00
Brian Coca
f4a997db49
added back but stderr, which was the original itnention
2015-07-28 14:36:06 -04:00
Brian Coca
3b9282fb90
fixed dupe output in raw/command cases
2015-07-28 14:31:49 -04:00
Brian Coca
6cdee94c33
added missing skipped item function to base
2015-07-28 11:02:25 -04:00
Brian Coca
6f93d228f6
made item output closer to v1
2015-07-28 10:59:39 -04:00
Brian Coca
4f9d719b14
removed debug
2015-07-28 10:43:11 -04:00
Brian Coca
d78c2fc212
now reports per task item
2015-07-28 10:41:40 -04:00
Brian Coca
787a0c4e04
fixed indent issues
2015-07-28 10:10:21 -04:00
Brian Coca
5f8db9cd4b
changed verbose_override to the new _ansible_verbose_override to keep in line with previous changes
...
output now defaults back to having indent=4
2015-07-27 22:15:44 -04:00
James Cammarata
cb262449c7
Reworking internal result flags and making sure include_vars hides vault data
...
Fixes #10194
2015-07-27 14:04:31 -04:00
Brian Coca
a56ff7ae54
now it really is oneline
2015-07-26 23:14:07 -04:00
Brian Coca
5d1d9f1505
fixed diff output to be as it was in 1.x, copy and template now use the same
...
functions to do difs.
2015-07-26 22:29:56 -04:00
Brian Coca
0b6fadaad7
started implementing diff
...
diff now works with template
also fixed check mode for template and copy
2015-07-26 12:22:22 -04:00
Brian Coca
a6ba149c49
implemented simplified output for adhoc adn command modules as in v1
2015-07-23 13:42:20 -04:00
James Cammarata
e64989beb4
Moving ConnectionInformation -> PlayContext
...
Also making PlayContext a child class of the Playbook Base class,
which gives it access to all of the FieldAttribute code to ensure
field values are correctly typed after post_validation
Fixes #11381
2015-07-21 12:13:50 -04:00
Pierre-Louis Bonicoli
fda8fa77ab
Fix pyflakes error: use 'msg' variable
...
Error was: local variable 'msg' is assigned to but never used
2015-07-20 12:41:39 +02:00
Brian Coca
a09ce4bd87
added callback that skipts 'skipped'
2015-07-19 23:55:39 -04:00
Brian Coca
1aa4155266
generalized warning handling, added it to adhoc also
2015-07-17 14:14:15 -04:00
James Cammarata
d4ac73a1bc
Adding back capability to display warnings contained in results
...
Fixes #11255
2015-07-17 13:44:22 -04:00
Gerard Lynch
a6c8d30f3e
callbacks require a version constant or the v2 code doesn't pass the display param and it gives an error
2015-07-17 15:33:48 +01:00
Brian Coca
a09f6236a5
adapated to v2
2015-07-17 08:55:22 -04:00
Brian Coca
10e5c2b46d
fixed var scope
2015-07-17 08:54:28 -04:00
Tom Paine
097ed1f17b
Add plugin that profiles playbook tasks
...
Resubmission of https://github.com/ansible/ansible/pull/11270 to
correct v2 file location.
[Description and console output
demonstration](https://github.com/aioue/ansible-plugin-profile/blob/mast
er/README.md#features).
Provides per-task timing, ongoing playbook elapsed time and ordered
list of top 20 longest running tasks at end.
2015-07-17 13:04:31 +01:00
Brian Coca
b76cb8f655
now that invocation is only async again, no need to sanitize
2015-07-15 10:40:37 -04:00
James Cammarata
6971e92f39
Fixing up some output stuff
2015-07-14 00:23:17 -04:00
Brian Coca
c4b6d91275
added skipped to oneline
2015-07-13 15:54:12 -04:00
Brian Coca
8ad52c2e4f
readded oneline output feature to adhoc
...
fixes #11573
2015-07-13 15:43:31 -04:00
Brian Coca
3a768b3b9f
removed unused methods, these now live in base class
2015-07-13 15:43:31 -04:00
Brian Coca
ba92965670
fix for when invocation data is missing
2015-07-12 16:10:52 -04:00
Brian Coca
4203b699a8
removed dict comprehension as 2.6 does not like
2015-07-11 15:15:46 -04:00
Brian Coca
d993e7000c
added cyan back to ignoring message
2015-07-11 15:01:50 -04:00
Brian Coca
1274ce565d
added result sanitation to registered var and to callbacks
...
removed time display as it only is provided by command module
2015-07-11 01:05:29 -04:00
Brian Coca
fdea00880b
now default shows time taken when -vv or above
2015-07-11 00:02:40 -04:00
Brian Coca
7a1bce1b5d
added verbose option to show callback loaded info
...
also made mail module print nicer without all those 'u'
2015-07-10 23:48:12 -04:00
teh 4r9h
705018a417
Misspell in mail.py callback.
...
Looks like little misspell.
2015-07-11 02:53:32 +02:00
Brian Coca
aaad33ccb6
fixed a couple of bugs
2015-07-10 10:30:33 -04:00
Brian Coca
d0c6d2ff1c
poreted log_plays, syslog_json and osx_say callbacks to v2
...
renamed plugins to contrib (they are not really plugins)
rewrote README.md to reflect new usage
added new dir to setup.py so it gets copied with installation, in views
of making using inventory scripts easier in teh future
2015-07-10 10:30:33 -04:00
Brian Coca
50d54b1be7
ported hipchat callback to v2 (needs testing)
2015-07-10 10:30:33 -04:00
Brian Coca
e92e15b5f6
moved unused functions to base object
2015-07-10 10:30:33 -04:00
Brian Coca
b47d7babe5
removed warning i was using for debug
2015-07-10 10:30:33 -04:00
Brian Coca
834b7a2857
ported context_demo to v2 callbacks
2015-07-10 10:30:33 -04:00
Brian Coca
ba0e5323d6
removed connection info to _verbosity, just needed callbacks to call correct display.verbosity
...
added v2 methods and made them call v1 when possible by tranforming the data
2015-07-10 10:30:33 -04:00
Brian Coca
f9d817e636
now looks at correct verbosity and removes the need to set a copy of it in _verbosity
2015-07-10 10:30:33 -04:00
Brian Coca
55366bdc6d
ported mail callback plugin to work with v2
2015-07-08 16:33:51 -04:00
Brian Coca
d149ea5222
ported timer.py callback to v2
2015-06-29 20:45:50 -04:00
James Cammarata
006391eb83
Add the improved exception reporting to the minimal callback plugin
2015-06-23 12:14:14 -04:00
James Cammarata
0d92599d18
Make exception printing a bit smarter
2015-06-19 22:59:12 -04:00
James Cammarata
f3f3fb7c49
Fixing vars_prompt
2015-06-04 13:54:51 -04:00
James Cammarata
ce3ef7f4c1
Making the switch to v2
2015-05-03 21:47:26 -05:00