-
Notifications
You must be signed in to change notification settings - Fork 519
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
prairiedog: adjust to leverage a rendered config file
Changes prairiedog to read from /etc/prairiedog.toml which is generated automatically from the settings.
- Loading branch information
Showing
14 changed files
with
177 additions
and
67 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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
[required-extensions] | ||
boot = "v1" | ||
+++ | ||
{{#if settings.boot}} | ||
{{#if settings.boot.reboot-to-reconcile}} | ||
reboot-to-reconcile = {{settings.boot.reboot-to-reconcile}} | ||
|
||
{{/if}} | ||
{{#if settings.boot.kernel}} | ||
[kernel] | ||
{{#each settings.boot.kernel}} | ||
"{{@key}}" = [ {{#each this}}"{{{this}}}",{{/each}} ] | ||
{{/each}} | ||
|
||
{{/if}} | ||
{{#if settings.boot.init}} | ||
[init] | ||
{{#each settings.boot.init}} | ||
"{{@key}}" = [ {{#each this}}"{{{this}}}",{{/each}} ] | ||
{{/each}} | ||
{{/if}} | ||
{{/if}} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
13 changes: 13 additions & 0 deletions
13
sources/api/migration/migrations/v1.19.2/prairiedog-config-file-v0-1-0/Cargo.toml
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,13 @@ | ||
[package] | ||
name = "prairiedog-config-file-v0-1-0" | ||
version = "0.1.0" | ||
authors = ["Jarrett Tierney <[email protected]>"] | ||
license = "Apache-2.0 OR MIT" | ||
edition = "2021" | ||
publish = false | ||
exclude = ["README.md"] | ||
|
||
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html | ||
|
||
[dependencies] | ||
migration-helpers = { path = "../../../migration-helpers", version = "0.1.0" } |
16 changes: 16 additions & 0 deletions
16
sources/api/migration/migrations/v1.19.2/prairiedog-config-file-v0-1-0/src/main.rs
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,16 @@ | ||
use migration_helpers::common_migrations::AddPrefixesMigration; | ||
use migration_helpers::{migrate, Result}; | ||
use std::process; | ||
|
||
fn run() -> Result<()> { | ||
migrate(AddPrefixesMigration(vec![ | ||
"configuration-files.prairiedog-toml", | ||
])) | ||
} | ||
|
||
fn main() { | ||
if let Err(e) = run() { | ||
eprintln!("{}", e); | ||
process::exit(1); | ||
} | ||
} |
13 changes: 13 additions & 0 deletions
13
sources/api/migration/migrations/v1.19.2/prairiedog-services-cfg-v0-1-0/Cargo.toml
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,13 @@ | ||
[package] | ||
name = "prairiedog-services-cfg-v0-1-0" | ||
version = "0.1.0" | ||
authors = ["Jarrett Tierney <[email protected]>"] | ||
license = "Apache-2.0 OR MIT" | ||
edition = "2021" | ||
publish = false | ||
exclude = ["README.md"] | ||
|
||
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html | ||
|
||
[dependencies] | ||
migration-helpers = { path = "../../../migration-helpers", version = "0.1.0" } |
18 changes: 18 additions & 0 deletions
18
sources/api/migration/migrations/v1.19.2/prairiedog-services-cfg-v0-1-0/src/main.rs
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,18 @@ | ||
use migration_helpers::common_migrations::{ListReplacement, ReplaceListsMigration}; | ||
use migration_helpers::{migrate, Result}; | ||
use std::process; | ||
|
||
fn run() -> Result<()> { | ||
migrate(ReplaceListsMigration(vec![ListReplacement { | ||
setting: "services.bootconfig.configuration-files", | ||
old_vals: &[], | ||
new_vals: &["prairiedog-toml"], | ||
}])) | ||
} | ||
|
||
fn main() { | ||
if let Err(e) = run() { | ||
eprintln!("{}", e); | ||
process::exit(1); | ||
} | ||
} |
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
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.