Selaa lähdekoodia

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 11 vuotta sitten
vanhempi
commit
da1b1ad685

+ 2
- 2
roles/mailserver/handlers/main.yml Näytä tiedosto

10
 - name: restart solr
10
 - name: restart solr
11
   service: name=tomcat6 state=restarted
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
   notify: restart postfix
15
   notify: restart postfix
16
 
16
 

+ 2
- 2
roles/mailserver/tasks/dovecot.yml Näytä tiedosto

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

+ 15
- 11
roles/mailserver/tasks/postfix.yml Näytä tiedosto

2
   apt: pkg={{ item }} state=installed
2
   apt: pkg={{ item }} state=installed
3
   with_items:
3
   with_items:
4
     - postfix
4
     - postfix
5
-    - mysql-server
6
-    - postfix-mysql
7
-    - python-mysqldb
8
     - libsasl2-modules
5
     - libsasl2-modules
9
     - sasl2-bin
6
     - sasl2-bin
10
     - postgrey
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
 - name: Create database user for mail server
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
 - name: Create database for mail server
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
 - name: Copy import.sql
24
 - name: Copy import.sql
21
   template: src=mailserver.sql.j2 dest=/etc/postfix/import.sql owner=root group=root mode=0600
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
 - name: Copy main.cf
28
 - name: Copy main.cf
25
   template: src=etc_postfix_main.cf.j2 dest=/etc/postfix/main.cf owner=root group=root
29
   template: src=etc_postfix_main.cf.j2 dest=/etc/postfix/main.cf owner=root group=root
32
 - name: Copy additional postfix configuration files
36
 - name: Copy additional postfix configuration files
33
   template: src=etc_postfix_{{ item }}.j2 dest=/etc/postfix/{{ item }} owner=root group=root
37
   template: src=etc_postfix_{{ item }}.j2 dest=/etc/postfix/{{ item }} owner=root group=root
34
   with_items:
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
   notify: restart postfix
42
   notify: restart postfix

+ 2
- 2
roles/mailserver/templates/etc_dovecot_dovecot-sql.conf.ext.j2 Näytä tiedosto

26
 # );
26
 # );
27
 
27
 
28
 # Database driver: mysql, pgsql, sqlite
28
 # Database driver: mysql, pgsql, sqlite
29
-driver = mysql
29
+driver = pgsql
30
 
30
 
31
 # Database connection string. This is driver-specific setting.
31
 # Database connection string. This is driver-specific setting.
32
 #
32
 #
63
 #   connect = host=sql.example.com dbname=virtual user=virtual password=blarg
63
 #   connect = host=sql.example.com dbname=virtual user=virtual password=blarg
64
 #   connect = /etc/dovecot/authdb.sqlite
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
 # Default password scheme.
68
 # Default password scheme.
69
 #
69
 #

+ 4
- 4
roles/mailserver/templates/etc_postfix_main.cf.j2 Näytä tiedosto

79
 recipient_delimiter = +
79
 recipient_delimiter = +
80
 inet_interfaces = all
80
 inet_interfaces = all
81
 
81
 
82
-# dovecot mysql
82
+# dovecot db
83
 virtual_transport = dovecot
83
 virtual_transport = dovecot
84
 dovecot_destination_recipient_limit = 1
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
 local_recipient_maps = $virtual_mailbox_maps
88
 local_recipient_maps = $virtual_mailbox_maps
89
 
89
 
90
 # OpenDKIM
90
 # OpenDKIM

+ 4
- 4
roles/mailserver/templates/etc_postfix_mysql-virtual-alias-maps.cf.j2 Näytä tiedosto

1
-user = {{ mail_mysql_username }}
2
-password = {{ mail_mysql_password }}
1
+user = {{ mail_db_username }}
2
+password = {{ mail_db_password }}
3
 hosts = 127.0.0.1
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 Näytä tiedosto

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

+ 3
- 3
roles/mailserver/templates/etc_postfix_mysql-virtual-mailbox-maps.cf.j2 Näytä tiedosto

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

+ 5
- 0
roles/mailserver/templates/etc_postfix_pgsql-virtual-alias-maps.cf.j2 Näytä tiedosto

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 Näytä tiedosto

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 Näytä tiedosto

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 Näytä tiedosto

1
 -- If tables are not dropped, have to truncate before insert or use "insert or replace" (not postgres compatible)
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
 CREATE UNIQUE INDEX name_idx ON virtual_domains (name);
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
 CREATE UNIQUE INDEX email_idx ON virtual_users (email);
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
 CREATE INDEX source_idx ON virtual_aliases (source);
36
 CREATE INDEX source_idx ON virtual_aliases (source);
37
 
37
 
38
 {% for virtual_domain in mail_virtual_domains %}
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
         VALUES ('{{ virtual_domain.pk_id }}', '{{ virtual_domain.name }}');
40
         VALUES ('{{ virtual_domain.pk_id }}', '{{ virtual_domain.name }}');
41
 {% endfor %}
41
 {% endfor %}
42
 
42
 
43
 {% for virtual_user in mail_virtual_users %}
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
 	VALUES (
45
 	VALUES (
46
 		'{{ virtual_user.domain_pk_id }}',
46
 		'{{ virtual_user.domain_pk_id }}',
47
 		'{{ virtual_user.password_hash }}',
47
 		'{{ virtual_user.password_hash }}',
51
 
51
 
52
 {% if mail_virtual_aliases is defined %}
52
 {% if mail_virtual_aliases is defined %}
53
 {% for virtual_alias in mail_virtual_aliases %}
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
     VALUES ('{{ virtual_alias.domain_pk_id }}', '{{ virtual_alias.source }}', '{{virtual_alias.destination }}');
55
     VALUES ('{{ virtual_alias.domain_pk_id }}', '{{ virtual_alias.source }}', '{{virtual_alias.destination }}');
56
 {% endfor %}
56
 {% endfor %}
57
 {% endif %}
57
 {% endif %}

+ 0
- 6
roles/monitoring/files/etc_monit_conf.d_mysql Näytä tiedosto

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 Näytä tiedosto

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 Näytä tiedosto

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

+ 2
- 2
roles/news/tasks/selfoss.yml Näytä tiedosto

6
   action: file owner=www-data group=www-data path=/var/www/selfoss recurse=yes state=directory
6
   action: file owner=www-data group=www-data path=/var/www/selfoss recurse=yes state=directory
7
 
7
 
8
 - name: Create database user for selfoss
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
 - name: Create database for selfoss
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
 - name: Install selfoss config.ini
14
 - name: Install selfoss config.ini
15
   template: src=var_www_selfoss_config.ini.j2 dest=/var/www/selfoss/config.ini group=www-data owner=www-data
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 Näytä tiedosto

1
 ; see https://github.com/SSilence/selfoss/wiki/Configuration for more information about the configuration parameters
1
 ; see https://github.com/SSilence/selfoss/wiki/Configuration for more information about the configuration parameters
2
 [globals]
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
 db_port=3306
7
 db_port=3306
8
 db_prefix=
8
 db_prefix=
9
 logger_level=DEBUG
9
 logger_level=DEBUG
25
 readability=
25
 readability=
26
 share=gtfprde
26
 share=gtfprde
27
 allow_public_update_access=0
27
 allow_public_update_access=0
28
-unread_order=
28
+unread_order=

+ 2
- 2
roles/owncloud/tasks/owncloud.yml Näytä tiedosto

3
 # as per http://www.debiantutorials.com/how-to-install-owncloud-on-wheezy/
3
 # as per http://www.debiantutorials.com/how-to-install-owncloud-on-wheezy/
4
 
4
 
5
 - name: Create database user for ownCloud
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
 - name: Create database for ownCloud
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
 - name: Ensure repository key for ownCloud is in place
11
 - name: Ensure repository key for ownCloud is in place
12
   apt_key: url=http://download.opensuse.org/repositories/isv:ownCloud:community/Debian_7.0/Release.key state=present
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 Näytä tiedosto

4
 # Written by Tim Bishop, 2009.
4
 # Written by Tim Bishop, 2009.
5
 
5
 
6
 # Directories to backup (relative to /)
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
 # Number of daily backups to keep
9
 # Number of daily backups to keep
10
 DAILY=7
10
 DAILY=7

+ 4
- 0
roles/webmail/tasks/roundcube.yml Näytä tiedosto

3
   with_items:
3
   with_items:
4
     - roundcube
4
     - roundcube
5
     - roundcube-plugins
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
 - name: Configure the Apache HTTP server for roundcube
11
 - name: Configure the Apache HTTP server for roundcube
8
   template: src=etc_apache2_sites-available_roundcube.j2 dest=/etc/apache2/sites-available/roundcube group=www-data owner=www-data force=yes
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 Näytä tiedosto

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 Näytä tiedosto

12
 friendly_networks:
12
 friendly_networks:
13
   - ""
13
   - ""
14
 
14
 
15
+# database
16
+db_admin_username: 'postgres'
17
+# db_admin_password: (required)
18
+
15
 # ircbouncer
19
 # ircbouncer
16
 znc_version: 1.0
20
 znc_version: 1.0
17
 # irc_nick: (required)
21
 # irc_nick: (required)
22
 
26
 
23
 # mailserver
27
 # mailserver
24
 mail_server_hostname: "mail.{{ domain }}"
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
 # mail_virtual_domains: (required)
32
 # mail_virtual_domains: (required)
29
 # mail_virtual_users: (required)
33
 # mail_virtual_users: (required)
30
 # mail_virtual_aliases: (required)
34
 # mail_virtual_aliases: (required)
34
 
38
 
35
 # owncloud
39
 # owncloud
36
 owncloud_domain: "cloud.{{ domain }}"
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
 # tarsnap
45
 # tarsnap
42
 tarsnap_version: 1.0.35
46
 tarsnap_version: 1.0.35
61
 
65
 
62
 # webmail
66
 # webmail
63
 webmail_domain: "mail.{{ domain }}"
67
 webmail_domain: "mail.{{ domain }}"
68
+webmail_db_username: "roundcube"
69
+# webmail_db_password: (required)
70
+webmail_db_database: "roundcube"
64
 
71
 
65
 # xmpp
72
 # xmpp
66
 prosody_admin: "{{ admin_email }}"
73
 prosody_admin: "{{ admin_email }}"
69
 
76
 
70
 # news
77
 # news
71
 selfoss_domain: "news.{{ domain }}"
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 Näytä tiedosto

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

+ 11
- 4
vars/user.yml Näytä tiedosto

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

Loading…
Peruuta
Tallenna