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 in Puppet by Namik
• 1,210 points
31 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 by Sirajul
• 40,980 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 in Puppet by Haider
214 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 in Puppet by Sirajul
• 40,980 points
74 views
+13 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 26, 2018 in DevOps & Agile by DragonLord999
• 8,380 points
248 views
0 votes
1 answer
0 votes
1 answer