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

add macos support #43

Open
wants to merge 8 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
9 changes: 9 additions & 0 deletions tasks/install.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,13 @@
- tar
- gzip
state: present
when: ansible_os_family != 'Darwin'

- name: install antigen
homebrew:
name: antigen
state: present
when: ansible_os_family == 'Darwin'

- name: create download directory
file:
Expand All @@ -21,6 +28,7 @@
dest: '{{ antigen_download_dir }}/{{ antigen_local_filename }}'
checksum: 'sha256:{{ antigen_redis_sha256sum }}'
mode: 'u=rw,go=r'
when: ansible_os_family != 'Darwin'

- name: create install directory
become: yes
Expand All @@ -47,6 +55,7 @@
loop: "{{ users | map(attribute='username') | list }}"
loop_control:
loop_var: username
when: ansible_os_family != 'Darwin'

- name: install oh-my-zsh
include_tasks: install-oh-my-zsh.yml
Expand Down
7 changes: 7 additions & 0 deletions templates/antigenrc.j2
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,14 @@ if [[ -d "$ZSH_COMPLETIONS_CACHE" ]]; then
fi
unset ZSH_COMPLETIONS_CACHE

{% if ansible_os_family == 'Darwin' and ansible_machine == 'arm64' %}
source /opt/homebrew/share/antigen/antigen.zsh
{% elif ansible_os_family == 'Darwin' and ansible_machine == 'x86_64' %}
source /usr/local/share/antigen/antigen.zsh
{% else %}

source $HOME/.antigen/antigen.zsh
{% endif%}

if [[ -d ~/.antigen-etc/use.d ]]; then
for i in ~/.antigen-etc/use.d/*.zsh; do
Expand Down