Skip to content
Snippets Groups Projects
Unverified Commit 9ac0aab3 authored by anarcat's avatar anarcat
Browse files

another exported resources with puppetdb

parent c6e1a655
No related branches found
No related tags found
No related merge requests found
......@@ -493,6 +493,8 @@ see why they do not work correctly (a common problem):
Finally, some errors show up only on the Puppet server: you can look in
`/var/log/daemon.log` there for errors that will only show up there.
### Finding exported resources with SQL queries
Connecting to the PuppetDB database itself can sometimes be easier
than trying to operate the API. There you can inspect the entire thing
as a normal SQL database, use this to connect:
......@@ -509,6 +511,21 @@ resources with `troodi` in the name:
Keep in mind that there are [automatic tags](https://puppet.com/docs/puppet/6.4/lang_tags.html) in exported resources
which can complicate things.
### Finding exported resources with PuppetDB
This query will look for exported resources with the `type`
`Backupninja::Server::Account` (which can be a class, define, or
builtin resource) and a `title` (the "name" of the resource as defined
in the manifests) of `backup-blah@backup.koumbit.net`:
curl -s -X POST http://localhost:8080/pdb/query/v4 \
-H 'Content-Type:application/json' \
-d '{"query": "resources { type = \"Backupninja::Server::Account\" and title = \"backup-blah@backup.koumbit.net\" }"}' \
| jq . | less -SR
TODO: update the above query to match resources actually in use at
TPO. That example is from koumbit.org folks.
## Password management
If you need to set a password in a manifest, there are special
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment