Search code examples
javatomcatdebianpuppetgoogle-compute-engine

Puppet: unable to locate package tomcat


I started to use puppet recently, and i'm trying to deploy a web server using gce_compute and apache-tomcat. To deploy the web server i install the modules puppetlabs-java and puppetlabs-tomcat, and to create an instance of apache-tomcat i'm using the code provided by puppet :

class { 'java': }
class { 'tomcat': }
class { 'epel': }->
tomcat::instance { 'default':
  install_from_source => false,
  package_name        => 'tomcat',
}->
tomcat::service { 'default':
  use_jsvc     => false,
  use_init     => true,
  service_name => 'tomcat',
}

But when my agent pulls the manifest i'm getting this error:

Execution of '/usr/bin/apt-get -q -y -o DPkg::Options::=--force-confold install tomcat' returned 100: Reading package lists...

puppet-agent[3302]: Building dependency tree...

puppet-agent[3302]: Reading state information...

puppet-agent[3302]: E: Unable to locate package tomcat

Can you help me to figure out why this happens and how i fix this error. Thanks in advance.


Solution

  • That error comes from apt-get. Puppet uses a package manager available on the system it is running on. In the case of Debian, it uses apt.

    If you ran apt-get install tomcat you would get the same error, because there is no package named simply tomcat. Perhaps you mean tomcat6 or tomcat7?