diff --git a/tasks/swift_init_systemd.yml b/tasks/swift_init_systemd.yml index da298082..dfaddc4d 100644 --- a/tasks/swift_init_systemd.yml +++ b/tasks/swift_init_systemd.yml @@ -43,7 +43,6 @@ with_dict: "{{ swift_services }}" when: inventory_hostname in groups[item.value.group] - - name: Create tmpfiles.d entry template: src: "swift-systemd-tmpfiles.j2" @@ -65,3 +64,4 @@ when: inventory_hostname in groups[item.value.group] notify: - Reload systemd daemon + diff --git a/tasks/swift_pre_install.yml b/tasks/swift_pre_install.yml index 780c3b7c..c9b4fb2d 100644 --- a/tasks/swift_pre_install.yml +++ b/tasks/swift_pre_install.yml @@ -90,19 +90,3 @@ mode: "0755" owner: "root" group: "root" - -- name: Configure soft file limits - lineinfile: - dest: "/etc/security/limits.conf" - regexp: "^{{ swift_system_user_name }}.*soft.*nofile.*" - state: "present" - line: "{{ swift_system_user_name }}\tsoft\tnofile\t\t{{ swift_soft_open_file_limits }}" - insertbefore: "^# End of file" - -- name: Configure hard file limits - lineinfile: - dest: "/etc/security/limits.conf" - regexp: "^{{ swift_system_user_name }}.*hard.*nofile.*" - state: "present" - line: "{{ swift_system_user_name }}\thard\tnofile\t\t{{ swift_hard_open_file_limits }}" - insertbefore: "^# End of file" diff --git a/templates/swift-systemd-init.j2 b/templates/swift-systemd-init.j2 index 56a79475..591039b0 100644 --- a/templates/swift-systemd-init.j2 +++ b/templates/swift-systemd-init.j2 @@ -8,6 +8,7 @@ After=network.target Type=simple User={{ swift_system_user_name }} Group={{ swift_system_group_name }} +LimitNOFILE={{ swift_soft_open_file_limits }}:{{ swift_hard_open_file_limits }} {% if swift_pypy_enabled %} {% if swift_pypy_gc_min is defined %}