Re: [Puppet Users] List all hosts

2017-05-31 Thread Daniel Scott
On Wednesday, 31 May 2017 14:36:33 UTC+1, R.I. Pienaar wrote:
>
>
>
> On Wed, May 31, 2017, at 15:33, Daniel Scott wrote: 
> > Hi, 
> > 
> > I'm looking for a way to list all hosts known by a puppetserver (in 
> > puppetdb). 
> > 
> > I've been using 'puppet cert list --all', however, this doesn't 
> > necessarily 
> > correspond to the list of hosts in puppetdb (for example, if I have to 
> > rebuild the puppet server, and lose all the certs, but I still have the 
> > database). 
> > 
> > Is there a 'puppet' command to list all known hosts? 
> > 
> > I know that it's possible by running a curl against the puppetdb server 
> > itself, but it would be much cleaner if I could just run a command on 
> the 
> > puppetserver. 
>
> Install the client tools: 
>
>https://docs.puppet.com/puppetdb/4.4/pdb_client_tools.html 
>
> Use PQL to query it: 
>
>https://docs.puppet.com/puppetdb/4.4/api/query/examples-pql.html 
>

Hmm, thanks.

That's basically a wrapper around a curl, right?

 

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/6d6d748b-3190-447b-abd3-8296335bfa67%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[Puppet Users] List all hosts

2017-05-31 Thread Daniel Scott
Hi,

I'm looking for a way to list all hosts known by a puppetserver (in 
puppetdb).

I've been using 'puppet cert list --all', however, this doesn't necessarily 
correspond to the list of hosts in puppetdb (for example, if I have to 
rebuild the puppet server, and lose all the certs, but I still have the 
database).

Is there a 'puppet' command to list all known hosts?

I know that it's possible by running a curl against the puppetdb server 
itself, but it would be much cleaner if I could just run a command on the 
puppetserver.

Thanks,

Dan

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/85db5579-ce6b-463d-a8d0-a2f6861048e4%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[Puppet Users] Accessing puppet node facts in report processor

2016-06-14 Thread Daniel Scott
Hi,

Is there a way to access a puppet node's facts in a report processor?

We have nodes which are part of auto scaling groups in AWS, so there are, 
several nodes which are all the same 'type'. We expose this type as a fact 
on the nodes themselves, and I would like to use the type in a report 
processor to send events back to a central server. Is there a way to access 
a node's facts from the report processor?

Or is there a different/better way of obtaining additional node information 
in the report processor?

Thanks,

Dan

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/b1a06591-cb24-4aa3-8952-ebc2bee621d3%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[Puppet Users] Deploy config file for custom reports

2013-07-03 Thread Daniel Scott
Hi,

I've written a custom report which just makes an HTTP call to one of my 
servers so that I can log the event.

The report installs itself when the puppetmaster puppets itself. The report 
script is copied from $MODULE_NAME/lib/puppet/reports/callback.rb into the 
puppetmaster's /var/lib/puppet/lib/puppet/reports directory.

The problem is the config file. Is there a nice way for puppet to deploy 
this itself? We build puppetmasters automatically and it's annoying to have 
to copy the config file in each time. The puppetmaster has a heira file 
containing the necessary values, and I have a template and rule to put it 
in place:

file { "callback_report_processor_config":
name => "/etc/puppet/callback.yaml",
content => template("${module_name}/etc/puppet/callback.yaml.erb"),
ensure => file,
owner => "puppet",
group => "puppet",
}

But this does not run early enough when the puppetmaster is puppeting 
itself. Is there a special location in the catalogue I can put the config 
file so that it is installed properly like the report script. I'm running 
puppet 2.7.

Thanks,

Dan

-- 
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 group, send email to puppet-users@googlegroups.com.
Visit this group at http://groups.google.com/group/puppet-users.
For more options, visit https://groups.google.com/groups/opt_out.