python - SaltStack client.cmd outputter -


I am using Python / Flask / Salt API code to make any kind of salt stack web map. Example state check code and output page: -

  @ app.route ('/ salty') def salty (): user = {'nickname': 'human'} # Fake user client = Salt.client.LocalClient () retinfo = client.cmd ('linuxservers', 'state.sls', ['linuxservers.bashbug-check'], expr_form = 'nodegroup') Returns render_template ("salt.html", title  

The Dean Output looks like this on my webpage: -

  {'testerver1': {= 'Salt', user = user, CMD = retinfo) 'CMD_ | -Loc-Bassbaug_ | -Loc-Bassbaug_ | - 'script': {'comment': 'command' status -basbug 'run', '__run_num_': 0, 'change': {'pid': 431, 'password': 0, 'stderr': '', 'Stdout': 'I hate color'), 'name': 'space -basbug', 'result': true}},  

This is, I will call it CDD I do not want to show the output from the line bin, which is the highest output style as far as I know.

>


Comments

Popular posts from this blog

HTML/CSS - Automatically set height width from background image? -

php - Mysql Show Process - Sleep Commands and what to do -

c - What is the address of buf (the local variable in the main function)? -