From 91f1d38f847ec85f30edc9ec0dc539ab78af880e 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. Signed-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