Puppet database task failed

I have completed all 3 of my previous puppet task and it has all worked perfectly, the system kept failing my task. Please, someone, look into it for me. No one has responded to all my complaint about this issue for all three tasks. Please I’m losing points that I was supposed to gain

what does your .pp file look like? are you deploying mariadb-server from the package?
do you have node in the same file or seperate?

These are my .pp files


class mysql_database {

package {'MariaDB-server':
    ensure => installed,
service { 'mysql':
    ensure => running,
    enable => true,
mysql::db { 'kodekloud_db5':
 host    => 'localhost',
 user    => 'kodekloud_tim',
 password    => 'ksH85UJjhb',
 grant => ['ALL'],



node “stdb01.stratos.xfusioncorp.com” {

    class {'mariadbrepo':
    version => '10.0',
    include mysql_database

node “default” {


yeah looks good other than the condition says you should do this task using one .pp file, so you better merge them into one file.

3. Make sure to create single puppet programming file ecommerce.pp to do these all tasks.

one more thing, where do you have this class set in your puppet server?
class {‘mariadbrepo’:

I installed it in the master
puppet module install yguenane/mariadbrepo

I got same issue, even though I did all in one file. @KodeKloud any reason why we got this failed?

I am pretty sure it won’t work with above config. And I give you small tip. Look more in details into mysql module in puppet forge.

As you can see in the screenshot above, it worked perfectly. Database was created, user and password was set and privilege was granted. But it still failed the task.

I checked your manifest on my sandbox and actually it failed on dependencies with mysql client.
It is strange it worked for you. Anyway I think you failed due to class mariadbrepo. Another small tip it is not required.

@andrzej if you mean this change
vi /etc/puppetlabs/code/environments/production/modules/mariadbrepo/manifests/init.pp
adding this line:
/7.[0-9]/ => ‘7’,
thats done as well.

Once more u do not need to install any mariadb module. Just look in details to mysql module on puppet forge.

I am a bit confused, that source is only instructing you to install mariadb-server and client on ubuntu.
class {’::mysql::server’:
package_name => ‘mariadb-server’,
package_ensure => ‘1:10.3.21+maria~xenial’,
service_name => ‘mysqld’,

good and is there smth which does not allow you to use it in centos ? :wink: