Change default ulimits

This commit is contained in:
Tobias Manske 2023-08-22 18:50:55 +02:00
parent 699636cc0e
commit 9ee067a756
Signed by: tobias
GPG Key ID: 9164B527694A0709
2 changed files with 27 additions and 19 deletions

View File

@ -159,3 +159,30 @@
enabled: true enabled: true
masked: false masked: false
daemon_reload: true daemon_reload: true
- name: Setup Docker Config
hosts: all
become: true
become_user: root
tasks:
- name: Template Config
ansible.builtin.template:
src: "docker-daemon.json.j2"
dest: /etc/docker/daemon.json
owner: root
group: root
mode: '0600'
notify: Restart Docker
- name: Setup default ulimts
ansible.builtin.lineinfile:
path: /etc/sysconfig/docker
search_string: '--default-ulimit nofile='
line: ' --default-ulimit nofile=4096:4096 \'
notify: Restart Docker
- name: Restart Docker if necessary
meta: flush_handlers
handlers:
- name: Restart Docker
ansible.builtin.systemd:
state: restarted
name: docker.service

View File

@ -1,22 +1,3 @@
- name: Setup Docker Config
hosts: host.nc.chaoswg.org
become: true
become_user: root
tasks:
- name: Template Config
ansible.builtin.template:
src: "docker-daemon.json.j2"
dest: /etc/docker/daemon.json
owner: root
group: root
mode: '0600'
register: docker_config
- name: Restart Docker
ansible.builtin.systemd:
state: restarted
name: docker.service
when: docker_config.changed
- name: Setup VPS - name: Setup VPS
hosts: host.nc.chaoswg.org hosts: host.nc.chaoswg.org
vars: vars: