Ask Your Question

How do I should inform `puppetlabs-tomcat` module about `augeasversion`?

asked 2015-11-28 08:02:21 -0600

Yasser Zamani gravatar image

When I try

sudo puppet agent --test

at puppet client, I get

Error: Could not retrieve catalog from remote server: Error 400 on SERVER: Evaluation Error: Error while evaluating a Resource Statement, Evaluation Error: Error while evaluating a Function Call, 'versioncmp' parameter 'a' expects a String value, got Undef at /etc/puppetlabs/code/environments/production/modules/tomcat/manifests/config/server.pp:28:6 at /etc/puppetlabs/code/environments/production/manifests/01_software.pp:40 on node software.yaas

I reviewed tomcat's server.pp line 28, column 6, i.e.

  if versioncmp($::augeasversion, '1.0.0') < 0 {

I know tomcat module's limitation, dependency of Augeas; I've installed augeas-1.0.0-2.1.x86_64.rpm at client but tomcat module at puppet client still does know $::augeasversion variable as Undef!

I also tried

puppet module install camptocamp-augeas


include augeas

in my 01_software.pp but still same message exists.

How do I should inform puppetlabs-tomcat module about augeasversion, please?

============== my resources if you need ==============

Puppet Server version: 4.3.0

Puppet Agent version: 4.2.3

My 01_software.pp some codes:

### AUGEAS: needed for tomcat::config::server
file { "/tmp/augeas-1.0.0-2.1.x86_64.rpm":
    source => "puppet:///extra_files/rpms/augeas-1.0.0-2.1.x86_64.rpm",
package { 'augeas-1.0.0-2.1.x86_64': 
    ensure => 'present',
    provider => rpm,
    source => "/tmp/augeas-1.0.0-2.1.x86_64.rpm",
    require => File["/tmp/augeas-1.0.0-2.1.x86_64.rpm"],

### TOMCAT: tomcat
# First declate class tomcat
class { 'tomcat': }
# Then extract into /usr/share/tomcat_7_0_29 at puppet client.
tomcat::instance { 'tomcat_7_0_29':
  source_url => '',
  catalina_base => '/usr/share/tomcat_7_0_29',
# Do these after JRE installation.
  require => Package['jre-1.7.0_25-fcs'],
# Then configure tomcat server. For example set shutdown port to a port which is not already in use.
tomcat::config::server { 'tomcat_7_0_29':
  catalina_base => '/usr/share/tomcat_7_0_29',
  port          => '8105',
# Do these after Augeas installation.
  require => Package['augeas-1.0.0-2.1.x86_64'],

And finally

rpm -qa augeas

at client says


edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2015-11-30 01:39:01 -0600

Yasser Zamani gravatar image

OK, I studied camptocamp-augeas module manifests (.pp) and from there, I discovered that I should install following packages:

  • augeas
  • augeas-lenses
  • libaugeas0

(for SLES) and also following gem:

  • ruby-augeas.

After those, puppetlabs-tomcat module knows$::augeasversion.

I think these info should be mentioned in puppetlabs-tomcat module docs!

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower


Asked: 2015-11-28 08:02:21 -0600

Seen: 354 times

Last updated: Nov 30 '15