Deploy `promtail` config & `systemd` config.
This commit is contained in:
parent
8485309442
commit
c599fccc2b
|
@ -68,3 +68,26 @@ end
|
|||
service 'nginx' do
|
||||
action [ :enable, :start ]
|
||||
end
|
||||
|
||||
# Deploy `promtail` config file:
|
||||
HOSTNAME = run_command('uname -n').stdout.chomp
|
||||
|
||||
template '/etc/promtail/nginx.yaml' do
|
||||
owner 'root'
|
||||
group 'root'
|
||||
mode '644'
|
||||
|
||||
variables(HOSTNAME: HOSTNAME, LOKIENDPOINT: node['promtail']['lokiendpoint'])
|
||||
end
|
||||
|
||||
# Deploy the `systemd` configuration:
|
||||
remote_file '/lib/systemd/system/promtail-nginx.service' do
|
||||
owner 'root'
|
||||
group 'root'
|
||||
mode '644'
|
||||
end
|
||||
|
||||
# Service setting:
|
||||
service 'promtail-nginx' do
|
||||
action [ :enable, :restart ]
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue