From 628c19e091f5be1eacba666cd213e755016a04aa Mon Sep 17 00:00:00 2001 From: Georgiy Kutsurua Date: Sat, 9 Dec 2017 15:19:34 +0400 Subject: [PATCH] Better expressions --- keystone/files/ocata/keystone.conf.Debian | 2 +- keystone/files/ocata/keystone.conf.RedHat | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/keystone/files/ocata/keystone.conf.Debian b/keystone/files/ocata/keystone.conf.Debian index 2556e57..6f3dbd1 100644 --- a/keystone/files/ocata/keystone.conf.Debian +++ b/keystone/files/ocata/keystone.conf.Debian @@ -776,7 +776,7 @@ key_repository = {{ server.credential.location }} # Deprecated group/name - [DATABASE]/sql_connection # Deprecated group/name - [sql]/connection #connection = -connection={%- if server.database.engine == 'mysql' -%}{{ server.database.engine }}+pymysql{%- else -%}{{ server.database.engine }}{%- endif -%}://{{ server.database.user }}:{{ server.database.password }}@{{ server.database.host }}/{{ server.database.name }}{%- if server.database.get('ssl',{}).get('enabled',False) %}?ssl_ca={{ server.database.ssl.get('cacert_file', system_cacerts_file) }}{% endif %} +connection={{ server.database.engine }}{%- if server.database.engine == 'mysql' and '+' not in server.database.engine -%}+pymysql{%- endif -%}://{{ server.database.user }}:{{ server.database.password }}@{{ server.database.host }}/{{ server.database.name }}{%- if server.database.get('ssl',{}).get('enabled',False) %}?ssl_ca={{ server.database.ssl.get('cacert_file', system_cacerts_file) }}{% endif %} # The SQLAlchemy connection string to use to connect to the slave database. # (string value) diff --git a/keystone/files/ocata/keystone.conf.RedHat b/keystone/files/ocata/keystone.conf.RedHat index f72f2e7..745ff25 100644 --- a/keystone/files/ocata/keystone.conf.RedHat +++ b/keystone/files/ocata/keystone.conf.RedHat @@ -751,7 +751,7 @@ driver = sql # Deprecated group/name - [DATABASE]/sql_connection # Deprecated group/name - [sql]/connection #connection = -connection={%- if server.database.engine == 'mysql' -%}{{ server.database.engine }}+pymysql{%- else -%}{{ server.database.engine }}{%- endif -%}://{{ server.database.user }}:{{ server.database.password }}@{{ server.database.host }}/{{ server.database.name }} +connection={{ server.database.engine }}{%- if server.database.engine == 'mysql' and '+' not in server.database.engine -%}+pymysql{%- endif -%}://{{ server.database.user }}:{{ server.database.password }}@{{ server.database.host }}/{{ server.database.name }} # The SQLAlchemy connection string to use to connect to the slave database. # (string value)