Ask Your Question
0

how to use variable on file declaration

asked 2016-04-29 11:47:22 -0500

mazdajai gravatar image

I am trying to use variable with empty name space on file declaration but I am getting the following error. I thought this can be done if I am referring to a top-scope variable. Any thoughts?

https://docs.puppet.com/guides/scopeandpuppet.html

Error:

remote: ********** remote: services/zabbix/manifests/javagateway.pp remote: ERROR: Puppet lint check failed with: remote: WARNING: class not documented on line 26********** ^

$tmp = $::operatingsystemrelease ? {
     /^7/ => $zabbix::params::java_gateway_log_centos_7,
     /^6/ => $zabbix::params::java_gateway_log_centos_6,
 }

manifest

class zabbix::javagateway inherits zabbix::params{
    file { $::tmp:
    ensure  => file,
    mode    => '0644',
    content => template('zabbix/logback.xml.erb'),
    notify  => Service['zabbix-java-gateway'],
    }
}

Common.yaml

zabbix:
  javagateway:
    java_gateway_log_centos_6: '/usr/sbin/zabbix_java/lib/logback.xml'
    java_gateway_log_centos_7: '/usr/share/zabbix-java-gateway/lib/logback.xml'
edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
1

answered 2016-05-02 18:45:40 -0500

WhatsARanjit gravatar image

You seem to be getting a puppet-lint error, not a Puppet error. Try editing your javagateway.pp and adding documentation (on line 26) or turn off the puppet-lint check that looks for documentation.

http://puppet-lint.com/checks/documen...

edit flag offensive delete link more

Comments

You nailed it, thanks!

mazdajai gravatar imagemazdajai ( 2016-05-06 15:43:35 -0500 )edit

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

Stats

Asked: 2016-04-29 10:44:22 -0500

Seen: 72 times

Last updated: May 02 '16