-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
WIP(osal.coredns): add example for coredns usage
- create an example to use coredns module for adding dns records - fix module errors
- Loading branch information
1 parent
e929ce0
commit 86e3fdb
Showing
4 changed files
with
189 additions
and
164 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
#!/usr/bin/env -S v -n -w -gc none -cc tcc -d use_openssl -enable-globals run | ||
|
||
import freeflowuniverse.herolib.installers.infra.coredns as coredns_installer | ||
import freeflowuniverse.herolib.osal.coredns | ||
import freeflowuniverse.herolib.core.playbook | ||
|
||
// coredns_installer.delete()! | ||
mut installer := coredns_installer.get()! | ||
// coredns_installer.fix()! | ||
installer.start()! | ||
|
||
// TODO: create heroscript and run it to add dns records | ||
mut script := ' | ||
dns.a_record | ||
name: "a_rec1" | ||
ip: "1.1.1.1" | ||
' | ||
|
||
mut plbook := playbook.new(text: script)! | ||
coredns.play_dns(mut plbook)! |
This file contains 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
This file contains 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
Oops, something went wrong.