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 }
|
%{~ if template.change_signal != null }
|
||||||
change_signal = "${template.change_signal}"
|
change_signal = "${template.change_signal}"
|
||||||
%{~ endif ~}
|
%{~ 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 }
|
%{~ if template.env != null }
|
||||||
env = ${template.env}
|
env = ${template.env}
|
||||||
%{~ endif ~}
|
%{~ endif ~}
|
||||||
|
@ -158,12 +158,18 @@ variable "templates" {
|
|||||||
data = string
|
data = string
|
||||||
dest = string
|
dest = string
|
||||||
dest_prefix = optional(string, "$${NOMAD_TASK_DIR}")
|
dest_prefix = optional(string, "$${NOMAD_TASK_DIR}")
|
||||||
change_mode = optional(string)
|
|
||||||
change_signal = optional(string)
|
|
||||||
left_delimiter = optional(string)
|
left_delimiter = optional(string)
|
||||||
right_delimiter = optional(string)
|
right_delimiter = optional(string)
|
||||||
mount = optional(bool, true)
|
mount = optional(bool, true)
|
||||||
env = optional(bool, false)
|
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 = []
|
default = []
|
||||||
description = "Templates to be used"
|
description = "Templates to be used"
|
||||||
|
Loading…
Reference in New Issue
Block a user