It's suspicious to me that you have resources managing parts of 
/etc/zabbix/zabbix_agentd.conf, but nothing in your manifest to specify 
that they should be applied before Service['zabbix-agent'] is managed, or 
to make the service take notice if those are applied when it is already 
running.  Moreover, you have nothing to specify that that file should be 
managed *after* Package['zabbix-agent'], which I presume will provide the 
base version of that file.

Regardless of your actual problem, I would think that any way around, your 
two File_line resources both need to declare relationships with those other 
resources:

  require => Package['zabbix-agent'],
  notify  => Service['zabbix-agent']

Perhaps that will even constitute a complete solution.

As a completely separate issue, your great big case statement is confusing 
and wasteful.  The only difference between the three cases is the 
release-number component of the repository path, which you have in the form 
of a variable that you know about already.  Your manifest could be 
substantially DRYed out by replacing the whole case statement to simply 
this:

  yumrepo { 'zabbix3.4_repo':
    enabled  => 1,
    descr    => 'Zabbix 3.4 Repo Created by Sysad',
    baseurl  => "http://repo.zabbix.com/zabbix/3.4/rhel/${ 
<http://repo.zabbix.com/zabbix/3.4/rhel/5/$basearch/>
operatingsystemmajrelease}/\$basearch/ 
<http://repo.zabbix.com/zabbix/3.4/rhel/5/$basearch/>",
    gpgcheck => 1,
    gpgkey   => 'http://repo.zabbix.com/RPM-GPG-KEY-ZABBIX',
  }

Note use of a double-quoted string to permit the $operatingsystemmajrelease 
variable to be interpolated, and the escaping of the '$' to prevent 
"$basearch" from being interpreted as a Puppet variable reference.


John

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/5c4398f4-8137-4bfc-b6de-986ec02cfbe2%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to