add tor_instances fact - #247
Open
jcgl17 wants to merge 2 commits into
Open
Conversation
Author
|
Made this a little more useful. Now the output looks something like this: {
"relay1.example.com-192.0.2.1_9002": {
"instance_id_unqualified": "192.0.2.1_9002",
"ipv4": "192.0.2.1",
"ipv6": "2001:db8::1",
"port": { "dirport": 0, "orport": 9002 }
},
"relay1.example.com-192.0.2.1_9004": {
"instance_id_unqualified": "192.0.2.1_9004",
"ipv4": "192.0.2.1",
"ipv6": "2001:db8::1",
"port": { "dirport": 0, "orport": 9004 }
}
}The top-level JSON keys are what is needed to select from relayor's various CSV files (e.g. to get an instance's nickname). This commit is backwards-incompatible with the last one, but now it has a flexible schema which shouldn't have to make further backwards-incompatible changes. |
jcgl17
force-pushed
the
add_tor_instances_fact
branch
from
July 5, 2025 16:31
977faf8 to
1cb5659
Compare
Author
|
Rebased cleanly against v25.0.0. |
This set_fact call gives other roles access to the ipv4+orport combination that is used to key various things, such as service instances and the various CSV files used by relayor. That makes it easier for other roles to compose neatly with relayor.
Not only is this more useful than just the flat list of ipv4+orport strings, but it also provides a way to add more data here in future without breaking backwards compatibility (like this change does)
jcgl17
force-pushed
the
add_tor_instances_fact
branch
from
April 7, 2026 18:04
1cb5659 to
15dae69
Compare
Author
|
Rebased cleanly against v26.0.0. |
Owner
|
To support
d3619b3
we have a new fact that has all the important fields now:
- IPv4
- IPv6
- ORPort
- DirPort
Other vars like inventory_hostname are available anyway.
Since it can be used to construct all the fields you appear to include as well
does that meet your requirements already?
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This set_fact call gives other roles access to the ipv4+orport combination that is used to key various things, such as service instances and the various CSV files used by relayor. That makes it easier for other roles to compose neatly with relayor.