Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

make the binary path of brew accessible outside role context #99 #100

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions roles/homebrew/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,22 @@ Any additional folders inside `homebrew_prefix` for which to ensure homebrew use
roles:
- geerlingguy.mac.homebrew

## Example of including role

- hosts: localhost
tasks:
- name: Install Homebrew + OpenJDK
ansible.builtin.include_role:
name: geerlingguy.mac.homebrew
vars:
homebrew_installed_packages:
- openjdk@17
- name: Symlink OpenJDK to system-wide Java VMs
ansible.builtin.file:
state: link
src: "{{ homebrew_prefix }}/opt/openjdk@17/libexec/openjdk.jdk"
dest: /Library/Java/JavaVirtualMachines/openjdk-17.jdk

See the `tests/local-testing` directory for an example of running this role over
Ansible's `local` connection. See also:
[Mac Development Ansible Playbook][mac-dev-playbook].
Expand Down
1 change: 1 addition & 0 deletions roles/homebrew/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
set_fact:
homebrew_user: '{{ homebrew_user | default(ansible_user_id) }}'
homebrew_group: '{{ homebrew_group | default(ansible_user_gid) }}'
homebrew_prefix: '{{ homebrew_prefix }}'

# Homebrew setup prerequisites.
- name: Ensure Homebrew parent directory has correct permissions (M1).
Expand Down
Loading