[Puppet Users] Custom Puppet::Transaction::Report via pluginsync

2013-07-04 Thread Andriy Yurchuk
I'm trying to do something similar to what is described here http://www.devco.net/archives/2011/07/03/real_time_puppet_events_and_network_wide_callbacks.php I only need the Puppet::Transaction::MyCustomReport, I don't need customized Application etc (what I need to achieve is to make Puppet keep

[Puppet Users] Facter and Puppet Agent custom confdir

2013-05-02 Thread Andriy Yurchuk
I set custom confdir for Puppet Agent, start Puppet Agent as non-root user and then use pluginsync to sync my custom Facter facts to this agent (as a result they reside in $custom_confdir/var/lib/facter). With this config Facter fails to pick up my custom facts (facter -p does not show them). Th

[Puppet Users] Re: Access facts values in Puppet provider

2013-04-26 Thread Andriy Yurchuk
Found out this can be done via Facter['my_fact'].value On Friday, April 26, 2013 8:06:54 AM UTC+3, Andriy Yurchuk wrote: > > I'm writing a custom Puppet service provider and I need to access one of > my facts value inside provider to then be able to use the value in

[Puppet Users] Access facts values in Puppet provider

2013-04-25 Thread Andriy Yurchuk
I'm writing a custom Puppet service provider and I need to access one of my facts value inside provider to then be able to use the value inside startcmd/stopcmd. There is a confine which can test whether a fact exists, but how do I actually get the value of the fact? -- You received this messa

[Puppet Users] Puppet report processor to keep reports on Agent

2013-04-15 Thread Andriy Yurchuk
Having a custom Puppet report processor is it possible to not send the reports from each agent to the master but keep them on agents? I mean having the same functionality as described here https://puppetlabs.com/blog/when-puppet-reports-part-2/ but with each report's results are kept on the age

[Puppet Users] Re: Report processor failed: String can't be coerced into Fixnum

2013-04-06 Thread Andriy Yurchuk
For some reason Puppet doesn't like the self.configuration_version On Saturday, April 6, 2013 10:43:24 AM UTC+3, Andriy Yurchuk wrote: > > I'm trying to make the custom report process (described here > https://puppetlabs.com/blog/when-puppet-reports-part-2/) work on my

[Puppet Users] Report processor failed: String can't be coerced into Fixnum

2013-04-06 Thread Andriy Yurchuk
I'm trying to make the custom report process (described here https://puppetlabs.com/blog/when-puppet-reports-part-2/) work on my agent, but keep getting this error in master log: Report processor failed: String can't be coerced into Fixnum I'm out of ideas why could it fail. Will appreciate any h

Re: [Puppet Users] Specifying multple nodes with mcollective-puppet-agent Host Filters

2013-02-19 Thread Andriy Yurchuk
Obviously... Thanks! On Tuesday, February 19, 2013 12:33:49 PM UTC+2, R.I. Pienaar wrote: > > > > - Original Message - > > From: "Andriy Yurchuk" > > > To: puppet...@googlegroups.com > > Sent: Tuesday, February 19, 2013 9:43:43 AM > >

[Puppet Users] Specifying multple nodes with mcollective-puppet-agent Host Filters

2013-02-19 Thread Andriy Yurchuk
If I want to run Puppet agent only on two nodes out of ten, how can I specify this with the Host Filters? I tried mco puppet runall 10 -I node1,node2 and different other variations, but this does not work. Is this at all possible? -- You received this message because you are subscribed to the

Re: [Puppet Users] Re: Daemonize puppet agent but disable periodic runs

2013-02-15 Thread Andriy Yurchuk
> On 02/14/2013 11:21 AM, Andriy Yurchuk wrote: > > This works, but this disables the ability to push configs via > > MCollective, i.e. mco puppet runall/runonce do not work. > > > > On Wednesday, February 13, 2013 5:51:56 PM UTC+2, Vaidas Jablonskis > wrote:

[Puppet Users] Re: Daemonize puppet agent but disable periodic runs

2013-02-15 Thread Andriy Yurchuk
9 PM UTC+2, Andriy Yurchuk wrote: > > This works, but this disables the ability to push configs via MCollective, > i.e. mco puppet runall/runonce do not work. > > On Wednesday, February 13, 2013 5:51:56 PM UTC+2, Vaidas Jablonskis wrote: >> >> You would have to run your agen

[Puppet Users] Re: Referencing resource from another class

2013-02-15 Thread Andriy Yurchuk
Thanks a lot John, the explanation was really helpful. On Thursday, February 14, 2013 4:32:38 PM UTC+2, jcbollinger wrote: > > > > On Thursday, February 14, 2013 5:10:43 AM UTC-6, Andriy Yurchuk wrote: >> >> Found out that it's very simple: subscribe => Class[

[Puppet Users] Re: Referencing resource from another class

2013-02-14 Thread Andriy Yurchuk
Found out that it's very simple: subscribe => Class['module::class_2'] On Thursday, February 14, 2013 12:20:30 PM UTC+2, Andriy Yurchuk wrote: > > class module::class_1 { > service { > ensure => running, > hasrestart => true, > subscribe

[Puppet Users] Re: Daemonize puppet agent but disable periodic runs

2013-02-14 Thread Andriy Yurchuk
t; 'man puppet.conf'. > > On Wednesday, 13 February 2013 13:49:06 UTC, Andriy Yurchuk wrote: >> >> I need puppet agent daemon running because I need to access agent's REST >> API (http://docs.puppetlabs.com/guides/rest_api.html#the-agent-rest-api). >> But I

[Puppet Users] Referencing resource from another class

2013-02-14 Thread Andriy Yurchuk
class module::class_1 { service { ensure => running, hasrestart => true, subscribe => File[/tmp/myfile], } } class module::class_2 { file { '/tmp/myfile': source => 'puppet:///file_server/my_file', } } Having those two classes, how do I correctly write the subscribe p

[Puppet Users] Daemonize puppet agent but disable periodic runs

2013-02-13 Thread Andriy Yurchuk
I need puppet agent daemon running because I need to access agent's REST API (http://docs.puppetlabs.com/guides/rest_api.html#the-agent-rest-api). But I don't need the agent to run periodic checks. Is there any way to either access REST API without daemonizing agent (I suspect this id not possi

[Puppet Users] Re: Referencing facts in Puppet Ruby DSL

2013-02-13 Thread Andriy Yurchuk
That worked, thanks a lot John. On Tuesday, February 12, 2013 4:15:52 PM UTC+2, jcbollinger wrote: > > > > On Tuesday, February 12, 2013 5:10:02 AM UTC-6, Andriy Yurchuk wrote: >> >> How do I reference my custom created facts (distributed via pluginsync)? >> I tr

[Puppet Users] Referencing facts in Puppet Ruby DSL

2013-02-12 Thread Andriy Yurchuk
How do I reference my custom created facts (distributed via pluginsync)? I tried Facter[:custom_fact].value, but this does not seem to work - it always returns the value for the fact on master. -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. T

Re: [Puppet Users] mcollective-puppet-agent to return status of Puppet execution

2013-02-07 Thread Andriy Yurchuk
file resources, then I want all my nodes to fetch this change. On Thursday, February 7, 2013 3:53:57 PM UTC+2, R.I. Pienaar wrote: > > > > - Original Message - > > From: "Andriy Yurchuk" > > > To: puppet...@googlegroups.com > > Sent: Thursda

[Puppet Users] mcollective-puppet-agent to return status of Puppet execution

2013-02-07 Thread Andriy Yurchuk
I'm using mcollective-puppet-agent ( https://github.com/puppetlabs/mcollective-puppet-agent) to force Puppet runs on nodes. When running mco puppet runall is there any way I can get back the status of Puppet execution on each node? Currently, even if verbosity is enabled, mco does not provide

[Puppet Users] Re: Referencing a variable in template, loaded from Ruby DSL each loop

2013-02-06 Thread Andriy Yurchuk
I've found out that it works if inside the loop I define $item_name = itemand then reference it as $item_name in the template. On Tuesday, February 5, 2013 10:04:14 PM UTC+2, Andriy Yurchuk wrote: > > hostclass :class do > items = scope.lookupvar('items_list')

[Puppet Users] Re: Puppet custom recursive directory synchronization

2013-02-05 Thread Andriy Yurchuk
I ended up implementing this using Puppet Ruby DSL. -- 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 puppet-users+unsubscr...@googlegroups.com. To post to this gr

[Puppet Users] Referencing a variable in template, loaded from Ruby DSL each loop

2013-02-05 Thread Andriy Yurchuk
hostclass :class do items = scope.lookupvar('items_list') items.each do |item| file("/etc/init.d/#{item}", :content => template(['class/item_init.erb'])) end end Having this class written in Ruby DSL, how do I properly reference the itemvariable in the template? I tried <%= it

[Puppet Users] Re: Puppet custom recursive directory synchronization

2013-02-04 Thread Andriy Yurchuk
ove them > from deployment.yml. maybe purge attribute can do this. > > On Monday, February 4, 2013 7:58:37 PM UTC+8, Andriy Yurchuk wrote: >> >> I'm trying to implement a custom recursive directory synchronization >> resource in Puppet. What I need to do is the foll

[Puppet Users] Puppet custom recursive directory synchronization

2013-02-04 Thread Andriy Yurchuk
I'm trying to implement a custom recursive directory synchronization resource in Puppet. What I need to do is the following. I have a YAML file with the list of hostnames and the list of directories that should exist on each hostname inside, say, `/var/lib/my_app` directory (`deployment.yml`):

Re: [Puppet Users] Re: Another "function does not return a value" problem

2013-02-04 Thread Andriy Yurchuk
Yes, that was the reason perhaps. Thanks. On Sunday, February 3, 2013 10:32:32 PM UTC+2, R.I. Pienaar wrote: > > > > - Original Message - > > From: "Andriy Yurchuk" > > > To: puppet...@googlegroups.com > > Sent: Sunday, February 3, 2013

[Puppet Users] Re: Another "function does not return a value" problem

2013-02-03 Thread Andriy Yurchuk
For some unknown reason it works after enabling PuppetDB. On Sunday, February 3, 2013 8:26:18 PM UTC+2, Andriy Yurchuk wrote: > > Here's the function: > > module Puppet::Parser::Functions > newfunction(:fact_to_array, :type => :rvalue) do |args| > args[0].split(&#x

[Puppet Users] Another "function does not return a value" problem

2013-02-03 Thread Andriy Yurchuk
Here's the function: module Puppet::Parser::Functions newfunction(:fact_to_array, :type => :rvalue) do |args| args[0].split(',') end end Here's the class I'm trying to use it in: class oms::all_config { file { '/var/lib/oms/config': source => 'puppet:///deployment/deployment',