Browse Source
Merge pull request #2357 from octarinesec/eyeofthefrog/set_TasksMax_infinity_for_ubuntu
Set TasksMax to infinity on any OS with systemd
pull/2375/head
Brad Beam
7 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with
3 additions and
3 deletions
-
roles/docker/tasks/systemd.yml
-
roles/docker/templates/docker.service.j2
|
|
@ -12,9 +12,9 @@ |
|
|
|
when: http_proxy is defined or https_proxy is defined |
|
|
|
|
|
|
|
- name: get systemd version |
|
|
|
command: rpm -q --qf '%{V}\n' systemd |
|
|
|
command: systemctl --version | head -n 1 | cut -d " " -f 2 |
|
|
|
register: systemd_version |
|
|
|
when: ansible_os_family == "RedHat" and not is_atomic |
|
|
|
when: not is_atomic |
|
|
|
changed_when: false |
|
|
|
|
|
|
|
- name: Write docker.service systemd file |
|
|
|
|
|
@ -24,7 +24,7 @@ ExecStart={{ docker_bin_dir }}/docker{% if installed_docker_version.stdout|versi |
|
|
|
$DOCKER_NETWORK_OPTIONS \ |
|
|
|
$DOCKER_DNS_OPTIONS \ |
|
|
|
$INSECURE_REGISTRY |
|
|
|
{% if ansible_os_family == "RedHat" and systemd_version.stdout|int >= 226 %} |
|
|
|
{% if not is_atomic and systemd_version.stdout|int >= 226 %} |
|
|
|
TasksMax=infinity |
|
|
|
{% endif %} |
|
|
|
LimitNOFILE=1048576 |
|
|
|