diff --git a/macOS/jenkins-node/ansible/roles/agent/tasks/main.yml b/macOS/jenkins-node/ansible/roles/agent/tasks/main.yml index ffd4a26..03a6e25 100644 --- a/macOS/jenkins-node/ansible/roles/agent/tasks/main.yml +++ b/macOS/jenkins-node/ansible/roles/agent/tasks/main.yml @@ -31,6 +31,17 @@ name: java11 state: present +- name: Symlink Java 11. + shell: ln -sfn /opt/homebrew/opt/openjdk@11/libexec/openjdk.jdk /Library/Java/JavaVirtualMachines/openjdk-11.jdk + become: true + become_user: root + +- name: Ensure that the java install has been added to the path + ansible.builtin.lineinfile: + path: ~/.zshrc + line: export PATH="/opt/homebrew/opt/openjdk@11/bin:$PATH" + create: true + # Configure macOS Settings. - name: Disable screensaver.