From d1bd103ec6d62f6957846f516724b4a095f16b0a Mon Sep 17 00:00:00 2001 From: Mahdi Ardekanian Date: Sun, 29 Sep 2024 21:29:03 -0400 Subject: [PATCH] unixPB: adds `become: true` to all kernel config related tasks in macos, touching `/etc/sysctl.conf`, puting content in it or rebooting system is what needs scallated priviledge because most of the time ansible user does not have enought authority to do system changes and need to use sudo. Adding `become: true` guarantee that ansible will not fail due to priviledge issue. Sigend-off-by: mahdi@ibm.com --- .../AdoptOpenJDK_Unix_Playbook/roles/Common/tasks/MacOSX.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/ansible/playbooks/AdoptOpenJDK_Unix_Playbook/roles/Common/tasks/MacOSX.yml b/ansible/playbooks/AdoptOpenJDK_Unix_Playbook/roles/Common/tasks/MacOSX.yml index ef2aa43b5e..9c0a6f8b0d 100644 --- a/ansible/playbooks/AdoptOpenJDK_Unix_Playbook/roles/Common/tasks/MacOSX.yml +++ b/ansible/playbooks/AdoptOpenJDK_Unix_Playbook/roles/Common/tasks/MacOSX.yml @@ -212,6 +212,7 @@ mode: 0644 owner: root group: wheel + become: true tags: - kernel_tuning @@ -222,6 +223,7 @@ kern.sysv.shmmax=125839605760 kern.sysv.shmall=30722560 register: kernel + become: true tags: - kernel_tuning @@ -232,6 +234,7 @@ mode: 0774 owner: root group: staff + become: true tags: - core_dumps @@ -240,6 +243,7 @@ reboot: reboot_timeout: 3600 when: kernel.changed + become: true tags: - kernel_tuning - skip_ansible_lint