Commit 50da7401 authored by Nicolas Wavrant's avatar Nicolas Wavrant Committed by Thomas Gambier

vifib-server: set the number of subprocesses for cron unlimited

As slapos is started by cron, this number will reach the default limit very fast

/reviewed-on !80
parent 080f5ca4
[Service]
# Increase TasksMax as the default value is too low for a a slapos node
# (on a normal slapos node server, cron starts slapos, which starts supervisord,
# which then manage all deployed instances)
TasksMax=infinity
---
- name: Update cron service definition
# For ansible version < 2.4, state=restarted is mandatory to
# apply the changes (daemon_reload=yes only is not enough)
systemd: daemon_reload=yes name=cron state=restarted
...@@ -44,3 +44,16 @@ ...@@ -44,3 +44,16 @@
- name: Set Cron - name: Set Cron
cron: name="Launch Startup with ansible" special_time=reboot job='cd /opt/upgrader/playbook && ansible-playbook vifib-startup.yml -i hosts 2>>/opt/upgrader/startup.log >> /opt/upgrader/startup.log' cron: name="Launch Startup with ansible" special_time=reboot job='cd /opt/upgrader/playbook && ansible-playbook vifib-startup.yml -i hosts 2>>/opt/upgrader/startup.log >> /opt/upgrader/startup.log'
- name: Get systemd version
shell: systemd --version | head -n 1 | cut -d " " -f 2
register: systemd_version
- file: state=directory path="/etc/systemd/system/cron.service.d/"
when: systemd_version.stdout | int > 228
- name: Increase the maximum of subprocesses for cron
copy: src="etc_systemd_system_cron_service_d_override.conf" dest="/etc/systemd/system/cron.service.d/override.conf" mode=0644 owner=root group=root
when: systemd_version.stdout | int > 228
notify:
- "Update cron service definition"
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment