Skip to content

Commit

Permalink
Merge pull request #151 from T0biii/patch-1
Browse files Browse the repository at this point in the history
- Add meshviewer output file for ffdon domains
  • Loading branch information
DasSkelett authored Feb 11, 2024
2 parents d8bb870 + 31e0a29 commit b82ab95
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 7 deletions.
6 changes: 3 additions & 3 deletions _pillar/netbox.py
Original file line number Diff line number Diff line change
Expand Up @@ -229,9 +229,9 @@ def ext_pillar(minion_id, pillar, *args, **kwargs):
log.error(interface_results["error"])
return ret
if interface_results["dict"]["name"] not in ret["netbox"]["interfaces"]:
ret["netbox"]["interfaces"][
interface_results["dict"]["name"]
] = interface_results["dict"]
ret["netbox"]["interfaces"][interface_results["dict"]["name"]] = (
interface_results["dict"]
)
if (
"ipaddresses"
not in ret["netbox"]["interfaces"][interface_results["dict"]["name"]]
Expand Down
8 changes: 4 additions & 4 deletions _states/cloudflare.py
Original file line number Diff line number Diff line change
Expand Up @@ -93,10 +93,10 @@ def manage_zone_records(name, zone):
return result

if __opts__["test"] == True:
result[
"comment"
] = "The state of {0} ({1}) will be changed ({2} changes).".format(
name, zone["zone_id"], len(diff)
result["comment"] = (
"The state of {0} ({1}) will be changed ({2} changes).".format(
name, zone["zone_id"], len(diff)
)
)
result["pchanges"] = result["changes"]
return result
Expand Down
15 changes: 15 additions & 0 deletions yanic/yanic.conf.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,16 @@ synchronize = "1m"
# how often request per multicast
collect_interval = "1m"

# all
[respondd.sites.ffmuc]
domains = [{% for site, domains in sites.items() %}{% for domain in domains %}"{{site}}_{{ domain }}", {% endfor %}{% endfor %}]

# ffdon
[respondd.sites.ffdon]
domains = [{% for domain in sites["ffdon"] %}"ffdon_{{ domain }}", {% endfor %}]



# interface that has an IP in your mesh network
{%- for domain in sites.values()|sum(start=[]) %}
[[respondd.interfaces]]
Expand Down Expand Up @@ -46,6 +53,14 @@ offline_after = "10m"
enable = true
path = "/srv/yanic/meshviewer.json"

[[nodes.output.meshviewer-ffrgb]]
enable = true
path = "/srv/yanic/meshviewer-ffdon.json"

[nodes.output.meshviewer-ffrgb.filter]
sites = ["ffdon"]


[[nodes.output.geojson]]
enable = true
path = "/srv/yanic/nodes.geojson"
Expand Down

0 comments on commit b82ab95

Please sign in to comment.