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
c0be0ca5
Verified
Commit
c0be0ca5
authored
6 years ago
by
anarcat
Browse files
Options
Downloads
Patches
Plain Diff
add better PuppetDB examples
parent
2c977090
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
tsa/howto/puppet.mdwn
+10
-1
10 additions, 1 deletion
tsa/howto/puppet.mdwn
with
10 additions
and
1 deletion
tsa/howto/puppet.mdwn
+
10
−
1
View file @
c0be0ca5
...
...
@@ -22,10 +22,16 @@ The currently known values are: `kvm`, `physical`, and `xenu`.
## Other ways of extracting a host list
* Using the PuppetDB API:
* Using the
[
PuppetDB API
][]
:
curl -s -G http://localhost:8080/pdb/query/v4/facts | jq -r ".[].certname"
The [fact API][] is quite extensive and allows for very complex
queries. For example, this shows all hosts with the `apache2` fact
set to `true`:
curl -s -G http://localhost:8080/pdb/query/v4/facts --data-urlencode 'query=["and", ["=", "name", "apache2"], ["=", "value", true]]' | jq -r ".[].certname"
* Using [Cumin][], see below
[Cumin]: https://doc.wikimedia.org/cumin/master/introduction.html
...
...
@@ -38,6 +44,9 @@ The currently known values are: `kvm`, `physical`, and `xenu`.
the mkdir is so that I can run the same command in many terminal
windows and each host gets only one once
[PuppetDB API]: https://puppet.com/docs/puppetdb/4.3/api/index.html
[fact API]: https://puppet.com/docs/puppetdb/4.3/api/query/v4/facts.html
Batch jobs on all hosts
=======================
...
...
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