Hi Björn,

depends on how you would like to implement the fully automatic configuration. I 
do this on the server side because backup is nothing that apply out of the box 
after provisioning to the client and server. Under normal circumstances I would 
like to add a client only to the backup if really needed. Therefore I used an 
array in my module to specify the client:

https://github.com/thbe/puppet-bareos

The module is still v0.1.0, so it’s not yet feature complete and not released 
on the forge but works the way I need it. I think I’ll release it on the forge 
sometime in Q1/2016 when missing features are implemented.

Regards Thomas

> Am 21.01.2016 um 15:23 schrieb Björn <[email protected]>:
> 
> Hello,
> 
> I try to make the bareos puppet module ready for puppetdb and fully automatic 
> configuration. 
> 
> When I understand correctly, I'll need a resource type to export it and bring 
> the client configuration on the bareos server finally. 
> 
> $ cat bareos/lib/puppet/type/bareos_client.rb 
> Puppet::Type.newtype(:bareos_client) do
>   desc 'TEST'
>   ensurable 
>   newparam(:name, :isnamevar => true) do
>     desc "The name of the client."
>   end
> end
> 
> $ tail bareos/manifests/client.pp
>     mode    => '0644',
>     owner   => 'bareos',    
>     group   => 'bareos',
>   } 
> 
>   @@bareos_client{ $::hostname:
>   }
> 
>   Bareos_client <<| |>>
> }
> 
> I get this error when I make a puppet run on the client:
> Error: /Stage[main]/Bareos::Client/Bareos_client[PC3256CO]: Could not 
> evaluate: No ability to determine if bareos_client exists
> /usr/lib/ruby/site_ruby/1.8/puppet/property/ensure.rb:85:in `retrieve'
> /usr/lib/ruby/site_ruby/1.8/puppet/type.rb:1048:in `retrieve'
> /usr/lib/ruby/site_ruby/1.8/puppet/type.rb:1076:in `retrieve_resource'
> /usr/lib/ruby/site_ruby/1.8/puppet/transaction/resource_harness.rb:236:in 
> `from_resource'
> /usr/lib/ruby/site_ruby/1.8/puppet/transaction/resource_harness.rb:19:in 
> `evaluate'
> /usr/lib/ruby/site_ruby/1.8/puppet/transaction.rb:204:in `apply'
> /usr/lib/ruby/site_ruby/1.8/puppet/transaction.rb:217:in `eval_resource'
> /usr/lib/ruby/site_ruby/1.8/puppet/transaction.rb:147:in `call'
> /usr/lib/ruby/site_ruby/1.8/puppet/transaction.rb:147:in `evaluate'
> /usr/lib/ruby/site_ruby/1.8/puppet/util.rb:335:in `thinmark'
> /usr/lib/ruby/1.8/benchmark.rb:308:in `realtime'
> /usr/lib/ruby/site_ruby/1.8/puppet/util.rb:334:in `thinmark'
> /usr/lib/ruby/site_ruby/1.8/puppet/transaction.rb:147:in `evaluate'
> /usr/lib/ruby/site_ruby/1.8/puppet/graph/relationship_graph.rb:118:in 
> `traverse'
> /usr/lib/ruby/site_ruby/1.8/puppet/transaction.rb:138:in `evaluate'
> /usr/lib/ruby/site_ruby/1.8/puppet/resource/catalog.rb:169:in `apply'
> /usr/lib/ruby/site_ruby/1.8/puppet/util/log.rb:149:in `with_destination'
> /usr/lib/ruby/site_ruby/1.8/puppet/transaction/report.rb:112:in 
> `as_logging_destination'
> /usr/lib/ruby/site_ruby/1.8/puppet/resource/catalog.rb:168:in `apply'
> /usr/lib/ruby/site_ruby/1.8/puppet/configurer.rb:120:in `apply_catalog'
> /usr/lib/ruby/site_ruby/1.8/puppet/util.rb:161:in `benchmark'
> /usr/lib/ruby/1.8/benchmark.rb:308:in `realtime'
> /usr/lib/ruby/site_ruby/1.8/puppet/util.rb:160:in `benchmark'
> /usr/lib/ruby/site_ruby/1.8/puppet/configurer.rb:119:in `apply_catalog'
> /usr/lib/ruby/site_ruby/1.8/puppet/configurer.rb:227:in `run_internal'
> /usr/lib/ruby/site_ruby/1.8/puppet/configurer.rb:134:in `run'
> /usr/lib/ruby/site_ruby/1.8/puppet/context.rb:64:in `override'
> /usr/lib/ruby/site_ruby/1.8/puppet.rb:246:in `override'
> /usr/lib/ruby/site_ruby/1.8/puppet/configurer.rb:133:in `run'
> /usr/lib/ruby/site_ruby/1.8/puppet/agent.rb:47:in `run'
> /usr/lib/ruby/site_ruby/1.8/puppet/agent/locker.rb:20:in `lock'
> /usr/lib/ruby/site_ruby/1.8/puppet/agent.rb:47:in `run'
> /usr/lib/ruby/site_ruby/1.8/puppet/agent.rb:117:in `with_client'
> /usr/lib/ruby/site_ruby/1.8/puppet/agent.rb:44:in `run'
> /usr/lib/ruby/site_ruby/1.8/puppet/agent.rb:82:in `run_in_fork'
> /usr/lib/ruby/site_ruby/1.8/puppet/agent.rb:43:in `run'
> /usr/lib/ruby/site_ruby/1.8/puppet/application.rb:179:in `call'
> /usr/lib/ruby/site_ruby/1.8/puppet/application.rb:179:in `controlled_run'
> /usr/lib/ruby/site_ruby/1.8/puppet/agent.rb:41:in `run'
> /usr/lib/ruby/site_ruby/1.8/puppet/application/agent.rb:361:in `onetime'
> /usr/lib/ruby/site_ruby/1.8/puppet/application/agent.rb:327:in `run_command'
> /usr/lib/ruby/site_ruby/1.8/puppet/application.rb:381:in `run'
> /usr/lib/ruby/site_ruby/1.8/puppet/application.rb:507:in `plugin_hook'
> /usr/lib/ruby/site_ruby/1.8/puppet/application.rb:381:in `run'
> /usr/lib/ruby/site_ruby/1.8/puppet/util.rb:496:in `exit_on_fail'
> /usr/lib/ruby/site_ruby/1.8/puppet/application.rb:381:in `run'
> /usr/lib/ruby/site_ruby/1.8/puppet/util/command_line.rb:146:in `run'
> /usr/lib/ruby/site_ruby/1.8/puppet/util/command_line.rb:92:in `execute'
> /usr/bin/puppet:8
> 
> Thanks in advance.
> 
> Regards,
> Björn
> 
> -- 
> 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] 
> <mailto:[email protected]>.
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/puppet-users/11c87300-bd37-4e99-8f19-cb3b28212d6e%40googlegroups.com
>  
> <https://groups.google.com/d/msgid/puppet-users/11c87300-bd37-4e99-8f19-cb3b28212d6e%40googlegroups.com?utm_medium=email&utm_source=footer>.
> For more options, visit https://groups.google.com/d/optout 
> <https://groups.google.com/d/optout>.

-- 
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/4BA69BC0-F77A-4A92-BDD5-2A8F6FAC231A%40gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to