diff --git a/tsg-9140-scripts/roles/sapp/tasks/main.yml b/tsg-9140-scripts/roles/sapp/tasks/main.yml index d4c4a855..b8acf3e6 100644 --- a/tsg-9140-scripts/roles/sapp/tasks/main.yml +++ b/tsg-9140-scripts/roles/sapp/tasks/main.yml @@ -88,16 +88,25 @@ dest: /opt/tsg/tsg-os-provision/templates/gdev.conf.j2 tags: template -- name: "sapp: service adapts runtimes" +- name: "Create /usr/lib/systemd/system/sapp.service.d/ directory if it does not exist" + file: + path: "{{ item }}" + state: directory + mode: '0755' + with_items: + - /usr/lib/systemd/system/sapp.service.d + + +- name: "sapp: service override timeoutsec" template: - src: "{{ role_path }}/templates/adapt_runtimes.j2" - dest: /usr/lib/systemd/system/sapp.service.d/ + src: "{{ role_path }}/templates/service_override_timeoutsec.conf.j2" + dest: /usr/lib/systemd/system/sapp.service.d/service_override_timeoutsec.conf mode: 0644 - name: "copy memory limit file to sapp.service.d" copy: - src: "{{ role_path }}/files/memory.conf" - dest: /usr/lib/systemd/system/sapp.service.d/ + src: "{{ role_path }}/templates/service_override_memsw_limit.conf.j2" + dest: /usr/lib/systemd/system/sapp.service.d/service_override_memsw_limit.conf mode: 0644 diff --git a/tsg-9140-scripts/roles/sapp/templates/adapt_runtimes.j2 b/tsg-9140-scripts/roles/sapp/templates/adapt_runtimes.j2 deleted file mode 100644 index f5e4013e..00000000 --- a/tsg-9140-scripts/roles/sapp/templates/adapt_runtimes.j2 +++ /dev/null @@ -1,9 +0,0 @@ -[Unit] -Requires=mrzcpd.service -After=mrzcpd.service -[Service] -TimeoutSec=900s -RestartSec=10s -LimitNOFILE=524288 -LimitCORE=0 -WatchdogSec=10s \ No newline at end of file diff --git a/tsg-9140-scripts/roles/sapp/files/memory.conf b/tsg-9140-scripts/roles/sapp/templates/service_override_memsw_limit.conf.j2 similarity index 100% rename from tsg-9140-scripts/roles/sapp/files/memory.conf rename to tsg-9140-scripts/roles/sapp/templates/service_override_memsw_limit.conf.j2 diff --git a/tsg-9140-scripts/roles/sapp/templates/service_override_timeoutsec.conf.j2 b/tsg-9140-scripts/roles/sapp/templates/service_override_timeoutsec.conf.j2 new file mode 100644 index 00000000..16f5a6c5 --- /dev/null +++ b/tsg-9140-scripts/roles/sapp/templates/service_override_timeoutsec.conf.j2 @@ -0,0 +1,2 @@ +[Service] +TimeoutSec=900s \ No newline at end of file