From 5731312c23949d3eb4123f44d9a87e4c2f27561e Mon Sep 17 00:00:00 2001 From: fumingwei Date: Mon, 24 May 2021 15:20:57 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E5=9C=A8tsg-diagnose=20servi?= =?UTF-8?q?ce=E5=90=AF=E5=8A=A8=E5=89=8D=E5=8A=A0=E8=BD=BDtsg-diagnose?= =?UTF-8?q?=E8=BF=90=E8=A1=8C=E6=89=80=E9=9C=80=E8=A6=81=E7=9A=84docker=20?= =?UTF-8?q?image=E7=9A=84=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- tsg-9140-scripts/roles/tsg-diagnose/files/prestart | 4 ++++ tsg-9140-scripts/roles/tsg-diagnose/tasks/main.yml | 8 +++++++- 2 files changed, 11 insertions(+), 1 deletion(-) create mode 100644 tsg-9140-scripts/roles/tsg-diagnose/files/prestart diff --git a/tsg-9140-scripts/roles/tsg-diagnose/files/prestart b/tsg-9140-scripts/roles/tsg-diagnose/files/prestart new file mode 100644 index 00000000..5e67a4d7 --- /dev/null +++ b/tsg-9140-scripts/roles/tsg-diagnose/files/prestart @@ -0,0 +1,4 @@ +[Service] +ExecStartPre=/usr/bin/docker load < /opt/tsg/tsg-diagnose/images/badssl.tar +ExecStartPre=/usr/bin/docker load < /opt/tsg/tsg-diagnose/images/unittest.tar +ExecStartPre=/usr/bin/docker load < /opt/tsg/tsg-diagnose/images/wpr.tar \ No newline at end of file diff --git a/tsg-9140-scripts/roles/tsg-diagnose/tasks/main.yml b/tsg-9140-scripts/roles/tsg-diagnose/tasks/main.yml index f8e98aa3..fad8a6d1 100644 --- a/tsg-9140-scripts/roles/tsg-diagnose/tasks/main.yml +++ b/tsg-9140-scripts/roles/tsg-diagnose/tasks/main.yml @@ -32,4 +32,10 @@ unarchive: src: /tmp/ansible_deploy/tsg-diagnose-certs.tgz dest: /opt/tsg/tsg-diagnose/.badssl_cert_dict - remote_src: yes \ No newline at end of file + remote_src: yes + +- name: "copy prestart file to tsg-diagnose.service.d" + copy: + src: "{{ role_path }}/files/prestart" + dest: /usr/lib/systemd/system/tsg-diagnose.service.d/ + mode: 0644 \ No newline at end of file