#NEWLINE# def configtest( ) : #NEWLINE# #INDENT# "\n    .. versionadded:: 2016.3.0\n\n    Test monit configuration syntax\n\n    CLI Example:\n\n    .. code-block:: bash\n\n        salt '*' monit.configtest\n    " #NEWLINE# ret = { #NEWLINE# #INDENT# #NEWLINE# #UNINDENT# } #NEWLINE# cmd = 'monit -t' #NEWLINE# out = __salt__ [ 'cmd.run_all' ] ( cmd ) #NEWLINE# if ( out [ 'retcode' ] != 0 ) : #NEWLINE# #INDENT# ret [ 'comment' ] = 'Syntax Error' #NEWLINE# ret [ 'stderr' ] = out [ 'stderr' ] #NEWLINE# ret [ 'result' ] = False #NEWLINE# return ret #NEWLINE# #UNINDENT# ret [ 'comment' ] = 'Syntax OK' #NEWLINE# ret [ 'stdout' ] = out [ 'stdout' ] #NEWLINE# ret [ 'result' ] = True #NEWLINE# return ret