Files
mgmt/examples/lang/datetime1.mcl
2020-09-23 11:25:46 -04:00

12 lines
244 B
Plaintext

import "datetime"
$d = datetime.now()
file "/tmp/mgmt/datetime" {
state => $const.res.file.state.exists,
content => template("Hello! It is now: {{ datetime_print . }}\n", $d),
}
file "/tmp/mgmt/" {
state => $const.res.file.state.exists,
}