diff --git a/roles/extra/kind/tasks/main.yaml b/roles/extra/kind/tasks/main.yaml index 851c067b..93eabc2e 100644 --- a/roles/extra/kind/tasks/main.yaml +++ b/roles/extra/kind/tasks/main.yaml @@ -73,3 +73,25 @@ shell: | sysctl -w fs.inotify.max_user_watches=5242880 sysctl -w fs.inotify.max_user_instances=1280 + +# NOTE: taking advice from https://github.com/kubernetes-sigs/kind/issues/2896#issuecomment-1226184890 +- name: Create containers configuration file if not exists + become: true + file: + path: /etc/containers/containers.conf + state: touched + +- name: Set the containers section + become: true + lineinfile: + path: /etc/containers/containers.conf + regexp: "^[containers]" + line: "[containers]" + +- name: Set the podman limit + become: true + lineinfile: + path: /etc/containers/containers.conf + regexp: "^pids_limit" + line: "pids_limit=0" + insertafter: "[containers]"