From da317aac8079c5da7521bf56099a3cc0586e9df5 Mon Sep 17 00:00:00 2001 From: fumingwei Date: Tue, 8 Jun 2021 15:19:29 +0800 Subject: [PATCH] =?UTF-8?q?=E4=B8=BA=E4=BA=86=E6=B7=BB=E5=8A=A0sapp=20zlog?= =?UTF-8?q?=E5=8E=9F=E5=A7=8B=E6=97=A5=E5=BF=97=E8=BE=93=E5=87=BA=EF=BC=8C?= =?UTF-8?q?sapp=20service=20=E5=A2=9E=E5=8A=A0Environment=20=E9=85=8D?= =?UTF-8?q?=E7=BD=AE=E9=A1=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ansible/roles/sapp/tasks/main.yml | 6 +++++- ansible/roles/sapp/templates/service_env.conf.j2 | 2 ++ 2 files changed, 7 insertions(+), 1 deletion(-) create mode 100644 ansible/roles/sapp/templates/service_env.conf.j2 diff --git a/ansible/roles/sapp/tasks/main.yml b/ansible/roles/sapp/tasks/main.yml index 444e58fb..b10c41e4 100644 --- a/ansible/roles/sapp/tasks/main.yml +++ b/ansible/roles/sapp/tasks/main.yml @@ -90,7 +90,6 @@ with_items: - /usr/lib/systemd/system/sapp.service.d - - name: "sapp: service override timeoutsec" template: src: "{{ role_path }}/templates/service_override_timeoutsec.conf.j2" @@ -103,6 +102,11 @@ dest: /usr/lib/systemd/system/sapp.service.d/service_override_memsw_limit.conf mode: 0644 +- name: "copy env conf to sapp.service.d" + copy: + src: "{{ role_path }}/templates/service_env.conf.j2" + dest: /usr/lib/systemd/system/sapp.service.d/service_env.conf + mode: 0644 ##################### sapp ##################### - name: "enable sapp" diff --git a/ansible/roles/sapp/templates/service_env.conf.j2 b/ansible/roles/sapp/templates/service_env.conf.j2 new file mode 100644 index 00000000..68190f6f --- /dev/null +++ b/ansible/roles/sapp/templates/service_env.conf.j2 @@ -0,0 +1,2 @@ +[Service] +Environment="ZLOG_PROFILE_ERROR=/tmp/zlog.error.log" \ No newline at end of file