mirror of
https://github.com/ansible/awx.git
synced 2026-01-09 23:12:08 -03:30
Remove code and settings no longer used
This commit is contained in:
parent
7801590bef
commit
cb1df4a334
3
Makefile
3
Makefile
@ -13,7 +13,6 @@ MANAGEMENT_COMMAND ?= awx-manage
|
||||
IMAGE_REPOSITORY_AUTH ?=
|
||||
IMAGE_REPOSITORY_BASE ?= https://gcr.io
|
||||
VERSION := $(shell cat VERSION)
|
||||
PYCURL_SSL_LIBRARY ?= openssl
|
||||
|
||||
# NOTE: This defaults the container image version to the branch that's active
|
||||
COMPOSE_TAG ?= $(GIT_BRANCH)
|
||||
@ -28,7 +27,7 @@ DEVEL_IMAGE_NAME ?= $(DEV_DOCKER_TAG_BASE)/awx_devel:$(COMPOSE_TAG)
|
||||
|
||||
# Python packages to install only from source (not from binary wheels)
|
||||
# Comma separated list
|
||||
SRC_ONLY_PKGS ?= cffi,pycparser,psycopg2,twilio,pycurl
|
||||
SRC_ONLY_PKGS ?= cffi,pycparser,psycopg2,twilio
|
||||
# These should be upgraded in the AWX and Ansible venv before attempting
|
||||
# to install the actual requirements
|
||||
VENV_BOOTSTRAP ?= pip==19.3.1 setuptools==41.6.0 wheel==0.36.2
|
||||
|
||||
@ -10,7 +10,6 @@ import subprocess
|
||||
import sys
|
||||
import time
|
||||
import traceback
|
||||
import shutil
|
||||
|
||||
# Django
|
||||
from django.conf import settings
|
||||
@ -75,17 +74,6 @@ class AnsibleInventoryLoader(object):
|
||||
else:
|
||||
self.venv_path = settings.ANSIBLE_VENV_PATH
|
||||
|
||||
def get_path_to_ansible_inventory(self):
|
||||
venv_exe = os.path.join(self.venv_path, 'bin', 'ansible-inventory')
|
||||
if os.path.exists(venv_exe):
|
||||
return venv_exe
|
||||
elif os.path.exists(os.path.join(self.venv_path, 'bin', 'ansible')):
|
||||
# if bin/ansible exists but bin/ansible-inventory doesn't, it's
|
||||
# probably a really old version of ansible that doesn't support
|
||||
# ansible-inventory
|
||||
raise RuntimeError("{} does not exist (please upgrade to ansible >= 2.4)".format(venv_exe))
|
||||
return shutil.which('ansible-inventory')
|
||||
|
||||
def get_base_args(self):
|
||||
bargs = ['podman', 'run', '--user=root', '--quiet']
|
||||
bargs.extend(['-v', '{0}:{0}:Z'.format(self.source)])
|
||||
|
||||
@ -1062,9 +1062,6 @@ class BaseTask(object):
|
||||
os.chmod(path, stat.S_IRUSR)
|
||||
return path
|
||||
|
||||
def build_cwd(self, instance, private_data_dir):
|
||||
raise NotImplementedError
|
||||
|
||||
def build_credentials_list(self, instance):
|
||||
return []
|
||||
|
||||
@ -1372,9 +1369,12 @@ class BaseTask(object):
|
||||
|
||||
self.instance.log_lifecycle("running_playbook")
|
||||
if isinstance(self.instance, SystemJob):
|
||||
cwd = self.build_cwd(self.instance, private_data_dir)
|
||||
res = ansible_runner.interface.run(
|
||||
project_dir=cwd, event_handler=self.event_handler, finished_callback=self.finished_callback, status_handler=self.status_handler, **params
|
||||
project_dir=settings.BASE_DIR,
|
||||
event_handler=self.event_handler,
|
||||
finished_callback=self.finished_callback,
|
||||
status_handler=self.status_handler,
|
||||
**params,
|
||||
)
|
||||
else:
|
||||
receptor_job = AWXReceptorJob(self, params)
|
||||
@ -1640,9 +1640,6 @@ class RunJob(BaseTask):
|
||||
|
||||
return args
|
||||
|
||||
def build_cwd(self, job, private_data_dir):
|
||||
return os.path.join(private_data_dir, 'project')
|
||||
|
||||
def build_playbook_path_relative_to_cwd(self, job, private_data_dir):
|
||||
return job.playbook
|
||||
|
||||
@ -2021,9 +2018,6 @@ class RunProjectUpdate(BaseTask):
|
||||
|
||||
self._write_extra_vars_file(private_data_dir, extra_vars)
|
||||
|
||||
def build_cwd(self, project_update, private_data_dir):
|
||||
return os.path.join(private_data_dir, 'project')
|
||||
|
||||
def build_playbook_path_relative_to_cwd(self, project_update, private_data_dir):
|
||||
return os.path.join('project_update.yml')
|
||||
|
||||
@ -2472,17 +2466,6 @@ class RunInventoryUpdate(BaseTask):
|
||||
|
||||
return rel_path
|
||||
|
||||
def build_cwd(self, inventory_update, private_data_dir):
|
||||
"""
|
||||
There is one case where the inventory "source" is in a different
|
||||
location from the private data:
|
||||
- SCM, where source needs to live in the project folder
|
||||
"""
|
||||
src = inventory_update.source
|
||||
if src == 'scm' and inventory_update.source_project_update:
|
||||
return os.path.join(CONTAINER_ROOT, 'project')
|
||||
return CONTAINER_ROOT
|
||||
|
||||
def build_playbook_path_relative_to_cwd(self, inventory_update, private_data_dir):
|
||||
return None
|
||||
|
||||
@ -2758,9 +2741,6 @@ class RunAdHocCommand(BaseTask):
|
||||
module_args = sanitize_jinja(module_args)
|
||||
return module_args
|
||||
|
||||
def build_cwd(self, ad_hoc_command, private_data_dir):
|
||||
return private_data_dir
|
||||
|
||||
def build_playbook_path_relative_to_cwd(self, job, private_data_dir):
|
||||
return None
|
||||
|
||||
@ -2825,9 +2805,6 @@ class RunSystemJob(BaseTask):
|
||||
env.update(base_env)
|
||||
return env
|
||||
|
||||
def build_cwd(self, instance, private_data_dir):
|
||||
return settings.BASE_DIR
|
||||
|
||||
def build_playbook_path_relative_to_cwd(self, job, private_data_dir):
|
||||
return None
|
||||
|
||||
|
||||
@ -125,10 +125,6 @@ LOGIN_URL = '/api/login/'
|
||||
# This directory should not be web-accessible.
|
||||
PROJECTS_ROOT = '/var/lib/awx/projects/'
|
||||
|
||||
# Absolute filesystem path to the directory to host collections for
|
||||
# running inventory imports
|
||||
AWX_ANSIBLE_COLLECTIONS_PATHS = os.path.join(BASE_DIR, 'vendor', 'awx_ansible_collections')
|
||||
|
||||
# Absolute filesystem path to the directory for job status stdout (default for
|
||||
# development and tests, default for production defined in production.py). This
|
||||
# directory should not be web-accessible
|
||||
|
||||
@ -94,9 +94,6 @@ for setting in dir(this_module):
|
||||
include(optional('/etc/tower/settings.py'), scope=locals())
|
||||
include(optional('/etc/tower/conf.d/*.py'), scope=locals())
|
||||
|
||||
# Installed differently in Dockerfile compared to production versions
|
||||
AWX_ANSIBLE_COLLECTIONS_PATHS = '/var/lib/awx/vendor/awx_ansible_collections'
|
||||
|
||||
BASE_VENV_PATH = "/var/lib/awx/venv/"
|
||||
ANSIBLE_VENV_PATH = os.path.join(BASE_VENV_PATH, "ansible")
|
||||
AWX_VENV_PATH = os.path.join(BASE_VENV_PATH, "awx")
|
||||
|
||||
@ -14,8 +14,6 @@ STATIC_ROOT = '/var/lib/awx/public/static'
|
||||
|
||||
PROJECTS_ROOT = '/var/lib/awx/projects'
|
||||
|
||||
AWX_ANSIBLE_COLLECTIONS_PATHS = '/var/lib/awx/vendor/awx_ansible_collections'
|
||||
|
||||
JOBOUTPUT_ROOT = '/var/lib/awx/job_status'
|
||||
|
||||
SECRET_KEY = get_secret()
|
||||
|
||||
@ -24,7 +24,6 @@ RUN dnf -y update && \
|
||||
gcc-c++ \
|
||||
git-core \
|
||||
glibc-langpack-en \
|
||||
libcurl-devel \
|
||||
libffi-devel \
|
||||
libtool-ltdl-devel \
|
||||
make \
|
||||
|
||||
@ -18,9 +18,6 @@
|
||||
# INTERNAL_IPS = ('172.19.0.1', '172.18.0.1', '192.168.100.1')
|
||||
# ALLOWED_HOSTS = ['*']
|
||||
|
||||
# Location for cross-development of inventory plugins
|
||||
AWX_ANSIBLE_COLLECTIONS_PATHS = '/var/lib/awx/vendor/awx_ansible_collections'
|
||||
|
||||
# The UUID of the system, for HA.
|
||||
SYSTEM_UUID = '00000000-0000-0000-0000-000000000000'
|
||||
|
||||
@ -35,16 +32,16 @@ SYSTEM_UUID = '00000000-0000-0000-0000-000000000000'
|
||||
# WARNING also logs 4xx responses.
|
||||
|
||||
# Enable the following lines to turn on lots of permissions-related logging.
|
||||
#LOGGING['loggers']['awx.main.access']['level'] = 'DEBUG'
|
||||
#LOGGING['loggers']['awx.main.signals']['level'] = 'DEBUG'
|
||||
#LOGGING['loggers']['awx.main.permissions']['level'] = 'DEBUG'
|
||||
# LOGGING['loggers']['awx.main.access']['level'] = 'DEBUG'
|
||||
# LOGGING['loggers']['awx.main.signals']['level'] = 'DEBUG'
|
||||
# LOGGING['loggers']['awx.main.permissions']['level'] = 'DEBUG'
|
||||
|
||||
# Enable the following line to turn on database settings logging.
|
||||
#LOGGING['loggers']['awx.conf']['level'] = 'DEBUG'
|
||||
# LOGGING['loggers']['awx.conf']['level'] = 'DEBUG'
|
||||
|
||||
# Enable the following lines to turn on LDAP auth logging.
|
||||
#LOGGING['loggers']['django_auth_ldap']['handlers'] = ['console']
|
||||
#LOGGING['loggers']['django_auth_ldap']['level'] = 'DEBUG'
|
||||
# LOGGING['loggers']['django_auth_ldap']['handlers'] = ['console']
|
||||
# LOGGING['loggers']['django_auth_ldap']['level'] = 'DEBUG'
|
||||
|
||||
BROADCAST_WEBSOCKET_PORT = 8013
|
||||
BROADCAST_WEBSOCKET_VERIFY_CERT = False
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user