I have the following code in python:
i = call(["salt-cloud", "-m", fileName, "--assume-yes"])
print (i)
i is always 0, because the operation is finished.
The problem is that I want to get the output of this operation. In our case:
window:
----------
Error:
----------
Not Deployed:
Failed to start Salt on host window
is the output of running salt-cloud -m fileName --assume-yes, and it is an indication that error raised in this process, and I want to know it.
How can I achieve it in Python?