add clanlib.nix documentation
This commit is contained in:
parent
afe2b88068
commit
c5b5857a39
1 changed files with 24 additions and 3 deletions
|
@ -15,7 +15,13 @@ let
|
|||
else
|
||||
null;
|
||||
|
||||
# machine -> factvalue
|
||||
# Example:
|
||||
#
|
||||
# readFactFromAllMachines zerotier-ip
|
||||
# => {
|
||||
# machineA = "1.2.3.4";
|
||||
# machineB = "5.6.7.8";
|
||||
# };
|
||||
readFactFromAllMachines = fact:
|
||||
let
|
||||
machines = allMachineNames;
|
||||
|
@ -24,8 +30,23 @@ let
|
|||
in
|
||||
filteredFacts;
|
||||
|
||||
# returns an Attrs of machines and it's facts which have all given facts set.
|
||||
# machine -> fact -> value
|
||||
# all given facts are are set and factvalues are never null.
|
||||
#
|
||||
# Example:
|
||||
#
|
||||
# readFactsFromAllMachines [ "zerotier-ip" "syncthing.pub" ]
|
||||
# => {
|
||||
# machineA =
|
||||
# {
|
||||
# "zerotier-ip" = "1.2.3.4";
|
||||
# "synching.pub" = "1234";
|
||||
# };
|
||||
# machineB =
|
||||
# {
|
||||
# "zerotier-ip" = "5.6.7.8";
|
||||
# "synching.pub" = "23456719";
|
||||
# };
|
||||
# };
|
||||
readFactsFromAllMachines = facts:
|
||||
let
|
||||
# machine -> fact -> factvalue
|
||||
|
|
Loading…
Reference in a new issue