Compare commits

...

2 commits

Author SHA1 Message Date
1a41a66355
Allow calendar servers to talk to db 2025-04-04 12:31:19 +02:00
da7be10d58
Fix typos 2025-03-26 14:09:24 +01:00
2 changed files with 6 additions and 9 deletions

View file

@ -15,7 +15,7 @@ define sunetdrive::db_type(
$backup_password = safe_hiera('backup_password') $backup_password = safe_hiera('backup_password')
$proxysql_password = safe_hiera('proxysql_password') $proxysql_password = safe_hiera('proxysql_password')
$mysql_user_password = safe_hiera('mysql_user_password') $mysql_user_password = safe_hiera('mysql_user_password')
$roundcube_password = safe_hiera('rundcube_password') $roundcube_password = safe_hiera('roundcube_password')
$mariadb_dir = '/etc/mariadb' $mariadb_dir = '/etc/mariadb'
$mycnf_path = 'sunetdrive/mariadb/my.cnf.erb' $mycnf_path = 'sunetdrive/mariadb/my.cnf.erb'
$server_id = 1000 + Integer($facts['networking']['hostname'][-1]) $server_id = 1000 + Integer($facts['networking']['hostname'][-1])
@ -34,8 +34,10 @@ define sunetdrive::db_type(
$ports = [3306, 4444, 4567, 4568] $ports = [3306, 4444, 4567, 4568]
if $location =~ /^multinode/ { if $location =~ /^multinode/ {
$from = $db_ip + $nextcloud_ip + $backup_ip + $backup_ipv6 + $db_ipv6 + $config['kube'] + $config['kube_v6'] $from = $db_ip + $nextcloud_ip + $backup_ip + $backup_ipv6 + $db_ipv6 + $config['kube'] + $config['kube_v6']
} elsif $location == 'sunet-test' or $location == 'sunet-prod' { } elsif $location == 'sunet-prod' {
$from = $db_ip + $nextcloud_ip + $backup_ip + $backup_ipv6 + $db_ipv6 + $config['imap'] + $config['imap_v6'] + $config['smtp'] + $config['smtp_v6'] + $config['webmail'] + $config['webmail_v6'] $from = $db_ip + $nextcloud_ip + $backup_ip + $backup_ipv6 + $db_ipv6 + $config['imap'] + $config['imap_v6'] + $config['smtp'] + $config['smtp_v6'] + $config['webmail'] + $config['webmail_v6']
} elsif $location == 'sunet-test' {
$from = $db_ip + $nextcloud_ip + $backup_ip + $backup_ipv6 + $db_ipv6 + $config['imap'] + $config['imap_v6'] + $config['smtp'] + $config['smtp_v6'] + $config['webmail'] + $config['webmail_v6'] + $config['calendar'] + $config['calendar_v6']
} else { } else {
$from = $db_ip + $nextcloud_ip + $backup_ip + $backup_ipv6 + $db_ipv6 $from = $db_ip + $nextcloud_ip + $backup_ip + $backup_ipv6 + $db_ipv6
} }

View file

@ -1,8 +1,3 @@
CREATE SCHEMA roundcube; CREATE SCHEMA roundcubemail;
CREATE USER 'roundcube'@'%' IDENTIFIED BY '<%= @roundcube_password %>'; CREATE USER 'roundcube'@'%' IDENTIFIED BY '<%= @roundcube_password %>';
GRANT ALL PRIVILEGES ON roundcube.* TO 'roundcube'@'%' IDENTIFIED BY '<%= @roundcube_password %>'; GRANT ALL PRIVILEGES ON roundcubemail.* TO 'roundcube'@'%' IDENTIFIED BY '<%= @roundcube_password %>';
-- USE roundcube;
-- CREATE TABLE `cache` ( `user_id` int(10) unsigned NOT NULL, `cache_key` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL, `expires` datetime DEFAULT NULL, `data` longtext NOT NULL, PRIMARY KEY
-- (`user_id`,`cache_key`), KEY `expires_index` (`expires`), CONSTRAINT `user_id_fk_cache` FOREIGN KEY (`user_id`) REFERENCES `users` (`user_id`) ON DELETE CASCADE ON UPDATE CASCADE) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=DYNAMIC
-- CREATE TABLE `users` ( `user_id` int(10) unsigned NOT NULL AUTO_INCREMENT, `username` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL, `mail_host` varchar(128) NOT NULL, `created` datetime NOT
-- NULL DEFAULT '1000-01-01 00:00:00', `last_login` datetime DEFAULT NULL, `failed_login` datetime DEFAULT NULL, `failed_login_counter` int(10) unsigned DEFAULT NULL, `language` varchar(16) DEFAULT NULL, `preferences` longtext DEFAULT NULL, PRIMARY KEY (`user_id`), UNIQUE KEY `username` (`username`,`mail_host`)) ENGINE=InnoDB AUTO_INCREMENT=13 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=DYNAMIC;