class ocsinventory::client { package { [ "ocsinventory-agent" ]: ensure => installed } file { "/etc/ocsinventory/ocsinventory-agent.cfg": owner => "root", group => "root", mode => 644, content => template("ocsinventory/ocsinventory-agent.erb"), require => Package["ocsinventory-agent"] } exec { "agente": command => "ocsinventory-agent", path => "/bin:/sbin:/usr/sbin:/usr/bin", refreshonly => true, subscribe => file["/etc/ocsinventory/ocsinventory-agent.cfg"], require => Package["ocsinventory-agent"] } }