Change default ulimits
This commit is contained in:
parent
699636cc0e
commit
9ee067a756
@ -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
|
||||||
|
|
||||||
|
@ -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:
|
||||||
|
Loading…
Reference in New Issue
Block a user