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
|
else
|
||||||
null;
|
null;
|
||||||
|
|
||||||
# machine -> factvalue
|
# Example:
|
||||||
|
#
|
||||||
|
# readFactFromAllMachines zerotier-ip
|
||||||
|
# => {
|
||||||
|
# machineA = "1.2.3.4";
|
||||||
|
# machineB = "5.6.7.8";
|
||||||
|
# };
|
||||||
readFactFromAllMachines = fact:
|
readFactFromAllMachines = fact:
|
||||||
let
|
let
|
||||||
machines = allMachineNames;
|
machines = allMachineNames;
|
||||||
|
@ -24,8 +30,23 @@ let
|
||||||
in
|
in
|
||||||
filteredFacts;
|
filteredFacts;
|
||||||
|
|
||||||
# returns an Attrs of machines and it's facts which have all given facts set.
|
# all given facts are are set and factvalues are never null.
|
||||||
# machine -> fact -> value
|
#
|
||||||
|
# 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:
|
readFactsFromAllMachines = facts:
|
||||||
let
|
let
|
||||||
# machine -> fact -> factvalue
|
# machine -> fact -> factvalue
|
||||||
|
|
Loading…
Reference in a new issue