Deploy `vector`-related config files.
This commit is contained in:
parent
bef9a01bc1
commit
4a1574a787
|
@ -85,28 +85,24 @@ service 'nomad' do
|
|||
action [:enable, :start]
|
||||
end
|
||||
|
||||
# Deploy `promtail` config:
|
||||
HOSTNAME = run_command('uname -n').stdout.chomp
|
||||
|
||||
template '/etc/promtail/nomad.yaml' do
|
||||
# Deploy `vector` config:
|
||||
remote_file '/etc/vector/nomad.toml' do
|
||||
owner 'root'
|
||||
group 'root'
|
||||
mode '644'
|
||||
|
||||
variables(HOSTNAME: HOSTNAME, LOKIENDPOINT: node['nomad']['lokiendpoint'])
|
||||
|
||||
notifies :restart, 'service[promtail-nomad]'
|
||||
notifies :restart, 'service[vector-nomad]'
|
||||
end
|
||||
|
||||
# Deploy the `systemd` configuration:
|
||||
remote_file '/lib/systemd/system/promtail-nomad.service' do
|
||||
remote_file '/lib/systemd/system/vector-nomad.service' do
|
||||
owner 'root'
|
||||
group 'root'
|
||||
mode '644'
|
||||
end
|
||||
|
||||
# Service setting:
|
||||
service 'promtail-nomad' do
|
||||
service 'vector-nomad' do
|
||||
action [ :enable, :restart ]
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in New Issue