... | @@ -493,6 +493,8 @@ see why they do not work correctly (a common problem): |
... | @@ -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
|
|
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.
|
|
`/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
|
|
Connecting to the PuppetDB database itself can sometimes be easier
|
|
than trying to operate the API. There you can inspect the entire thing
|
|
than trying to operate the API. There you can inspect the entire thing
|
|
as a normal SQL database, use this to connect:
|
|
as a normal SQL database, use this to connect:
|
... | @@ -509,6 +511,21 @@ resources with `troodi` in the name: |
... | @@ -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
|
|
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.
|
|
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
|
|
## Password management
|
|
|
|
|
|
If you need to set a password in a manifest, there are special
|
|
If you need to set a password in a manifest, there are special
|
... | | ... | |