From f9cf5e4aedc6967a9618828d1b0fb1f989e43532 Mon Sep 17 00:00:00 2001
From: saganorenkarlson <sagno626@student.liu.se>
Date: Fri, 7 Jun 2024 17:20:00 +0200
Subject: [PATCH] Uncommenting mysql

---
 manifests/init.pp | 64 +++++++++++++++++++++++------------------------
 1 file changed, 32 insertions(+), 32 deletions(-)

diff --git a/manifests/init.pp b/manifests/init.pp
index 6e6585a..02301a9 100644
--- a/manifests/init.pp
+++ b/manifests/init.pp
@@ -187,38 +187,38 @@ class aim_control (
   #   command     => 'php /var/www/skadereg/artisan schedule:run &> /dev/null',
   # }
 
-  # $db_name = 'homestead'
-
-  # class { 'mysql::server':
-  #   root_password    => $mysql_password,
-  #   databases        => {
-  #     $db_name => {
-  #       ensure  => present,
-  #       charset => 'utf8',
-  #     },
-  #   },
-  #   users            => {
-  #     "${skadereg_ro_user}@%" => {
-  #       ensure        => present,
-  #       password_hash => mysql_password($skadereg_ro_password),
-  #     },
-  #   },
-  #   grants           => {
-  #     'root@%/*.*' => {
-  #       ensure     => present,
-  #       options    => ['GRANT'],
-  #       privileges => ['ALL'],
-  #       table      => '*.*',
-  #       user       => 'root@%',
-  #     },
-  #   },
-  #   override_options => {
-  #     mysqld => {
-  #       'bind-address' => '0.0.0.0',
-  #       port           => 33060,
-  #     },
-  #   },
-  # }
+  $db_name = 'homestead'
+
+  class { 'mysql::server':
+    root_password    => $mysql_password,
+    databases        => {
+      $db_name => {
+        ensure  => present,
+        charset => 'utf8',
+      },
+    },
+    users            => {
+      "${skadereg_ro_user}@%" => {
+        ensure        => present,
+        password_hash => mysql_password($skadereg_ro_password),
+      },
+    },
+    grants           => {
+      'root@%/*.*' => {
+        ensure     => present,
+        options    => ['GRANT'],
+        privileges => ['ALL'],
+        table      => '*.*',
+        user       => 'root@%',
+      },
+    },
+    override_options => {
+      mysqld => {
+        'bind-address' => '0.0.0.0',
+        port           => 33060,
+      },
+    },
+  }
 
   # ['entries', 'guardian_confirmations', 'users'].each |String $table| {
   #   mysql_grant { "${skadereg_ro_user}@%/${db_name}.${table}":
-- 
GitLab