Fix ponysay outputter hardcoded path

Ponies embody the spirit of freedom and that should include the freedom
to put `ponysay` anywhere on the `PATH` that I want.
This commit is contained in:
Seth House 2017-03-21 13:04:54 -06:00
parent 3bac06f099
commit 5a271acfdc

View file

@ -41,15 +41,20 @@ Example output:
# Import Python libs
from __future__ import absolute_import
import os
import subprocess
# Import Salt libs
import salt.utils
import salt.utils.locales
__virtualname__ = 'pony'
def __virtual__():
return os.path.isfile('/usr/bin/ponysay')
if salt.utils.which('ponysay'):
return __virtualname__
return False
def output(data, **kwargs): # pylint: disable=unused-argument