mirror of
https://github.com/ansible/awx.git
synced 2026-05-19 14:57:39 -02: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-lxml # xml for ?format=xml instead of json (optional)
|
||||||
|
|
||||||
# python-setuptools package is old (0.6.10, ~2009) vs. latest distribute (0.6.40)
|
# python-setuptools package is old (0.6.10, ~2009) vs. latest distribute (0.6.40)
|
||||||
- name: install latest distribute from pypi
|
#- name: install latest distribute from pypi
|
||||||
pip: name=distribute state=latest
|
# pip: name=distribute state=latest
|
||||||
|
|
||||||
- name: install python modules via pip
|
#- name: install python modules via pip
|
||||||
pip: requirements=${working_dir}/requirements/dev.txt
|
# pip: requirements=${working_dir}/requirements/dev.txt
|
||||||
|
|
||||||
- name: configure the database authentication more or less open for setup
|
- 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
|
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.
|
# Copyright (c) 2013 AnsibleWorks, Inc.
|
||||||
# All Rights Reserved.
|
# All Rights Reserved.
|
||||||
|
|
||||||
# Local Django settings for AnsibleWorks project.
|
|
||||||
|
|
||||||
from development import *
|
|
||||||
|
|
||||||
ADMINS = (
|
ADMINS = (
|
||||||
# ('Your Name', 'your_email@domain.com'),
|
# ('Your Name', 'your_email@domain.com'),
|
||||||
)
|
)
|
||||||
|
|
||||||
MANAGERS = ADMINS
|
MANAGERS = ADMINS
|
||||||
|
|
||||||
|
# Database settings to use PostgreSQL for development.
|
||||||
DATABASES = {
|
DATABASES = {
|
||||||
'default': {
|
'default': {
|
||||||
'ENGINE': 'django.db.backends.postgresql_psycopg2',
|
'ENGINE': 'django.db.backends.postgresql_psycopg2',
|
||||||
'NAME': 'acom',
|
'NAME': 'awx',
|
||||||
'USER': 'ansible_commander',
|
'USER': 'awx',
|
||||||
'PASSWORD': '{{ database_password }}',
|
'PASSWORD': '{{ database_password }}',
|
||||||
'HOST': '',
|
'HOST': '',
|
||||||
'PORT': '',
|
'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 = {
|
DATABASES = {
|
||||||
'default': {
|
'default': {
|
||||||
'ENGINE': 'django.db.backends.sqlite3',
|
'ENGINE': 'django.db.backends.sqlite3',
|
||||||
'NAME': os.path.join(BASE_DIR, 'acom.sqlite3'),
|
'NAME': os.path.join(BASE_DIR, 'awx.sqlite3'),
|
||||||
# Test database cannot be :memory: for celery/inventory tests to work.
|
# Test database cannot be :memory: for celery/inventory tests.
|
||||||
'TEST_NAME': os.path.join(BASE_DIR, 'acom_test.sqlite3'),
|
'TEST_NAME': os.path.join(BASE_DIR, 'awx_test.sqlite3'),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
# Absolute filesystem path to the directory to host projects (with playbooks).
|
# 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')
|
PROJECTS_ROOT = os.path.join(BASE_DIR, 'projects')
|
||||||
|
|
||||||
# Local time zone for this installation. Choices can be found here:
|
# 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.
|
# the secret key from an environment variable or a file instead.
|
||||||
SECRET_KEY = 'p7z7g1ql4%6+(6nlebb6hdk7sd^&fnjpal308%n%+p^_e6vo1y'
|
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.
|
# Email address that error messages come from.
|
||||||
SERVER_EMAIL = 'root@localhost'
|
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
|
# Subject-line prefix for email messages send with django.core.mail.mail_admins
|
||||||
# or ...mail_managers. Make sure to include the trailing space.
|
# 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