From b73a8efbd998d7d5fa039df65f0c5f1f9ad3ae03 Mon Sep 17 00:00:00 2001 From: James Cammarata Date: Mon, 17 Feb 2014 14:45:15 -0600 Subject: [PATCH] Tweak library installation path to default to /usr/share/ansible if specified --- setup.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/setup.py b/setup.py index ca170b27e77..b1a80e0e0fc 100644 --- a/setup.py +++ b/setup.py @@ -10,7 +10,13 @@ from distutils.core import setup # find library modules 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/") data_files = [] for i in dirs: