• Stars
    star
    191
  • Rank 202,877 (Top 4 %)
  • Language
    Python
  • License
    MIT License
  • Created almost 8 years ago
  • Updated over 1 year ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Ansible Stdout Compact Logger

Ansible Stdout Compact Logger

Installation

  • put somewhere on your disk
  • add callback_plugins settings in your [defaults] settings in your ansible configuration
  • change stdout_callback to anstomlog

cf ansible.cfg.

Features

  • one-line display
  • pylint compatible (almost...)
  • displays tasks content in a nice way
  • including UTF-8 strings
  • indents structs, displays empty arrays, strings
  • puts fields on top when available ['stdout', 'rc', 'stderr', 'start', 'end', 'msg']
  • removes some fields when present [, 'stdout_lines', '_ansible_verbose_always', '_ansible_verbose_override'] to avoid too much clutter
  • reverts to standard logger when more than vv verbosity
  • supports no_log attribute in Task
  • supports _ansible_verbose_always and _ansible_verbose_override
  • supports multiple items in task (#1)
  • multi host support
  • correct duration computation
  • Display duration in minutes when tasks last for more than 1 minute
  • diff display support
  • displays stdout and stderr nicely even when they contain \n
  • displays handlers calls
  • Python 2/3 compatible
  • better line colouring
  • more test around curious errors

Without anstomlog

Stdout Display without anstomlog

With anstomlog

Stdout Display with multiline outputs

Test the logger

  • clone this repository
ansible-playbook test-1.yml
  • to run the tests, call python callbacks/anstomlog.py

License

MIT, see LICENSE file.

Tips and tricks

  • Issue with non-ascii or utf-8 chars? Have a look at #4

Contributors

  • Pierre BAILLET @octplane
  • Frédéric COMBES @marthym
  • @tterranigma
  • @OurFriendIrony
  • Farzad FARID @farzy
  • Jérôme BAROTIN @jbarotin
  • Dale Henries @dalehenries
  • Thomas Decaux @ebuildy

More Repositories

1

fsevent-rust

FSEvent bindings for rust.
Rust
39
star
2

small-deployer

Git Webhook client, in rust.
Rust
33
star
3

Rapide

Swift minimal irc bot (with a view)
Swift
16
star
4

Shiny-Shaarli

Shiny Shaarli is a Shaarli Google Chrome Extension
JavaScript
14
star
5

rust-linenoise

Linenoise FFI binding in rust
C++
12
star
6

catapult

Catapult sends your logs elsewhere
Rust
12
star
7

firefox-bookmark-to-disk

Alfred Workflow + FF Webextension + FF Native App Manifest + Python App to save your bookmarks as they are updated
Python
11
star
8

mongo-ec2-consistent-backup

Backup your mongo DB to the cloud
Ruby
11
star
9

uu.js

Private paste, with Client-side AES encryption. File uploads / Syntax highlighting
CSS
9
star
10

hammerspoon-config

My hammerspoon configuration
Lua
7
star
11

cocotte

Dynamically change the hue of your iTerm tabs according to your $CWD. Hue cocotte ! 🐔
Rust
6
star
12

small-logger

A small logger in rust. Companion of small-deployer
CSS
5
star
13

logdog

Like a hot dog, but for datadog logs
Rust
5
star
14

wikiquote-parser

Wikiquote XML Parser / Abandoned project
Go
2
star
15

MissileDriver

Missile Launcher driver for OSX
C
2
star
16

go-code-classifier

a bayesian code classifier in go
Go
2
star
17

wutt

Wutt is Mutt for the Web
Python
2
star
18

mnemo

Port of rufus-mnemo from ruby to golang
Go
2
star
19

photo-map

Organize your pictures with a bit of cleverness
Rust
2
star
20

scala-play-coffee-react

A project using the Play Framework with scala, and Coffeescript and React.js on the frontend
Scala
2
star
21

SuperUnpack

Unpack on steroids
Ruby
2
star
22

durite

HDD Monitoring solution for Graphite (/ Riemann)
Rust
1
star
23

octplane.github.io

Git Pages
1
star
24

kiosque

Your log storage
Rust
1
star
25

UnicodeScraper

Simple UTF-8 code and character scraper from fileformat.info
Python
1
star
26

pinboard-to-buffer

Replacement for Fucked IFTTT.
Ruby
1
star
27

flickr_attributor

Generate Images with embedded license in legend from Flickr photos
Scala
1
star
28

replace-rust-benchmark

Rust
1
star
29

ruby-clever-pastie

Paste website with automatic color highlighting. The useful brother of https://github.com/octplane/cloudBoard
JavaScript
1
star
30

github-last-commit

Chrome extension to display repository health via a color icon in href links
JavaScript
1
star
31

yubikey-gpg-watcher

Watch for yubikey prompt when git is asking you to sign a commit
Rust
1
star
32

pitocools

Pico8 tools
Lua
1
star