Move docker config to docker-config.json
This commit is contained in:
parent
fc738c05ae
commit
ca0fd181a5
@ -202,6 +202,11 @@
|
||||
become: true
|
||||
become_user: root
|
||||
tasks:
|
||||
- ansible.builtin.file:
|
||||
path: /etc/docker
|
||||
owner: root
|
||||
state: directory
|
||||
mode: '0700'
|
||||
- name: Template Config
|
||||
ansible.builtin.template:
|
||||
src: "docker-daemon.json.j2"
|
||||
@ -210,17 +215,23 @@
|
||||
group: root
|
||||
mode: '0600'
|
||||
notify: Restart Docker
|
||||
- name: Setup default ulimts
|
||||
- name: Check if sysconfig exists
|
||||
ansible.builtin.stat:
|
||||
path: /etc/sysconfig/docker
|
||||
register: sysconfig
|
||||
- name: Remove ulimits from sysconfig
|
||||
ansible.builtin.lineinfile:
|
||||
path: /etc/sysconfig/docker
|
||||
search_string: '--default-ulimit nofile='
|
||||
line: ' --default-ulimit nofile=4096:4096 \'
|
||||
state: absent
|
||||
when: sysconfig.stat.exists
|
||||
notify: Restart Docker
|
||||
- name: Remove log-driver from sysconfig
|
||||
ansible.builtin.lineinfile:
|
||||
path: /etc/sysconfig/docker
|
||||
search_string: '--log-driver='
|
||||
state: absent
|
||||
when: sysconfig.stat.exists
|
||||
notify: Restart Docker
|
||||
- name: Restart Docker if necessary
|
||||
meta: flush_handlers
|
||||
|
@ -10,6 +10,13 @@
|
||||
{ "base":"10.254.0.0/17","size":26 },
|
||||
{ "base": "fd64:2::/104", "size": 112 }
|
||||
],
|
||||
"default-ulimits": {
|
||||
"nofile": {
|
||||
"Name": "nofile",
|
||||
"Hard": 65535,
|
||||
"Soft": 65535
|
||||
}
|
||||
},
|
||||
"experimental": true,
|
||||
"ipv6": true,
|
||||
"fixed-cidr-v6": "fd64:1::/64",
|
||||
|
Loading…
Reference in New Issue
Block a user