Browse Source

Change database to PostgreSQL

Remove all configuration for MySQL and configure PostgreSQL as the main
database.

All *_mysql_* options have been changed to *_db_* options.

Postgres requires the database user to have a password in order to
connect via localhost. The db_admin_password option is used to set the
password of the admin user (usually postgres).
Shawn Sorichetti 10 years ago
parent
commit
da1b1ad685

+ 2
- 2
roles/mailserver/handlers/main.yml View File

@@ -10,7 +10,7 @@
10 10
 - name: restart solr
11 11
   service: name=tomcat6 state=restarted
12 12
 
13
-- name: import mysql postfix
14
-  mysql_db: name={{ mail_mysql_database }} state=import target=/etc/postfix/import.sql
13
+- name: import sql postfix
14
+  action: shell PGPASSWORD={{ mail_db_password }} psql -h localhost -d {{ mail_db_database }} -U {{ mail_db_username }} -f /etc/postfix/import.sql --set ON_ERROR_STOP=1
15 15
   notify: restart postfix
16 16
 

+ 2
- 2
roles/mailserver/tasks/dovecot.yml View File

@@ -3,10 +3,10 @@
3 3
   with_items:
4 4
     - dovecot-core
5 5
     - dovecot-imapd
6
-    - mysql-server
7
-    - dovecot-mysql
8 6
     - dovecot-lmtpd
9 7
     - dovecot-managesieved
8
+    - postgresql-9.1
9
+    - dovecot-pgsql
10 10
 
11 11
 - name: Create vmail group
12 12
   group: name=vmail state=present gid=5000

+ 15
- 11
roles/mailserver/tasks/postfix.yml View File

@@ -2,24 +2,28 @@
2 2
   apt: pkg={{ item }} state=installed
3 3
   with_items:
4 4
     - postfix
5
-    - mysql-server
6
-    - postfix-mysql
7
-    - python-mysqldb
8 5
     - libsasl2-modules
9 6
     - sasl2-bin
10 7
     - postgrey
8
+    - postgresql-9.1
9
+    - postfix-pgsql
10
+    - python-psycopg2
11
+
12
+- name: Set postgres password
13
+  command: sudo -u {{ db_admin_username }} psql -d {{ db_admin_username }} -c "ALTER USER postgres with  password '{{ db_admin_password }}';"
14
+  notify: import sql postfix
11 15
 
12 16
 - name: Create database user for mail server
13
-  mysql_user: user={{ mail_mysql_username }} password={{ mail_mysql_password }} state=present priv="mailserver.*:ALL"
14
-  notify: import mysql postfix
17
+  postgresql_user: login_host=localhost login_user={{ db_admin_username }} login_password={{ db_admin_password }} name={{ mail_db_username }} password={{ mail_db_password }} state=present
18
+  notify: import sql postfix
15 19
 
16 20
 - name: Create database for mail server
17
-  mysql_db: name={{ mail_mysql_database }} state=present
18
-  notify: import mysql postfix
21
+  postgresql_db: login_host=localhost login_user={{ db_admin_username }} login_password={{ db_admin_password }} name={{ mail_db_database }} state=present owner={{ mail_db_username }}
22
+  notify: import sql postfix
19 23
 
20 24
 - name: Copy import.sql
21 25
   template: src=mailserver.sql.j2 dest=/etc/postfix/import.sql owner=root group=root mode=0600
22
-  notify: import mysql postfix
26
+  notify: import sql postfix
23 27
 
24 28
 - name: Copy main.cf
25 29
   template: src=etc_postfix_main.cf.j2 dest=/etc/postfix/main.cf owner=root group=root
@@ -32,7 +36,7 @@
32 36
 - name: Copy additional postfix configuration files
33 37
   template: src=etc_postfix_{{ item }}.j2 dest=/etc/postfix/{{ item }} owner=root group=root
34 38
   with_items:
35
-    - mysql-virtual-mailbox-domains.cf
36
-    - mysql-virtual-mailbox-maps.cf
37
-    - mysql-virtual-alias-maps.cf
39
+    - pgsql-virtual-mailbox-domains.cf
40
+    - pgsql-virtual-mailbox-maps.cf
41
+    - pgsql-virtual-alias-maps.cf
38 42
   notify: restart postfix

+ 2
- 2
roles/mailserver/templates/etc_dovecot_dovecot-sql.conf.ext.j2 View File

@@ -26,7 +26,7 @@
26 26
 # );
27 27
 
28 28
 # Database driver: mysql, pgsql, sqlite
29
-driver = mysql
29
+driver = pgsql
30 30
 
31 31
 # Database connection string. This is driver-specific setting.
32 32
 #
@@ -63,7 +63,7 @@ driver = mysql
63 63
 #   connect = host=sql.example.com dbname=virtual user=virtual password=blarg
64 64
 #   connect = /etc/dovecot/authdb.sqlite
65 65
 #
66
-connect = host=127.0.0.1 dbname={{ mail_mysql_database }} user={{ mail_mysql_username }} password={{ mail_mysql_password }}
66
+connect = host=127.0.0.1 dbname={{ mail_db_database }} user={{ mail_db_username }} password={{ mail_db_password }}
67 67
 
68 68
 # Default password scheme.
69 69
 #

+ 4
- 4
roles/mailserver/templates/etc_postfix_main.cf.j2 View File

@@ -79,12 +79,12 @@ mailbox_size_limit = 0
79 79
 recipient_delimiter = +
80 80
 inet_interfaces = all
81 81
 
82
-# dovecot mysql
82
+# dovecot db
83 83
 virtual_transport = dovecot
84 84
 dovecot_destination_recipient_limit = 1
85
-virtual_mailbox_domains = mysql:/etc/postfix/mysql-virtual-mailbox-domains.cf
86
-virtual_mailbox_maps = mysql:/etc/postfix/mysql-virtual-mailbox-maps.cf
87
-virtual_alias_maps = mysql:/etc/postfix/mysql-virtual-alias-maps.cf
85
+virtual_mailbox_domains = pgsql:/etc/postfix/pgsql-virtual-mailbox-domains.cf
86
+virtual_mailbox_maps = pgsql:/etc/postfix/pgsql-virtual-mailbox-maps.cf
87
+virtual_alias_maps = pgsql:/etc/postfix/pgsql-virtual-alias-maps.cf
88 88
 local_recipient_maps = $virtual_mailbox_maps
89 89
 
90 90
 # OpenDKIM

+ 4
- 4
roles/mailserver/templates/etc_postfix_mysql-virtual-alias-maps.cf.j2 View File

@@ -1,5 +1,5 @@
1
-user = {{ mail_mysql_username }}
2
-password = {{ mail_mysql_password }}
1
+user = {{ mail_db_username }}
2
+password = {{ mail_db_password }}
3 3
 hosts = 127.0.0.1
4
-dbname = {{ mail_mysql_database }}
5
-query = SELECT destination FROM virtual_aliases WHERE source='%s'
4
+dbname = {{ mail_db_database }}
5
+query = SELECT destination FROM virtual_aliases WHERE source='%s'

+ 3
- 3
roles/mailserver/templates/etc_postfix_mysql-virtual-mailbox-domains.cf.j2 View File

@@ -1,5 +1,5 @@
1
-user = {{ mail_mysql_username }}
2
-password = {{ mail_mysql_password }}
1
+user = {{ mail_db_username }}
2
+password = {{ mail_db_password }}
3 3
 hosts = 127.0.0.1
4
-dbname = {{ mail_mysql_database }}
4
+dbname = {{ mail_db_database }}
5 5
 query = SELECT 1 FROM virtual_domains WHERE name='%s'

+ 3
- 3
roles/mailserver/templates/etc_postfix_mysql-virtual-mailbox-maps.cf.j2 View File

@@ -1,5 +1,5 @@
1
-user = {{ mail_mysql_username }}
2
-password = {{ mail_mysql_password }}
1
+user = {{ mail_db_username }}
2
+password = {{ mail_db_password }}
3 3
 hosts = 127.0.0.1
4
-dbname = {{ mail_mysql_database }}
4
+dbname = {{ mail_db_database }}
5 5
 query = SELECT 1 FROM virtual_users WHERE email='%s'

+ 5
- 0
roles/mailserver/templates/etc_postfix_pgsql-virtual-alias-maps.cf.j2 View File

@@ -0,0 +1,5 @@
1
+user = {{ mail_db_username }}
2
+password = {{ mail_db_password }}
3
+hosts = 127.0.0.1
4
+dbname = {{ mail_db_database }}
5
+query = SELECT destination FROM virtual_aliases WHERE source='%s'

+ 5
- 0
roles/mailserver/templates/etc_postfix_pgsql-virtual-mailbox-domains.cf.j2 View File

@@ -0,0 +1,5 @@
1
+user = {{ mail_db_username }}
2
+password = {{ mail_db_password }}
3
+hosts = 127.0.0.1
4
+dbname = {{ mail_db_database }}
5
+query = SELECT 1 FROM virtual_domains WHERE name='%s'

+ 5
- 0
roles/mailserver/templates/etc_postfix_pgsql-virtual-mailbox-maps.cf.j2 View File

@@ -0,0 +1,5 @@
1
+user = {{ mail_db_username }}
2
+password = {{ mail_db_password }}
3
+hosts = 127.0.0.1
4
+dbname = {{ mail_db_database }}
5
+query = SELECT 1 FROM virtual_users WHERE email='%s'

+ 28
- 28
roles/mailserver/templates/mailserver.sql.j2 View File

@@ -1,47 +1,47 @@
1 1
 -- If tables are not dropped, have to truncate before insert or use "insert or replace" (not postgres compatible)
2 2
 
3
-DROP TABLE IF EXISTS `virtual_users`;
4
-DROP TABLE IF EXISTS `virtual_aliases`;
5
-DROP TABLE IF EXISTS `virtual_domains`;
3
+DROP TABLE IF EXISTS "virtual_users";
4
+DROP TABLE IF EXISTS "virtual_aliases";
5
+DROP TABLE IF EXISTS "virtual_domains";
6 6
 
7
-CREATE TABLE IF NOT EXISTS `virtual_domains` (
8
-	`id` int(11) NOT NULL auto_increment,
9
-	`name` varchar(50) NOT NULL,
10
-	PRIMARY KEY (`id`)
11
-) ENGINE=InnoDB DEFAULT CHARSET=utf8;
7
+CREATE TABLE IF NOT EXISTS "virtual_domains" (
8
+        "id" SERIAL,
9
+        "name" varchar(50) NOT NULL,
10
+        PRIMARY KEY ("id")
11
+);
12 12
 
13 13
 CREATE UNIQUE INDEX name_idx ON virtual_domains (name);
14 14
 
15
-CREATE TABLE IF NOT EXISTS `virtual_users` (
16
-	`id` int(11) NOT NULL auto_increment,
17
-	`domain_id` int(11) NOT NULL,
18
-	`password` varchar(106) NOT NULL,
19
-	`email` varchar(100) NOT NULL,
20
-	PRIMARY KEY (`id`),
21
-	UNIQUE KEY `email` (`email`),
22
-	FOREIGN KEY (domain_id) REFERENCES virtual_domains(id) ON DELETE CASCADE
23
-) ENGINE=InnoDB DEFAULT CHARSET=utf8;
15
+CREATE TABLE IF NOT EXISTS "virtual_users" (
16
+        "id" SERIAL,
17
+        "domain_id" int NOT NULL,
18
+        "password" varchar(106) NOT NULL,
19
+        "email" varchar(100) NOT NULL UNIQUE,
20
+        PRIMARY KEY ("id"),
21
+        FOREIGN KEY (domain_id) REFERENCES virtual_domains(id) ON DELETE CASCADE
22
+);
23
+
24 24
 
25 25
 CREATE UNIQUE INDEX email_idx ON virtual_users (email);
26 26
 
27
-CREATE TABLE IF NOT EXISTS `virtual_aliases` (
28
-	`id` int(11) NOT NULL auto_increment,
29
-	`domain_id` int(11) NOT NULL,
30
-	`source` varchar(100) NOT NULL,
31
-	`destination` varchar(100) NOT NULL,
32
-	PRIMARY KEY (`id`),
33
-	FOREIGN KEY (domain_id) REFERENCES virtual_domains(id) ON DELETE CASCADE
34
-) ENGINE=InnoDB DEFAULT CHARSET=utf8;
27
+CREATE TABLE IF NOT EXISTS "virtual_aliases" (
28
+        "id" SERIAL,
29
+        "domain_id" int NOT NULL,
30
+        "source" varchar(100) NOT NULL,
31
+        "destination" varchar(100) NOT NULL,
32
+        PRIMARY KEY ("id"),
33
+        FOREIGN KEY (domain_id) REFERENCES virtual_domains(id) ON DELETE CASCADE
34
+);
35 35
 
36 36
 CREATE INDEX source_idx ON virtual_aliases (source);
37 37
 
38 38
 {% for virtual_domain in mail_virtual_domains %}
39
-INSERT INTO {{ mail_mysql_database }}.`virtual_domains` (`id`, `name`)
39
+INSERT INTO "virtual_domains" ("id", "name")
40 40
         VALUES ('{{ virtual_domain.pk_id }}', '{{ virtual_domain.name }}');
41 41
 {% endfor %}
42 42
 
43 43
 {% for virtual_user in mail_virtual_users %}
44
-INSERT INTO {{ mail_mysql_database }}.`virtual_users`  (`domain_id`, `password` , `email`)
44
+INSERT INTO "virtual_users"  ("domain_id", "password" , "email")
45 45
 	VALUES (
46 46
 		'{{ virtual_user.domain_pk_id }}',
47 47
 		'{{ virtual_user.password_hash }}',
@@ -51,7 +51,7 @@ INSERT INTO {{ mail_mysql_database }}.`virtual_users`  (`domain_id`, `password`
51 51
 
52 52
 {% if mail_virtual_aliases is defined %}
53 53
 {% for virtual_alias in mail_virtual_aliases %}
54
-INSERT INTO {{ mail_mysql_database }}.`virtual_aliases` (`domain_id`, `source`, `destination`)
54
+INSERT INTO "virtual_aliases" ("domain_id", "source", "destination")
55 55
     VALUES ('{{ virtual_alias.domain_pk_id }}', '{{ virtual_alias.source }}', '{{virtual_alias.destination }}');
56 56
 {% endfor %}
57 57
 {% endif %}

+ 0
- 6
roles/monitoring/files/etc_monit_conf.d_mysql View File

@@ -1,6 +0,0 @@
1
-check process mysqld with pidfile /var/run/mysqld/mysqld.pid
2
-  group database
3
-  start program = "/etc/init.d/mysql start"
4
-  stop program = "/etc/init.d/mysql stop"
5
-  if failed host localhost port 3306 protocol mysql then restart
6
-  if 5 restarts within 5 cycles then timeout

+ 6
- 0
roles/monitoring/files/etc_monit_conf.d_pgsql View File

@@ -0,0 +1,6 @@
1
+check process postgres with pidfile /opt/postgresql/9.2/main/postmaster.pid
2
+  group database
3
+  start program = "/etc/init.d/postgresql start"
4
+  stop program = "/etc/init.d/postgresql stop"
5
+  if failed host localhost port 5432 protocol pgsql then restart
6
+  if 5 restarts within 5 cycles then timeout

+ 1
- 1
roles/monitoring/tasks/monit.yml View File

@@ -8,8 +8,8 @@
8 8
   copy: src=etc_monit_conf.d_{{ item }} dest=/etc/monit/conf.d/{{ item }}
9 9
   with_items:
10 10
     - apache2
11
+    - pgsql
11 12
     - dovecot
12
-    - mysql
13 13
     - postfix
14 14
     - sshd
15 15
     - tomcat

+ 2
- 2
roles/news/tasks/selfoss.yml View File

@@ -6,10 +6,10 @@
6 6
   action: file owner=www-data group=www-data path=/var/www/selfoss recurse=yes state=directory
7 7
 
8 8
 - name: Create database user for selfoss
9
-  mysql_user: user={{ selfoss_mysql_username }} password={{ selfoss_mysql_password }} state=present priv="selfoss.*:ALL"
9
+  postgresql_user: login_host=localhost login_user={{ db_admin_username }} login_password={{ db_admin_password }} name={{ selfoss_db_username }} password={{ selfoss_db_password }} state=present
10 10
 
11 11
 - name: Create database for selfoss
12
-  mysql_db: name={{ selfoss_mysql_database }} state=present
12
+  postgresql_db: login_host=localhost login_user={{ db_admin_username }} login_password={{ db_admin_password }} name={{ selfoss_db_database }} state=present owner={{ selfoss_db_username }}
13 13
 
14 14
 - name: Install selfoss config.ini
15 15
   template: src=var_www_selfoss_config.ini.j2 dest=/var/www/selfoss/config.ini group=www-data owner=www-data

+ 5
- 5
roles/news/templates/var_www_selfoss_config.ini.j2 View File

@@ -1,9 +1,9 @@
1 1
 ; see https://github.com/SSilence/selfoss/wiki/Configuration for more information about the configuration parameters
2 2
 [globals]
3
-db_type=mysql
4
-db_database={{selfoss_mysql_database}}
5
-db_username={{selfoss_mysql_username}}
6
-db_password={{selfoss_mysql_password}}
3
+db_type=pgsql
4
+db_database={{selfoss_db_database}}
5
+db_username={{selfoss_db_username}}
6
+db_password={{selfoss_db_password}}
7 7
 db_port=3306
8 8
 db_prefix=
9 9
 logger_level=DEBUG
@@ -25,4 +25,4 @@ use_system_font=1
25 25
 readability=
26 26
 share=gtfprde
27 27
 allow_public_update_access=0
28
-unread_order=
28
+unread_order=

+ 2
- 2
roles/owncloud/tasks/owncloud.yml View File

@@ -3,10 +3,10 @@
3 3
 # as per http://www.debiantutorials.com/how-to-install-owncloud-on-wheezy/
4 4
 
5 5
 - name: Create database user for ownCloud
6
-  mysql_user: user={{ owncloud_mysql_username }} password={{ owncloud_mysql_password }} state=present priv="owncloud.*:ALL"
6
+  postgresql_user: login_host=localhost login_user={{ db_admin_username }} login_password={{ db_admin_password }} name={{ owncloud_db_username }} password={{ owncloud_db_password }} state=present
7 7
 
8 8
 - name: Create database for ownCloud
9
-  mysql_db: name={{ owncloud_mysql_database }} state=present
9
+  postgresql_db: login_host=localhost login_user={{ db_admin_username }} login_password={{ db_admin_password }} name={{ owncloud_db_database }} state=present owner={{ owncloud_db_username }}
10 10
 
11 11
 - name: Ensure repository key for ownCloud is in place
12 12
   apt_key: url=http://download.opensuse.org/repositories/isv:ownCloud:community/Debian_7.0/Release.key state=present

+ 1
- 1
roles/tarsnap/files/tarsnap.sh View File

@@ -4,7 +4,7 @@
4 4
 # Written by Tim Bishop, 2009.
5 5
 
6 6
 # Directories to backup (relative to /)
7
-DIRS="home root decrypted var/www var/lib/mysql"
7
+DIRS="home root decrypted var/www opt/postgresql/9.1/main"
8 8
 
9 9
 # Number of daily backups to keep
10 10
 DAILY=7

+ 4
- 0
roles/webmail/tasks/roundcube.yml View File

@@ -3,6 +3,10 @@
3 3
   with_items:
4 4
     - roundcube
5 5
     - roundcube-plugins
6
+    - roundcube-pgsql
7
+
8
+- name: Configure Roundcube database
9
+  template: src=etc_dbconfig-common_roundcube.conf.j2 dest=/etc/dbconfig-common/roundcube.conf group=root owner=root force=yes
6 10
 
7 11
 - name: Configure the Apache HTTP server for roundcube
8 12
   template: src=etc_apache2_sites-available_roundcube.j2 dest=/etc/apache2/sites-available/roundcube group=www-data owner=www-data force=yes

+ 76
- 0
roles/webmail/templates/etc_dbconfig-common_roundcube.conf.j2 View File

@@ -0,0 +1,76 @@
1
+# automatically generated by the maintainer scripts of roundcube
2
+# any changes you make will be preserved, though your comments
3
+# will be lost!  to change your settings you should edit this
4
+# file and then run "dpkg-reconfigure roundcube"
5
+
6
+# dbc_install: configure database with dbconfig-common?
7
+#              set to anything but "true" to opt out of assistance
8
+dbc_install='true'
9
+
10
+# dbc_upgrade: upgrade database with dbconfig-common?
11
+#              set to anything but "true" to opt out of assistance
12
+dbc_upgrade='true'
13
+
14
+# dbc_remove: deconfigure database with dbconfig-common?
15
+#             set to anything but "true" to opt out of assistance
16
+dbc_remove=''
17
+
18
+# dbc_dbtype: type of underlying database to use
19
+#	this exists primarily to let dbconfig-common know what database
20
+#	type to use when a package supports multiple database types.
21
+#	don't change this value unless you know for certain that this
22
+#	package supports multiple database types
23
+dbc_dbtype='pgsql'
24
+
25
+# dbc_dbuser: database user
26
+#	the name of the user who we will use to connect to the database.
27
+dbc_dbuser='{{ webmail_db_username }}'
28
+
29
+# dbc_dbpass: database user password
30
+#	the password to use with the above username when connecting
31
+#	to a database, if one is required
32
+dbc_dbpass='{{ webmail_db_password }}'
33
+
34
+# dbc_dbserver: database host.
35
+#	leave unset to use localhost (or a more efficient local method
36
+#	if it exists).
37
+dbc_dbserver=''
38
+
39
+# dbc_dbport: remote database port
40
+#	leave unset to use the default.  only applicable if you are
41
+#	using a remote database.
42
+dbc_dbport=''
43
+
44
+# dbc_dbname: name of database
45
+#	this is the name of your application's database.
46
+dbc_dbname='{{ webmail_db_database }}'
47
+
48
+# dbc_dbadmin: name of the administrative user
49
+#	this is the administrative user that is used to create all of the above
50
+dbc_dbadmin='{{ db_admin_username }}'
51
+
52
+# dbc_basepath: base directory to hold database files
53
+#	leave unset to use the default.  only applicable if you are
54
+#	using a local (filesystem based) database.
55
+dbc_basepath=''
56
+
57
+##
58
+## postgresql specific settings.  if you don't use postgresql,
59
+## you can safely ignore all of these
60
+##
61
+
62
+# dbc_ssl: should we require ssl?
63
+#	set to "true" to require that connections use ssl
64
+dbc_ssl=''
65
+
66
+# dbc_authmethod_admin: authentication method for admin
67
+# dbc_authmethod_user: authentication method for dbuser
68
+#	see the section titled "AUTHENTICATION METHODS" in
69
+#	/usr/share/doc/dbconfig-common/README.pgsql for more info
70
+dbc_authmethod_admin=''
71
+dbc_authmethod_user=''
72
+
73
+##
74
+## end postgresql specific settings
75
+##
76
+

+ 16
- 9
vars/defaults.yml View File

@@ -12,6 +12,10 @@ admin_email: "{{ main_user_name }}@{{ domain }}"
12 12
 friendly_networks:
13 13
   - ""
14 14
 
15
+# database
16
+db_admin_username: 'postgres'
17
+# db_admin_password: (required)
18
+
15 19
 # ircbouncer
16 20
 znc_version: 1.0
17 21
 # irc_nick: (required)
@@ -22,9 +26,9 @@ znc_version: 1.0
22 26
 
23 27
 # mailserver
24 28
 mail_server_hostname: "mail.{{ domain }}"
25
-mail_mysql_username: mailuser
26
-# mail_mysql_password: (required)
27
-mail_mysql_database: mailserver
29
+mail_db_username: mailuser
30
+# mail_db_password: (required)
31
+mail_db_database: mailserver
28 32
 # mail_virtual_domains: (required)
29 33
 # mail_virtual_users: (required)
30 34
 # mail_virtual_aliases: (required)
@@ -34,9 +38,9 @@ zpush_version: 2.1.1-1788
34 38
 
35 39
 # owncloud
36 40
 owncloud_domain: "cloud.{{ domain }}"
37
-owncloud_mysql_username: owncloud
38
-# owncloud_mysql_password: (required)
39
-owncloud_mysql_database: owncloud
41
+owncloud_db_username: owncloud
42
+# owncloud_db_password: (required)
43
+owncloud_db_database: owncloud
40 44
 
41 45
 # tarsnap
42 46
 tarsnap_version: 1.0.35
@@ -61,6 +65,9 @@ openvpn_server: "{{ domain }}"
61 65
 
62 66
 # webmail
63 67
 webmail_domain: "mail.{{ domain }}"
68
+webmail_db_username: "roundcube"
69
+# webmail_db_password: (required)
70
+webmail_db_database: "roundcube"
64 71
 
65 72
 # xmpp
66 73
 prosody_admin: "{{ admin_email }}"
@@ -69,6 +76,6 @@ prosody_virtual_domain: "{{ domain }}"
69 76
 
70 77
 # news
71 78
 selfoss_domain: "news.{{ domain }}"
72
-selfoss_mysql_username: selfoss
73
-# selfoss_mysql_password: (required)
74
-selfoss_mysql_database: selfoss
79
+selfoss_db_username: selfoss
80
+# selfoss_db_password: (required)
81
+selfoss_db_database: selfoss

+ 10
- 4
vars/testing.yml View File

@@ -11,6 +11,9 @@ encfs_password: testPassword
11 11
 friendly_networks:
12 12
   - "172.16.100.0/24"
13 13
 
14
+db_admin_username: postgres
15
+db_admin_password: postgres
16
+
14 17
 # ircbouncer
15 18
 irc_nick: sovereign
16 19
 irc_ident: sovereign
@@ -19,7 +22,7 @@ irc_quitmsg: Bye
19 22
 irc_password_hash: "sha256#4bfc209c5e19874337fd89c80675ad194836efea5efd4189b7f73cd9e0a6094f#,i*Msa0B;w9yR23nm1ZB#" #foo
20 23
 
21 24
 # mailserver
22
-mail_mysql_password: testPassword
25
+mail_db_password: testPassword
23 26
 mail_virtual_domains:
24 27
   - name: "{{ domain }}"
25 28
     pk_id: 1
@@ -43,7 +46,7 @@ mail_virtual_aliases:
43 46
 zpush_timezone: "America/New_York"  #Example: "America/New_York"
44 47
 
45 48
 # owncloud
46
-owncloud_mysql_password: testPassword
49
+owncloud_db_password: testPassword
47 50
 
48 51
 # vpn
49 52
 openvpn_key_country:  "US"
@@ -56,14 +59,17 @@ openvpn_clients:
56 59
   - phone
57 60
   - tablet
58 61
 
62
+# webmail
63
+webmail_db_password: testPassword
64
+
59 65
 # xmpp
60 66
 prosody_accounts:
61 67
   - name: "{{ main_user_name }}"
62 68
     password: foo
63 69
 
64 70
 # selfoss
65
-selfoss_mysql_password: testPassword
71
+selfoss_db_password: testPassword
66 72
 selfoss_username: "{{ main_user_name }}"
67 73
 # this is the sha512 hash of the desired password
68 74
 selfoss_password_hash: "f7fbba6e0636f890e56fbbf3283e524c6fa3204ae298382d624741d0dc6638326e282c41be5e4254d8820772c5518a2c5a8c0c7f7eda19594a7eb539453e1ed7"
69
-# foo
75
+# foo

+ 11
- 4
vars/user.yml View File

@@ -9,6 +9,10 @@ domain: TODO.com
9 9
 main_user_name: TODO
10 10
 encfs_password: TODO
11 11
 
12
+# database
13
+db_admin_username: postgres
14
+db_admin_password: TODO
15
+
12 16
 # ircbouncer
13 17
 irc_nick: TODO
14 18
 irc_ident: TODO
@@ -17,7 +21,7 @@ irc_quitmsg: TODO
17 21
 irc_password_hash: TODO
18 22
 
19 23
 # mailserver
20
-mail_mysql_password: TODO
24
+mail_db_password: TODO
21 25
 mail_virtual_domains:
22 26
   - name: "{{ domain }}"
23 27
     pk_id: 1
@@ -47,7 +51,7 @@ mail_virtual_aliases:
47 51
 zpush_timezone: "TODO"  #Example: "America/New_York"
48 52
 
49 53
 # owncloud
50
-owncloud_mysql_password: TODO
54
+owncloud_db_password: TODO
51 55
 
52 56
 # vpn
53 57
 openvpn_key_country:  "US"
@@ -60,6 +64,9 @@ openvpn_clients:
60 64
   - phone
61 65
   - tablet
62 66
 
67
+# webmail
68
+webmail_db_password: TODO
69
+
63 70
 # xmpp
64 71
 prosody_admin: "{{ admin_email }}"
65 72
 prosody_virtual_domain: "{{ domain }}"
@@ -68,7 +75,7 @@ prosody_accounts:
68 75
     password: TODO
69 76
 
70 77
 # selfoss
71
-selfoss_mysql_password: "TODO"
78
+selfoss_db_password: "TODO"
72 79
 selfoss_username: "{{ main_user_name }}"
73 80
 # this is the sha512 hash of the desired password
74
-selfoss_password_hash: "TODO"
81
+selfoss_password_hash: "TODO"

Loading…
Cancel
Save