mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-08-02 20:24:23 -07:00
Show 'ansible' python module paths in --version (#22264)
* Show 'ansible' python module paths in --version
This commit is contained in:
parent
b9a48069f3
commit
dbc0c01c86
1 changed files with 2 additions and 0 deletions
|
@ -31,6 +31,7 @@ import getpass
|
||||||
import subprocess
|
import subprocess
|
||||||
from abc import ABCMeta, abstractmethod
|
from abc import ABCMeta, abstractmethod
|
||||||
|
|
||||||
|
import ansible
|
||||||
from ansible.release import __version__
|
from ansible.release import __version__
|
||||||
from ansible import constants as C
|
from ansible import constants as C
|
||||||
from ansible.errors import AnsibleError, AnsibleOptionsError
|
from ansible.errors import AnsibleError, AnsibleOptionsError
|
||||||
|
@ -483,6 +484,7 @@ class CLI(with_metaclass(ABCMeta, object)):
|
||||||
else:
|
else:
|
||||||
cpath = C.DEFAULT_MODULE_PATH
|
cpath = C.DEFAULT_MODULE_PATH
|
||||||
result = result + "\n configured module search path = %s" % cpath
|
result = result + "\n configured module search path = %s" % cpath
|
||||||
|
result = result + "\n ansible python module location = %s" % ':'.join(ansible.__path__)
|
||||||
result = result + "\n python version = %s" % ''.join(sys.version.splitlines())
|
result = result + "\n python version = %s" % ''.join(sys.version.splitlines())
|
||||||
return result
|
return result
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue