Skip to content

Commit 126f1d2

Browse files
authored
unixPb: Set corefile size on MacOS to unlimited (#4067)
* unixPb: Set corefile size on MacOS to unlimited * Add write command * trailing spaces * Remove kernel tuning tag * Add become: true to file creation * Set limit to 8G instead of unlimited
1 parent 9d9d526 commit 126f1d2

File tree

1 file changed

+33
-0
lines changed
  • ansible/playbooks/AdoptOpenJDK_Unix_Playbook/roles/Common/tasks

1 file changed

+33
-0
lines changed

ansible/playbooks/AdoptOpenJDK_Unix_Playbook/roles/Common/tasks/MacOSX.yml

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -228,6 +228,39 @@
228228
tags:
229229
- core_dumps
230230

231+
- name: Create limit.core.plist file in /Library/LaunchDaemons
232+
copy:
233+
dest: /Library/LaunchDaemons/limit.core.plist
234+
owner: root
235+
group: wheel
236+
mode: 0644
237+
content: |
238+
<?xml version="1.0" encoding="UTF-8"?>
239+
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN"
240+
"http://www.apple.com/DTDs/PropertyList-1.0.dtd">
241+
<plist version="1.0">
242+
<dict>
243+
<key>Label</key>
244+
<string>limit.core</string>
245+
<key>ProgramArguments</key>
246+
<array>
247+
<string>launchctl</string>
248+
<string>limit</string>
249+
<string>core</string>
250+
<string>8388608</string>
251+
<string>8388608</string>
252+
</array>
253+
<key>RunAtLoad</key>
254+
<true/>
255+
<key>ServiceIPC</key>
256+
<false/>
257+
</dict>
258+
</plist>
259+
become: true
260+
261+
- name: Load limit.core.plist file with launchctl
262+
command: sudo launchctl load -w /Library/LaunchDaemons/limit.core.plist
263+
231264
# Skipping linting as not to introduce handlers into task-only playbooks (lint error 503)
232265
- name: Reboot macOS after tweaking kernel tuning parameters
233266
reboot:

0 commit comments

Comments
 (0)