Tweak library installation path to default to /usr/share/ansible if specified
This commit is contained in:
parent
79b5ed5331
commit
b73a8efbd9
1 changed files with 7 additions and 1 deletions
8
setup.py
8
setup.py
|
@ -10,7 +10,13 @@ from distutils.core import setup
|
||||||
|
|
||||||
# find library modules
|
# find library modules
|
||||||
from ansible.constants import DEFAULT_MODULE_PATH
|
from ansible.constants import DEFAULT_MODULE_PATH
|
||||||
install_path = DEFAULT_MODULE_PATH.split(os.pathsep)[0]
|
module_paths = DEFAULT_MODULE_PATH.split(os.pathsep)
|
||||||
|
# always install in /usr/share/ansible if specified
|
||||||
|
# otherwise use the first module path listed
|
||||||
|
if '/usr/share/ansible' in module_paths:
|
||||||
|
install_path = '/usr/share/ansible'
|
||||||
|
else:
|
||||||
|
install_path = module_paths[0]
|
||||||
dirs=os.listdir("./library/")
|
dirs=os.listdir("./library/")
|
||||||
data_files = []
|
data_files = []
|
||||||
for i in dirs:
|
for i in dirs:
|
||||||
|
|
Loading…
Reference in a new issue