updating testdays settings, more refactoring to get rid of conditionals in taskotron roles

This commit is contained in:
Tim Flink 2015-10-05 15:33:40 +00:00
parent 5204b26cf2
commit 029119e78b
3 changed files with 8 additions and 20 deletions

View file

@ -49,10 +49,9 @@ resultsdb_endpoint: 'resultsdb_api'
resultsdb_fe_endpoint: 'resultsdb'
resultsdb_db_name: resultsdb_testdays
# the names for this needs to be fixed - for now it's just a hacky workaround to avoid a freeze break request
local_resultsdb_db_user: "{{ testdays_testdays_db_user }}"
local_resultsdb_db_password: "{{ testdays_testdays_db_password }}"
local_resultsdb_secret_key: "{{ testdays_resultsdb_secretkey }}"
resultsdb_db_user: "{{ testdays_testdays_db_user }}"
resultsdb_db_password: "{{ testdays_testdays_db_password }}"
resultsdb_secret_key: "{{ testdays_resultsdb_secretkey }}"
allowed_hosts:
- 127.0.0.1

View file

@ -23,8 +23,8 @@
sudo: true
action: postgresql_db db={{ resultsdb_db_name }}
- name: ensure dev resultsdb db user has access to dev database
when: deployment_type == 'dev'
- name: ensure resultsdb db user has access to database
when: deployment_type == 'dev' or deployment_type == 'local'
delegate_to: "{{ resultsdb_db_host_machine }}"
sudo_user: postgres
sudo: true
@ -44,13 +44,6 @@
sudo: true
action: postgresql_user db={{ resultsdb_db_name }} user={{ prod_resultsdb_db_user }} password={{ prod_resultsdb_db_password }} role_attr_flags=NOSUPERUSER
- name: ensure local resultsdb db user has access to prod database
when: deployment_type == 'local'
delegate_to: "{{ resultsdb_db_host }}"
sudo_user: postgres
sudo: true
action: postgresql_user db={{ resultsdb_db_name }} user={{ local_resultsdb_db_user }} password={{ local_resultsdb_db_password }} role_attr_flags=NOSUPERUSER
- name: ensure selinux lets httpd talk to postgres
seboolean: name=httpd_can_network_connect_db persistent=yes state=yes

View file

@ -6,13 +6,9 @@ SQLALCHEMY_DATABASE_URI = 'postgresql+psycopg2://{{ prod_resultsdb_db_user }}:{{
SECRET_KEY = '{{ stg_resultsdb_secret_key }}'
SQLALCHEMY_DATABASE_URI = 'postgresql+psycopg2://{{ stg_resultsdb_db_user }}:{{ stg_resultsdb_db_password }}@{{ resultsdb_db_host }}:{{ resultsdb_db_port }}/{{ resultsdb_db_name }}'
{% endif %}
{%- if deployment_type == 'dev' %}
SECRET_KEY = '{{ dev_resultsdb_secret_key }}'
SQLALCHEMY_DATABASE_URI = 'postgresql+psycopg2://{{ dev_resultsdb_db_user }}:{{ dev_resultsdb_db_password }}@{{ resultsdb_db_host }}:{{ resultsdb_db_port }}/{{ resultsdb_db_name }}'
{% endif %}
{%- if deployment_type == 'local' %}
SECRET_KEY = '{{ local_resultsdb_secret_key }}'
SQLALCHEMY_DATABASE_URI = 'postgresql+psycopg2://{{ local_resultsdb_db_user }}:{{ local_resultsdb_db_password }}@127.0.0.1:{{ resultsdb_db_port }}/{{ resultsdb_db_name }}'
{%- if deployment_type == 'local' or deployment_type == 'dev'%}
SECRET_KEY = '{{ resultsdb_secret_key }}'
SQLALCHEMY_DATABASE_URI = 'postgresql+psycopg2://{{ resultsdb_db_user }}:{{ resultsdb_db_password }}@127.0.0.1:{{ resultsdb_db_port }}/{{ resultsdb_db_name }}'
{% endif %}
FILE_LOGGING = False
LOGFILR = '/var/log/resultsdb/resultsdb.log'