mirror of
https://github.com/ansible/awx.git
synced 2026-01-12 02:19:58 -03:30
* release_3.0.0: (270 commits) Inventory Manage > copy/move groups disable copy option where impossible, add to Root Group target, resolves #1749 (#2218) fixes access issue for InventoryScript.admin_role Make sure project team list is filtered for access Fix up the project teams list fix api test fix tests with refreshes adjusting Credential model and migrations adjusting API for new Credential.organization Fix Openstack inventory on Ubuntu 12 (#2318) Attach labels instead of erroring on creation if label already exists Fix system-tracking typo update test_rbac_api to new object_roles naming Fixing Credential access issue Fix an issue calling build_env for system jobs remove dead fields from Groups > Add manual source type, resovles #2288 (#2305) fixes regression on license expiresOn display, resolves #2277 (#2287) fix edit action in Jobs > Schedules tab view, resolves #2258 (#2292) Fixed several bugs with adding permissions where checkboxes weren't checked properly or were disappearing when paging was involved. specify playbook vars in a way that works with 1.9 Change ldap and other sso defaults to remove from team/admin ...
137 lines
4.4 KiB
Python
Executable File
137 lines
4.4 KiB
Python
Executable File
#!/usr/bin/env python
|
|
|
|
# Copyright (c) 2015 Ansible, Inc.
|
|
# All Rights Reserved.
|
|
|
|
import os
|
|
import datetime
|
|
import glob
|
|
import sys
|
|
from setuptools import setup
|
|
|
|
from awx import __version__
|
|
|
|
if os.getenv('OFFICIAL', 'no') == 'yes':
|
|
build_timestamp = ''
|
|
else:
|
|
build_timestamp = '-' + os.getenv("BUILD", datetime.datetime.now().strftime('0.git%Y%m%d%H%M'))
|
|
|
|
# Paths we'll use later
|
|
etcpath = "/etc/tower"
|
|
homedir = "/var/lib/awx"
|
|
bindir = "/usr/bin"
|
|
sharedir = "/usr/share/awx"
|
|
docdir = "/usr/share/doc/ansible-tower"
|
|
|
|
if os.path.exists("/etc/debian_version"):
|
|
sysinit = "/etc/init.d"
|
|
webconfig = "/etc/apache2/conf.d"
|
|
# sosreport-3.1 (and newer) look in '/usr/share/sosreport/sos/plugins'
|
|
# sosreport-3.0 looks in '/usr/lib/python2.7/dist-packages/sos/plugins'
|
|
# debian/<package>.links will create symlinks to support both versions
|
|
sosconfig = "/usr/share/sosreport/sos/plugins"
|
|
else:
|
|
sysinit = "/etc/rc.d/init.d"
|
|
webconfig = "/etc/httpd/conf.d"
|
|
# The .spec will create symlinks to support multiple versions of sosreport
|
|
sosconfig = "/usr/share/sosreport/sos/plugins"
|
|
|
|
#####################################################################
|
|
# Helper Functions
|
|
|
|
def explode_glob_path(path):
|
|
"""Take a glob and hand back the full recursive expansion,
|
|
ignoring links.
|
|
"""
|
|
|
|
result = []
|
|
includes = glob.glob(path)
|
|
for item in includes:
|
|
if os.path.isdir(item) and not os.path.islink(item):
|
|
result.extend(explode_glob_path(os.path.join(item, "*")))
|
|
else:
|
|
result.append(item)
|
|
return result
|
|
|
|
|
|
def proc_data_files(data_files):
|
|
"""Because data_files doesn't natively support globs...
|
|
let's add them.
|
|
"""
|
|
|
|
result = []
|
|
|
|
# If running in a virtualenv, don't return data files that would install to
|
|
# system paths (mainly useful for running tests via tox).
|
|
if hasattr(sys, 'real_prefix'):
|
|
return result
|
|
|
|
for dir,files in data_files:
|
|
includes = []
|
|
for item in files:
|
|
includes.extend(explode_glob_path(item))
|
|
result.append((dir, includes))
|
|
return result
|
|
|
|
#####################################################################
|
|
|
|
setup(
|
|
name='ansible-tower',
|
|
version=__version__.split("-")[0], # FIXME: Should keep full version here?
|
|
author='Ansible, Inc.',
|
|
author_email='support@ansible.com',
|
|
description='ansible-tower: API, UI and Task Engine for Ansible',
|
|
long_description='AWX provides a web-based user interface, REST API and '
|
|
'task engine built on top of Ansible',
|
|
license='Proprietary',
|
|
keywords='ansible',
|
|
url='http://github.com/ansible/ansible-commander',
|
|
packages=['awx'],
|
|
include_package_data=True,
|
|
zip_safe=False,
|
|
setup_requires=[],
|
|
classifiers=[
|
|
'Development Status :: 5 - Production/Stable',
|
|
'Environment :: Web Environment',
|
|
'Framework :: Django',
|
|
'Intended Audience :: Developers',
|
|
'Intended Audience :: Information Technology',
|
|
'Intended Audience :: System Administrators'
|
|
'License :: Other/Proprietary License',
|
|
'Natural Language :: English',
|
|
'Operating System :: OS Independent',
|
|
'Operating System :: POSIX',
|
|
'Programming Language :: Python',
|
|
'Topic :: System :: Installation/Setup',
|
|
'Topic :: System :: Systems Administration',
|
|
],
|
|
entry_points = {
|
|
'console_scripts': [
|
|
'awx-manage = awx:manage',
|
|
'tower-manage = awx:manage',
|
|
],
|
|
},
|
|
data_files = proc_data_files([
|
|
("%s" % homedir, ["config/wsgi.py",
|
|
"awx/static/favicon.ico"]),
|
|
("%s" % webconfig, ["config/awx-httpd-80.conf",
|
|
"config/awx-httpd-443.conf"]),
|
|
("%s" % sharedir, ["tools/scripts/request_tower_configuration.sh","tools/scripts/request_tower_configuration.ps1"]),
|
|
("%s" % docdir, ["docs/licenses/*",]),
|
|
("%s" % bindir, ["tools/scripts/ansible-tower-service",
|
|
"tools/scripts/tower-python"]),
|
|
("%s" % sosconfig, ["tools/sosreport/tower.py"])]),
|
|
options = {
|
|
'egg_info': {
|
|
'tag_build': build_timestamp,
|
|
},
|
|
'aliases': {
|
|
'dev_build': 'clean --all egg_info sdist',
|
|
'release_build': 'clean --all egg_info -b "" sdist',
|
|
},
|
|
'build_scripts': {
|
|
'executable': '/usr/bin/tower-python',
|
|
},
|
|
},
|
|
)
|