Dag Wieers
b7425b59ee
Adapt callback functions to changes in 13f3cbaf3b
2016-11-17 19:30:42 -05:00
Dag Wieers
0036108c59
Implement destructor to ensure newline and terminal attributes
...
Also fixed a typo
2016-11-17 19:30:42 -05:00
Dag Wieers
2a8914e496
Reset VT100 attributes in case we get unexpected output
2016-11-17 19:30:42 -05:00
Dag Wieers
cd6f577d91
Rename ansi to the more correct name vt100
2016-11-17 19:30:42 -05:00
Dag Wieers
893dc81b5e
Implement our own detailed task output
...
Also:
- Streamline ANSI calls
- Implement v2_playbook_on_include
2016-11-17 19:30:42 -05:00
Dag Wieers
221a4e7014
Ensure we end with a newline in normal mode
2016-11-17 19:30:42 -05:00
Dag Wieers
7148023f59
Small fix so diff output starts on a new line
2016-11-17 19:30:42 -05:00
Dag Wieers
9a507b1f07
Don't try to be smart with cmd output !
2016-11-17 19:30:42 -05:00
Dag Wieers
84e0420389
Make everything work magically !
...
- Support item-loops correctly
- Support notification handlers
2016-11-17 19:30:42 -05:00
Dag Wieers
589953c79b
Assorted improvements
...
- 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
2016-11-17 19:30:42 -05:00
Dag Wieers
223c0011e0
Assorted fixes
...
- Implement delegate support
- Implement preliminary handler support
- Implement our own recap/summary (still fails)
2016-11-17 19:30:42 -05:00
Dag Wieers
1bf7e22756
Implement support for itemized tasks
2016-11-17 19:30:42 -05:00
Dag Wieers
14cfb2b230
Preliminary support for items, WIP
2016-11-17 19:30:42 -05:00
Dag Wieers
67c57a9b6b
Improve readability
2016-11-17 19:30:42 -05:00
Dag Wieers
326bb24a89
Various improvements, now supports different verbosity levels
2016-11-17 19:30:42 -05:00
Dag Wieers
fe6e4f8286
New "dense" callback plugin
...
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.
2016-11-17 19:30:42 -05:00
Dag Wieers
1ca4add91c
Performance improvement using in-operator on dicts
...
Just a small cleanup for the existing occurrences.
Using the in-operator for hash lookups is faster than using .keys()
http://stackoverflow.com/questions/29314269/why-do-key-in-dict-and-key-in-dict-keys-have-the-same-output
2016-11-17 12:33:04 -05:00
Ievgen Khmelenko
619f2fd210
ansible-logstash-callback ( #18282 )
...
* ansible-logstash-callback
* GPL v3 license preamble, ImportError
* Update logstash.py
2016-11-08 11:17:05 -05:00
Toshio Kuratomi
6a3893c518
Remove direct calls to print and cleanup imports
...
All display of information should go through display instead of through print.
2016-11-07 17:12:36 -05:00
Samuel Boucher
911a602c79
Update syslog_json.py
...
Add SYSLOG_FACILITY environment variable to set syslog facility
2016-11-02 10:02:56 -04:00
Adrian Likins
c0331d50dc
Remove callback.CallbackBase._copy_result_exclude
...
Nothing seems to use this now.
Was added originally added in2d11cfab92f9d26448461b4bc81f466d1910a15e
but the code that used it was removed in
e02b98274b
2016-10-23 13:36:20 +02:00
Guido Günther
14a9bd6a1c
Add foreman callback plugin ( #17141 )
2016-10-03 00:12:12 -04:00
Makc
c6fa701ab1
jabber callback ( #16981 )
...
* jabber callback
* delete empty lines
* grammar fix
* fix: do not print error when jabber callback disabled
* change callback version 1 -> 2
2016-09-30 12:06:53 -04:00
Toshio Kuratomi
70e63ddf6c
Fix cow mode to work with unicode task and play names ( #17576 )
...
Fixes #17560
2016-09-14 20:02:35 -07:00
Brian Coca
4656b6a846
added msg info to unreachable for oneline callback
...
fixes #17367
2016-09-14 11:33:01 -04:00
Brian Coca
7450629733
better display for free strategy ( #17355 )
2016-09-13 12:59:32 -04:00
Brian Coca
cd2f60e11a
take delegated vars before removing them
...
fixes #17455
2016-09-09 09:55:24 -04:00
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