TSG-6676 将 exporter-proxy.service 加入到 workload.slice

This commit is contained in:
luwenpeng
2021-08-06 17:07:10 +08:00
parent 5d1abf2bb2
commit 561d1e1ba0
2 changed files with 16 additions and 0 deletions

View File

@@ -22,6 +22,20 @@
dest: /opt/tsg/exporter/exporter-proxy/conf/nginx.conf
tags: template
- name: "Create /usr/lib/systemd/system/exporter-proxy.service.d/ directory if it does not exist"
file:
path: "{{ item }}"
state: directory
mode: '0755'
with_items:
- /usr/lib/systemd/system/exporter-proxy.service.d
- name: "copy slice file to exporter-proxy.service.d"
copy:
src: "{{ role_path }}/templates/service_override_slice.conf.j2"
dest: /usr/lib/systemd/system/exporter-proxy.service.d/service_override_slice.conf
mode: 0644
- name: 'exporter-proxy service start'
systemd:
name: exporter-proxy

View File

@@ -0,0 +1,2 @@
[Service]
Slice=workload.slice