I have the following simple task to check my Python version
`
- name: Check if Python version matches target
commadn: “/local/python/bin/python --version”
register: python_ver_check
- debug: var=python_ver_check
`
and I get
`
TASK [python3 : debug] *********************************************************
ok: [localhost] => {
“python_ver_check”: {
“changed”: true,
“cmd”: “/local/python/bin/python --version”,
“delta”: “0:00:00.003369”,
“end”: “2017-10-31 14:00:10.701899”,
“failed”: false,
“rc”: 0,
“start”: “2017-10-31 14:00:10.698530”,
“stderr”: “Python 2.7.14”,
“stderr_lines”: [
“Python 2.7.14”
],
“stdout”: “”,
“stdout_lines”:
}
}
`
Why stderr and not stdout? The task executed with no errors.