MariaDB with puppet

Hey @juliettet @rahul456

I have assigned a task to setup mariadb using puppet.

I am able to install and start the service of mariadb using below puppet file:

class mysql_database {
package { ‘mariadb-server’:
ensure => ‘installed’,
}
service { ‘mariadb’:
ensure => ‘running’,
enable => ‘true’,

}

}

node ‘stdb01.stratos.xfusioncorp.com’ {
include mysql_database
}
node default {}

Now the question says,

  1. Create a database kodekloud_db8 , a database user kodekloud_gem and set password ksH85UJjhb for this new user also remember host should be localhost . Finally grant some usual permissions like select, update (or full) ect to this newly created user on newly created database.

Do I need to do this using Puppet only? Or do I need to do this configuration manually over database server?

Hi @Ashu27,

Yes, this task should also be done using puppet. You can check an example in this documentation here.

Regards,
Vitor Jr.
KodeKloud Support