mirror of
https://github.com/valitydev/salt.git
synced 2024-11-08 01:18:58 +00:00
Ponies! (#33346)
* Ponies! * Docs * Docs * Highstate support * Ponys are very linty
This commit is contained in:
parent
ea5ddaee6e
commit
5528ccc552
58
salt/output/pony.py
Normal file
58
salt/output/pony.py
Normal file
@ -0,0 +1,58 @@
|
|||||||
|
# -*- coding: utf-8 -*-
|
||||||
|
'''
|
||||||
|
Display Pony output data structure
|
||||||
|
=================================
|
||||||
|
|
||||||
|
Display output from a pony. Ponies are better than cows
|
||||||
|
because everybody wants a pony.
|
||||||
|
|
||||||
|
Example output::
|
||||||
|
|
||||||
|
< {'local': True} >
|
||||||
|
-----------------
|
||||||
|
\
|
||||||
|
\
|
||||||
|
\
|
||||||
|
▄▄▄▄▄▄▄
|
||||||
|
▀▄▄████▄▄
|
||||||
|
▄▄▄█████▄█▄█▄█▄▄▄
|
||||||
|
██████▄▄▄█▄▄█████▄▄
|
||||||
|
▀▄▀ █████▄▄█▄▄█████
|
||||||
|
▄▄▄███████████▄▄▄
|
||||||
|
████▄▄▄▄▄▄███▄▄██ ▄▄▄▄▄▄▄
|
||||||
|
████▄████▄██▄▄███ ▄▄▄▄██▄▄▄▄▄▄
|
||||||
|
█▄███▄▄█▄███▄▄██▄▀ ▄▄███████▄▄███▄▄
|
||||||
|
▀▄██████████████▄▄ ▄▄█▄▀▀▀▄▄█████▄▄██
|
||||||
|
▀▀▀▀▀█████▄█▄█▄▄▄▄▄▄▄█ ▀▄████▄████
|
||||||
|
████▄███▄▄▄▄▄▄▄▄▄ ▄▄█████▄███
|
||||||
|
▀▄█▄█▄▄▄██▄▄▄▄▄██ ▄▄██▄██████
|
||||||
|
▀▄████████████▄▀ ▄▄█▄██████▄▀
|
||||||
|
██▄██▄▄▄▄█▄███▄ ███▄▄▄▄▄██▄▀
|
||||||
|
██████ ▀▄▄█████ ▀████████
|
||||||
|
▄▄▄▄███ ███████ ██████▄█▄▄
|
||||||
|
███████ ████████▀▄▀███▄▄█▄▄
|
||||||
|
▄██▄▄████ ████████ ▀▄██▀▄▄▀
|
||||||
|
█▄▄██████ █▄▄██████
|
||||||
|
█▄▄▄▄█ █▄▄▄▄█
|
||||||
|
|
||||||
|
'''
|
||||||
|
|
||||||
|
# Import Python libs
|
||||||
|
from __future__ import absolute_import
|
||||||
|
import os
|
||||||
|
import subprocess
|
||||||
|
|
||||||
|
# Import Salt libs
|
||||||
|
import salt.utils.locales
|
||||||
|
|
||||||
|
|
||||||
|
def __virtual__():
|
||||||
|
return os.path.isfile('/usr/bin/ponysay')
|
||||||
|
|
||||||
|
|
||||||
|
def output(data):
|
||||||
|
'''
|
||||||
|
Mane function
|
||||||
|
'''
|
||||||
|
high_out = __salt__['highstate'](data)
|
||||||
|
return subprocess.check_output(['ponysay', salt.utils.locales.sdecode(high_out)]) # pylint: disable=E0598
|
Loading…
Reference in New Issue
Block a user