Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Wiki Replica
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
The Tor Project
TPA
Wiki Replica
Commits
9ac0aab3
Unverified
Commit
9ac0aab3
authored
4 years ago
by
anarcat
Browse files
Options
Downloads
Patches
Plain Diff
another exported resources with puppetdb
parent
c6e1a655
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
howto/puppet.md
+17
-0
17 additions, 0 deletions
howto/puppet.md
with
17 additions
and
0 deletions
howto/puppet.md
+
17
−
0
View file @
9ac0aab3
...
...
@@ -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
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment