diff --git a/roles/installer/templates/credentials.py.j2 b/roles/installer/templates/credentials.py.j2 index 3a566752..3df41d4f 100644 --- a/roles/installer/templates/credentials.py.j2 +++ b/roles/installer/templates/credentials.py.j2 @@ -4,7 +4,7 @@ DATABASES = { 'ENGINE': 'awx.main.db.profiled_pg', 'NAME': "{{ awx_postgres_database }}", 'USER': "{{ awx_postgres_user }}", - 'PASSWORD': "{{ awx_postgres_pass }}", + 'PASSWORD': "{{ awx_postgres_pass | quote }}", 'HOST': '{{ awx_postgres_host }}', 'PORT': "{{ awx_postgres_port }}", 'OPTIONS': { 'sslmode': '{{ pg_sslmode|default("prefer") }}', diff --git a/roles/installer/templates/environment.sh.j2 b/roles/installer/templates/environment.sh.j2 index a8821d49..28a4ea66 100644 --- a/roles/installer/templates/environment.sh.j2 +++ b/roles/installer/templates/environment.sh.j2 @@ -2,4 +2,4 @@ DATABASE_USER={{ awx_postgres_user }} DATABASE_NAME={{ awx_postgres_database }} DATABASE_HOST={{ awx_postgres_host }} DATABASE_PORT={{ awx_postgres_port }} -DATABASE_PASSWORD={{ awx_postgres_pass }} +DATABASE_PASSWORD={{ awx_postgres_pass | quote }} diff --git a/roles/installer/templates/tower_config.yaml.j2 b/roles/installer/templates/tower_config.yaml.j2 index 4d2e23ca..dba4413c 100644 --- a/roles/installer/templates/tower_config.yaml.j2 +++ b/roles/installer/templates/tower_config.yaml.j2 @@ -9,11 +9,6 @@ metadata: app: '{{ deployment_type }}' data: environment: | - DATABASE_USER=awx - DATABASE_NAME=awx - DATABASE_HOST='{{ meta.name }}-postgres.{{ meta.namespace }}.svc.cluster.local' - DATABASE_PORT='5432' - DATABASE_PASSWORD={{ awx_postgres_pass | quote }} AWX_SKIP_MIGRATIONS=true settings: | @@ -83,22 +78,7 @@ data: LOGGING['handlers']['rbac_migrations'] = {'class': 'logging.NullHandler'} LOGGING['handlers']['system_tracking_migrations'] = {'class': 'logging.NullHandler'} LOGGING['handlers']['management_playbooks'] = {'class': 'logging.NullHandler'} - - DATABASES = { - 'default': { - 'ATOMIC_REQUESTS': True, - 'ENGINE': 'awx.main.db.profiled_pg', - 'NAME': 'awx', - 'USER': 'awx', - 'PASSWORD': '{{ awx_postgres_pass | quote }}', - 'HOST': '{{ meta.name }}-postgres.{{ meta.namespace }}.svc.cluster.local', - 'PORT': '5432', - } - } - - if os.getenv("DATABASE_SSLMODE", False): - DATABASES['default']['OPTIONS'] = {'sslmode': os.getenv("DATABASE_SSLMODE")} - + USE_X_FORWARDED_PORT = True BROADCAST_WEBSOCKET_PORT = 8052 BROADCAST_WEBSOCKET_PROTOCOL = 'http'