diff --git a/pillar/role/web_forum.sls b/pillar/role/web_forum.sls index 0481cd6..f734b47 100644 --- a/pillar/role/web_forum.sls +++ b/pillar/role/web_forum.sls @@ -58,7 +58,7 @@ nginx: vbulletin: config: Database: - dbname: webforums5 + dbname: webforums2 technicalemail: admin-auto@opensuse.org tableprefix: vb_ MasterServer: diff --git a/salt/profile/vbulletin/files/db-tweak.sql b/salt/profile/vbulletin/files/db-tweak.sql index cecec62..66448c2 100644 --- a/salt/profile/vbulletin/files/db-tweak.sql +++ b/salt/profile/vbulletin/files/db-tweak.sql @@ -1,4 +1,4 @@ -grant all on VB.* to '{{username}}'@'{{host}}' identified by '{{password}}'; +grant all on '{{dbname}}'.* to '{{username}}'@'{{host}}' identified by '{{password}}'; update vb_setting set value='{{bburl}}' where varname='bburl'; update vb_setting set value='{{frontendurl}}' where varname='frontendurl'; diff --git a/salt/profile/vbulletin/tools.sls b/salt/profile/vbulletin/tools.sls index de314ae..8679016 100644 --- a/salt/profile/vbulletin/tools.sls +++ b/salt/profile/vbulletin/tools.sls @@ -24,6 +24,7 @@ - source: salt://profile/vbulletin/files/db-tweak.sql - template: jinja - defaults: + dbname: {{ pillar.vbulletin.config.Database.dbname }} host: {{ pillar.vbulletin.config.MasterServer.servername }} username: {{ pillar.vbulletin.config.MasterServer.username }} password: {{ pillar.vbulletin.config.MasterServer.password }}