Compare commits
2 Commits
main
...
f54de8bea1
| Author | SHA1 | Date | |
|---|---|---|---|
|
f54de8bea1
|
|||
|
7d6413cf10
|
1
.gitattributes
vendored
1
.gitattributes
vendored
@@ -1 +1,2 @@
|
|||||||
_secrets.yaml filter=git-crypt diff=git-crypt
|
_secrets.yaml filter=git-crypt diff=git-crypt
|
||||||
|
secrets.yaml filter=git-crypt diff=git-crypt
|
||||||
|
|||||||
@@ -1,3 +1,3 @@
|
|||||||
machine:
|
machine:
|
||||||
network:
|
network:
|
||||||
hostname: {{hostname}}
|
hostname: {{node.hostname}}
|
||||||
|
|||||||
@@ -1,3 +1,3 @@
|
|||||||
machine:
|
machine:
|
||||||
install:
|
install:
|
||||||
disk: {{installDisk}}
|
disk: {{node.installDisk}}
|
||||||
|
|||||||
@@ -1,10 +1,10 @@
|
|||||||
machine:
|
machine:
|
||||||
network:
|
network:
|
||||||
interfaces:
|
interfaces:
|
||||||
- interface: {{interface}}
|
- interface: {{node.interface}}
|
||||||
dhcp: false
|
dhcp: false
|
||||||
addresses:
|
addresses:
|
||||||
- {{ip}}
|
- {{node.ip}}
|
||||||
routes:
|
routes:
|
||||||
- network: 0.0.0.0/0
|
- network: 0.0.0.0/0
|
||||||
gateway: {{gateway}}
|
gateway: {{node.gateway}}
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
machine:
|
machine:
|
||||||
network:
|
network:
|
||||||
interfaces:
|
interfaces:
|
||||||
- interface: {{interface}}
|
- interface: {{node.interface}}
|
||||||
vip:
|
vip:
|
||||||
ip: {{cluster.controlPlaneIp}}
|
ip: {{node.cluster.controlPlaneIp}}
|
||||||
|
|||||||
@@ -40,7 +40,7 @@ def render_templates(node: dict, args: dict):
|
|||||||
def default(self, o):
|
def default(self, o):
|
||||||
if isinstance(o, Template):
|
if isinstance(o, Template):
|
||||||
try:
|
try:
|
||||||
rendered = o.render(args | node)
|
rendered = o.render(args | {"node": node})
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
e.add_note(f"While rendering for: {node['hostname']}")
|
e.add_note(f"While rendering for: {node['hostname']}")
|
||||||
raise e
|
raise e
|
||||||
@@ -134,6 +134,9 @@ def main():
|
|||||||
with open(ROOT.joinpath("config.yaml")) as fyaml:
|
with open(ROOT.joinpath("config.yaml")) as fyaml:
|
||||||
config = yaml.safe_load(fyaml)
|
config = yaml.safe_load(fyaml)
|
||||||
|
|
||||||
|
with open(ROOT.joinpath("secrets.yaml")) as fyaml:
|
||||||
|
config |= yaml.safe_load(fyaml)
|
||||||
|
|
||||||
template_args = {"config": config, "root": ROOT}
|
template_args = {"config": config, "root": ROOT}
|
||||||
|
|
||||||
nodes = []
|
nodes = []
|
||||||
|
|||||||
Reference in New Issue
Block a user