Error Stage main Mysql-server Service mysql-server Could not evaluate Could not find init script or upstart conf file for mysql-server

0 votes

Puppet master(ubuntu VM-1) Puppet agent (ubuntu VM-2). 

I've installed apache with puppet which works fine

ubuntu@puppet:/etc/puppet/manifests$ cat site.pp 
node 'puppetclient.example.com' {
   include apache2
   include mysql-server
}

my init.pp for my mysql-server:

class mysql-server {
  package { 'mysql-server':
    ensure => installed,
  }
  service { 'mysql-server':
    ensure  => true,
    enable  => true,
    require => Package['mysql-server'],
  }
}

When i perform puppet agent -t on my agent.

Info: Retrieving plugin Info: Caching catalog for puppetclient.example.com 
Info: Applying configuration version '1462308091' 
Error: /Stage[main]/Mysql-server/Service[mysql-server]: Could not evaluate: Could not find init script or upstart conf file for 'mysql-server' 
Notice: Finished catalog run in 0.10 seconds

Why am i getting the error? kindly help.

Aug 7, 2019 in Puppet by Namik
• 1,230 points
625 views

1 answer to this question.

0 votes

The error means that puppet was not able to start service called mysql-server

Could not find init script or upstart conf file for 'mysql-server'

The service is not called mysql-server as this is only the name for the package, actual service is called mysql.

Try using::

service { 'mysql': 
ensure => true, 
enable => true, 
require => Package['mysql-server'], 
}

This should do!

answered Aug 7, 2019 by Sirajul
• 59,230 points

Related Questions In Puppet

0 votes
1 answer

Error: Could not find init script for 'puppet' - Puppet error

You need to be running your processes ...READ MORE

answered Mar 12, 2019 in Puppet by Haider
2,609 views
0 votes
1 answer

Error: Could not find class git::config for xxxx on node xxxx

You should note that you cannot call include on git::config. git::config is a ...READ MORE

answered Jul 31, 2019 in Puppet by Sirajul
• 59,230 points
1,061 views
+15 votes
2 answers

Git management technique when there are multiple customers and need multiple customization?

Consider this - In 'extended' Git-Flow, (Git-Multi-Flow, ...READ MORE

answered Mar 27, 2018 in DevOps & Agile by DragonLord999
• 8,450 points
4,024 views
+2 votes
1 answer
0 votes
1 answer
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP