fix vault config.hcl.j2
This commit is contained in:
@@ -1,9 +1,10 @@
|
|||||||
#!/sbin/openrc-run
|
#!/sbin/openrc-run
|
||||||
|
|
||||||
capabilities="cap_ipd_lock=+ep"
|
|
||||||
command="/usr/local/bin/vault"
|
command="/usr/local/bin/vault"
|
||||||
command_group="vault"
|
command_user="vault:vault"
|
||||||
command_user="vault"
|
command_background=true
|
||||||
|
capabilities="^cap_chown,^cap_ipc_lock"
|
||||||
|
pidfile="/var/run/${RC_SVCNAME}.pid"
|
||||||
|
|
||||||
# args
|
# args
|
||||||
config_args="-config=/etc/$RC_SVCNAME/config.hcl"
|
config_args="-config=/etc/$RC_SVCNAME/config.hcl"
|
||||||
@@ -20,31 +21,39 @@ depend() {
|
|||||||
|
|
||||||
start_pre() {
|
start_pre() {
|
||||||
checkpath --directory \
|
checkpath --directory \
|
||||||
--owner $command_user:$command_group \
|
--owner $command_user \
|
||||||
--mode 0755 \
|
--mode 0755 \
|
||||||
/run/$RC_SVCNAME /var/log/$RC_SVCNAME
|
/var/log/$RC_SVCNAME
|
||||||
}
|
|
||||||
|
|
||||||
start() {
|
|
||||||
ebegin "Starting $RC_SVCNAME"
|
|
||||||
start-stop-daemon --start \
|
|
||||||
--exec $command \
|
|
||||||
--capabilities $capabilities \
|
|
||||||
--make-pidfile \
|
|
||||||
--pidfile /var/run/$RC_SVCNAME.pid \
|
|
||||||
--user $command_user:$command_group \
|
|
||||||
-- \
|
|
||||||
$command_args
|
|
||||||
|
|
||||||
eend $?
|
|
||||||
}
|
|
||||||
|
|
||||||
stop() {
|
|
||||||
ebegin "Stopping $RC_SVCNAME"
|
|
||||||
start-stop-daemon --stop \
|
|
||||||
--exec $command \
|
|
||||||
--pidfile /var/run/$RC_SVCNAME.pid
|
|
||||||
|
|
||||||
eend $?
|
|
||||||
}
|
}
|
||||||
|
#
|
||||||
|
# start() {
|
||||||
|
# ebegin "Starting $RC_SVCNAME"
|
||||||
|
# start-stop-daemon --start \
|
||||||
|
# --exec $command \
|
||||||
|
# --capabilities $capabilities \
|
||||||
|
# --make-pidfile \
|
||||||
|
# --pidfile /var/run/$RC_SVCNAME.pid \
|
||||||
|
# --user $command_user:$command_group \
|
||||||
|
#
|
||||||
|
# -- \
|
||||||
|
# $command_args
|
||||||
|
#
|
||||||
|
# eend $?
|
||||||
|
# }
|
||||||
|
#
|
||||||
|
# stop() {
|
||||||
|
# ebegin "Stopping $RC_SVCNAME"
|
||||||
|
# start-stop-daemon --stop \
|
||||||
|
# --exec $command \
|
||||||
|
# --pidfile /var/run/$RC_SVCNAME.pid
|
||||||
|
#
|
||||||
|
# eend $?
|
||||||
|
# }
|
||||||
|
#
|
||||||
|
# restart() {
|
||||||
|
# ebegin "Restarting $RC_SVCNAME"
|
||||||
|
# stop()
|
||||||
|
# start()
|
||||||
|
# eend $?
|
||||||
|
# }
|
||||||
# vim: set filetype=sh :
|
# vim: set filetype=sh :
|
||||||
|
|||||||
@@ -1,9 +1,14 @@
|
|||||||
ui = {{ ui | default(true) }}
|
ui = {{ ui | default('true') }}
|
||||||
cluster_addr = "https://{{ ansible_default_ipv4.address }}:{{ cluster_port | default('8201') }}"
|
cluster_addr = "https://{{ ansible_default_ipv4.address }}:{{ cluster_port | default('8201') }}"
|
||||||
api_addr = "https://{{ansible_default_ipv4.address }}:{{ api_port | default('8200') }}"
|
api_addr = "https://{{ansible_default_ipv4.address }}:{{ api_port | default('8200') }}"
|
||||||
disable_mlock = {{ disable_mlock | default(true) }}
|
disable_mlock = {{ disable_mlock | default('true') }}
|
||||||
|
|
||||||
storage "raft" {
|
storage "raft" {
|
||||||
path = "{{ raft_path | default('/var/lib/vault/data') }}"
|
path = "{{ raft_path | default('/var/lib/vault/data') }}"
|
||||||
node_id = "{{ raft_node_id | default(ansible_hostname) }}"
|
node_id = "{{ raft_node_id | default(ansible_hostname) }}"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
listener "tcp" {
|
||||||
|
address = "{{ ansible_default_ipv4.address }}:{{ api_port | default('8200') }}"
|
||||||
|
cluster_address = "{{ ansible_default_ipv4.address }}:{{ cluster_port | default('8201') }}"
|
||||||
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user