* Ponies!

* Docs

* Docs

* Highstate support

* Ponys are very linty
This commit is contained in:
Mike Place 2016-05-18 17:57:13 -07:00 committed by Nicole Thomas
parent ea5ddaee6e
commit 5528ccc552

58
salt/output/pony.py Normal file
View 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