mirror of
https://github.com/ansible/awx.git
synced 2026-02-24 22:46:01 -03:30
Minor updates to local app_setup playbook so it *should* work to setup PostgreSQL database.
This commit is contained in:
@@ -29,11 +29,11 @@
|
||||
- python-lxml # xml for ?format=xml instead of json (optional)
|
||||
|
||||
# python-setuptools package is old (0.6.10, ~2009) vs. latest distribute (0.6.40)
|
||||
- name: install latest distribute from pypi
|
||||
pip: name=distribute state=latest
|
||||
#- name: install latest distribute from pypi
|
||||
# pip: name=distribute state=latest
|
||||
|
||||
- name: install python modules via pip
|
||||
pip: requirements=${working_dir}/requirements/dev.txt
|
||||
#- name: install python modules via pip
|
||||
# pip: requirements=${working_dir}/requirements/dev.txt
|
||||
|
||||
- name: configure the database authentication more or less open for setup
|
||||
template: src=templates/pg_hba_low.j2 dest=/var/lib/pgsql/data/pg_hba.conf owner=postgres
|
||||
|
||||
@@ -1,39 +1,38 @@
|
||||
# {{ ansible_managed }}
|
||||
# Copyright (c) 2013 AnsibleWorks, Inc.
|
||||
# All Rights Reserved.
|
||||
|
||||
# Local Django settings for AnsibleWorks project.
|
||||
|
||||
from development import *
|
||||
|
||||
ADMINS = (
|
||||
# ('Your Name', 'your_email@domain.com'),
|
||||
)
|
||||
|
||||
MANAGERS = ADMINS
|
||||
|
||||
# Database settings to use PostgreSQL for development.
|
||||
DATABASES = {
|
||||
'default': {
|
||||
'ENGINE': 'django.db.backends.postgresql_psycopg2',
|
||||
'NAME': 'acom',
|
||||
'USER': 'ansible_commander',
|
||||
'PASSWORD': '{{ database_password }}',
|
||||
'HOST': '',
|
||||
'PORT': '',
|
||||
'ENGINE': 'django.db.backends.postgresql_psycopg2',
|
||||
'NAME': 'awx',
|
||||
'USER': 'awx',
|
||||
'PASSWORD': '{{ database_password }}',
|
||||
'HOST': '',
|
||||
'PORT': '',
|
||||
}
|
||||
}
|
||||
|
||||
if 'test' in sys.argv:
|
||||
# Use SQLite for unit tests instead of PostgreSQL.
|
||||
if len(sys.argv) >= 2 and sys.argv[1] == 'test':
|
||||
DATABASES = {
|
||||
'default': {
|
||||
'ENGINE': 'django.db.backends.sqlite3',
|
||||
'NAME': os.path.join(BASE_DIR, 'acom.sqlite3'),
|
||||
# Test database cannot be :memory: for celery/inventory tests to work.
|
||||
'TEST_NAME': os.path.join(BASE_DIR, 'acom_test.sqlite3'),
|
||||
'NAME': os.path.join(BASE_DIR, 'awx.sqlite3'),
|
||||
# Test database cannot be :memory: for celery/inventory tests.
|
||||
'TEST_NAME': os.path.join(BASE_DIR, 'awx_test.sqlite3'),
|
||||
}
|
||||
}
|
||||
|
||||
# Absolute filesystem path to the directory to host projects (with playbooks).
|
||||
# This directory should not be web-accessible.
|
||||
# This directory should NOT be web-accessible.
|
||||
PROJECTS_ROOT = os.path.join(BASE_DIR, 'projects')
|
||||
|
||||
# Local time zone for this installation. Choices can be found here:
|
||||
@@ -54,6 +53,11 @@ LANGUAGE_CODE = 'en-us'
|
||||
# the secret key from an environment variable or a file instead.
|
||||
SECRET_KEY = 'p7z7g1ql4%6+(6nlebb6hdk7sd^&fnjpal308%n%+p^_e6vo1y'
|
||||
|
||||
# HTTP headers and meta keys to search to determine remote host name or IP. Add
|
||||
# additional items to this list, such as "HTTP_X_FORWARDED_FOR", if behind a
|
||||
# reverse proxy.
|
||||
REMOTE_HOST_HEADERS = ['REMOTE_ADDR', 'REMOTE_HOST']
|
||||
|
||||
# Email address that error messages come from.
|
||||
SERVER_EMAIL = 'root@localhost'
|
||||
|
||||
@@ -80,4 +84,4 @@ DEFAULT_FROM_EMAIL = 'webmaster@localhost'
|
||||
|
||||
# Subject-line prefix for email messages send with django.core.mail.mail_admins
|
||||
# or ...mail_managers. Make sure to include the trailing space.
|
||||
EMAIL_SUBJECT_PREFIX = '[AnsibleWorks] '
|
||||
EMAIL_SUBJECT_PREFIX = '[AWX] '
|
||||
|
||||
Reference in New Issue
Block a user