I don't think this template function should be in any way authoritative, so let's namespace it.
12 lines
259 B
Plaintext
12 lines
259 B
Plaintext
import "datetime"
|
|
import "golang"
|
|
import "sys"
|
|
import "example"
|
|
|
|
$now = datetime.now()
|
|
|
|
file "/tmp/mgmt-datetime" {
|
|
state => $const.res.file.state.exists,
|
|
content => golang.template("Il est l'or Monseignor: {{ . }}\n", datetime.format($now, "15:04:05")),
|
|
}
|