Create `prometheus` user.
This commit is contained in:
parent
b28477137c
commit
a8b8c6b6e2
|
@ -1,23 +1,29 @@
|
||||||
|
# Create User and group:
|
||||||
|
user 'prometheus' do
|
||||||
|
system_user true
|
||||||
|
shell '/sbin/nologin'
|
||||||
|
end
|
||||||
|
|
||||||
# Create `/etc/prometheus.d/`:
|
# Create `/etc/prometheus.d/`:
|
||||||
%w(/etc/prometheus.d).each do |d|
|
%w(/etc/prometheus.d).each do |d|
|
||||||
directory d do
|
directory d do
|
||||||
owner 'root'
|
owner 'prometheus'
|
||||||
group 'root'
|
group 'promtheus'
|
||||||
mode '0755'
|
mode '0755'
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
# Deploy `prometheus` files:
|
# Deploy `prometheus` files:
|
||||||
remote_file '/etc/prometheus.d/prometheus.yml' do
|
remote_file '/etc/prometheus.d/prometheus.yml' do
|
||||||
owner 'root'
|
owner 'prometheus'
|
||||||
group 'root'
|
group 'prometheus'
|
||||||
mode '644'
|
mode '644'
|
||||||
end
|
end
|
||||||
|
|
||||||
# Deploy `supervisor` configuration for `prometheus`:
|
# Deploy `supervisor` configuration for `prometheus`:
|
||||||
remote_file '/etc/supervisor/conf.d/prometheus.conf' do
|
remote_file '/etc/supervisor/conf.d/prometheus.conf' do
|
||||||
owner 'root'
|
owner 'prometheus'
|
||||||
group 'root'
|
group 'prometheus'
|
||||||
mode '644'
|
mode '644'
|
||||||
|
|
||||||
notifies :restart, 'service[supervisor]'
|
notifies :restart, 'service[supervisor]'
|
||||||
|
|
Loading…
Reference in New Issue