Add DIST_MODULE_PATH so setup.py and ansible.spec can live in harmony. Closes #1277
This commit is contained in:
parent
f3d7294690
commit
baa91ebc95
2 changed files with 7 additions and 3 deletions
|
@ -60,12 +60,16 @@ p = load_config_file()
|
||||||
|
|
||||||
active_user = pwd.getpwuid(os.geteuid())[0]
|
active_user = pwd.getpwuid(os.geteuid())[0]
|
||||||
|
|
||||||
|
# Needed so the RPM can call setup.py and have modules land in the
|
||||||
|
# correct location. See #1277 for discussion
|
||||||
|
DIST_MODULE_PATH = '/usr/share/ansible/'
|
||||||
|
|
||||||
# sections in config file
|
# sections in config file
|
||||||
DEFAULTS='defaults'
|
DEFAULTS='defaults'
|
||||||
|
|
||||||
# configurable things
|
# configurable things
|
||||||
DEFAULT_HOST_LIST = shell_expand_path(get_config(p, DEFAULTS, 'hostfile', 'ANSIBLE_HOSTS', '/etc/ansible/hosts'))
|
DEFAULT_HOST_LIST = shell_expand_path(get_config(p, DEFAULTS, 'hostfile', 'ANSIBLE_HOSTS', '/etc/ansible/hosts'))
|
||||||
DEFAULT_MODULE_PATH = shell_expand_path(get_config(p, DEFAULTS, 'library', 'ANSIBLE_LIBRARY', '/usr/share/ansible'))
|
DEFAULT_MODULE_PATH = shell_expand_path(get_config(p, DEFAULTS, 'library', 'ANSIBLE_LIBRARY', DIST_MODULE_PATH))
|
||||||
DEFAULT_REMOTE_TMP = shell_expand_path(get_config(p, DEFAULTS, 'remote_tmp', 'ANSIBLE_REMOTE_TEMP', '$HOME/.ansible/tmp'))
|
DEFAULT_REMOTE_TMP = shell_expand_path(get_config(p, DEFAULTS, 'remote_tmp', 'ANSIBLE_REMOTE_TEMP', '$HOME/.ansible/tmp'))
|
||||||
DEFAULT_MODULE_NAME = get_config(p, DEFAULTS, 'module_name', None, 'command')
|
DEFAULT_MODULE_NAME = get_config(p, DEFAULTS, 'module_name', None, 'command')
|
||||||
DEFAULT_PATTERN = get_config(p, DEFAULTS, 'pattern', None, '*')
|
DEFAULT_PATTERN = get_config(p, DEFAULTS, 'pattern', None, '*')
|
||||||
|
|
4
setup.py
4
setup.py
|
@ -9,8 +9,8 @@ from ansible import __version__, __author__
|
||||||
from distutils.core import setup
|
from distutils.core import setup
|
||||||
|
|
||||||
# find library modules
|
# find library modules
|
||||||
from ansible.constants import DEFAULT_MODULE_PATH
|
from ansible.constants import DIST_MODULE_PATH
|
||||||
data_files = [ (DEFAULT_MODULE_PATH, glob('./library/*')) ]
|
data_files = [ (DIST_MODULE_PATH, glob('./library/*')) ]
|
||||||
|
|
||||||
print "DATA FILES=%s" % data_files
|
print "DATA FILES=%s" % data_files
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue