env/prod: Collect common tempates in module

In order to simplify the process of adding new template render
instructions to all hosts, I've created a list of templates in the
`env/prod` module.  This way, I only have to add templates there, and
all hosts that "inherit" from it will automatically get them.
master
Dustin 2024-02-03 10:24:38 -06:00
parent b7f5d4a910
commit 786145e914
5 changed files with 21 additions and 14 deletions

13
env/prod/instructions.cue vendored Normal file
View File

@ -0,0 +1,13 @@
package prod
import (
"list"
"du5t1n.me/cfg/app/ssh"
"du5t1n.me/cfg/app/sudo"
)
templates: list.Concat([
ssh.templates,
sudo.templates,
])

View File

@ -1,9 +1,9 @@
import ( import (
"list" "list"
"du5t1n.me/cfg/app/sudo" "du5t1n.me/cfg/env/prod"
) )
render: list.Concat([ render: list.Concat([
sudo.templates, prod.templates,
]) ])

View File

@ -5,8 +5,7 @@ import (
"du5t1n.me/cfg/app/collectd" "du5t1n.me/cfg/app/collectd"
"du5t1n.me/cfg/app/nut" "du5t1n.me/cfg/app/nut"
"du5t1n.me/cfg/app/ssh" "du5t1n.me/cfg/env/prod"
"du5t1n.me/cfg/app/sudo"
) )
render: list.Concat([ render: list.Concat([
@ -14,6 +13,5 @@ render: list.Concat([
nut.templates, nut.templates,
nut.monitor.templates, nut.monitor.templates,
nut.collectd.templates, nut.collectd.templates,
ssh.templates, prod.templates,
sudo.templates,
]) ])

View File

@ -4,13 +4,11 @@ import (
"list" "list"
"du5t1n.me/cfg/app/nut" "du5t1n.me/cfg/app/nut"
"du5t1n.me/cfg/app/ssh" "du5t1n.me/cfg/env/prod"
"du5t1n.me/cfg/app/sudo"
) )
render: list.Concat([ render: list.Concat([
nut.sysusers.templates, nut.sysusers.templates,
nut.monitor.templates, nut.monitor.templates,
ssh.templates, prod.templates,
sudo.templates,
]) ])

View File

@ -4,12 +4,10 @@ import (
"list" "list"
"du5t1n.me/cfg/app/collectd" "du5t1n.me/cfg/app/collectd"
"du5t1n.me/cfg/app/ssh" "du5t1n.me/cfg/env/prod"
"du5t1n.me/cfg/app/sudo"
) )
render: list.Concat([ render: list.Concat([
collectd.templates, collectd.templates,
ssh.templates, prod.templates,
sudo.templates,
]) ])