Add change_script to service module
This commit is contained in:
parent
a2d33ac309
commit
df1ae60936
@ -175,6 +175,14 @@ EOF
|
||||
%{~ if template.change_signal != null }
|
||||
change_signal = "${template.change_signal}"
|
||||
%{~ endif ~}
|
||||
%{~ if template.change_script != null }
|
||||
change_script {
|
||||
command = "${template.change_script.command}"
|
||||
args = ${jsonencode(template.change_script.args)}
|
||||
timeout = "${template.change_script.timeout}"
|
||||
fail_on_error = ${template.change_script.fail_on_error}
|
||||
}
|
||||
%{~ endif ~}
|
||||
%{~ if template.env != null }
|
||||
env = ${template.env}
|
||||
%{~ endif ~}
|
||||
|
@ -158,12 +158,18 @@ variable "templates" {
|
||||
data = string
|
||||
dest = string
|
||||
dest_prefix = optional(string, "$${NOMAD_TASK_DIR}")
|
||||
change_mode = optional(string)
|
||||
change_signal = optional(string)
|
||||
left_delimiter = optional(string)
|
||||
right_delimiter = optional(string)
|
||||
mount = optional(bool, true)
|
||||
env = optional(bool, false)
|
||||
change_mode = optional(string)
|
||||
change_signal = optional(string)
|
||||
change_script = optional(object({
|
||||
command = optional(string, "")
|
||||
args = optional(list(string), [])
|
||||
timeout = optional(string, "5s")
|
||||
fail_on_error = optional(bool, false)
|
||||
}))
|
||||
}))
|
||||
default = []
|
||||
description = "Templates to be used"
|
||||
|
Loading…
Reference in New Issue
Block a user