From 1a5ee1e8bb1ef4eee25e1009afc7936c6485d76f Mon Sep 17 00:00:00 2001 From: Kevin V Date: Sun, 27 Dec 2020 15:54:37 -0800 Subject: [PATCH 1/6] add macos support --- tasks/install.yml | 9 +++++++++ templates/antigenrc.j2 | 4 ++++ 2 files changed, 13 insertions(+) diff --git a/tasks/install.yml b/tasks/install.yml index ea4f756..19a7bdf 100644 --- a/tasks/install.yml +++ b/tasks/install.yml @@ -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: @@ -21,6 +28,7 @@ dest: '{{ antigen_download_dir }}/{{ antigen_local_filename }}' sha256sum: '{{ antigen_redis_sha256sum }}' mode: 'u=rw,go=r' + when: ansible_os_family != 'Darwin' - name: create install directory become: yes @@ -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 diff --git a/templates/antigenrc.j2 b/templates/antigenrc.j2 index d747d41..6c16d0f 100644 --- a/templates/antigenrc.j2 +++ b/templates/antigenrc.j2 @@ -1,6 +1,10 @@ {{ ansible_managed | comment }} +{% if ansible_os_family == 'Darwin' %} +source /usr/local/share/antigen/antigen.zsh +{% else %} source $HOME/.antigen/antigen.zsh +i{% endif%} for i in ~/.antigen-etc/use.d/*.zsh; do if [ -r $i ]; then From 1a9e42673787820c046787f6061522cfacfdd239 Mon Sep 17 00:00:00 2001 From: vietcgi Date: Fri, 6 May 2022 22:18:21 -0700 Subject: [PATCH 2/6] Update antigenrc.j2 --- templates/antigenrc.j2 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/templates/antigenrc.j2 b/templates/antigenrc.j2 index 6c16d0f..dc2eb5e 100644 --- a/templates/antigenrc.j2 +++ b/templates/antigenrc.j2 @@ -1,7 +1,7 @@ {{ ansible_managed | comment }} {% if ansible_os_family == 'Darwin' %} -source /usr/local/share/antigen/antigen.zsh +source /opt/homebrew/share/antigen/antigen.zsh {% else %} source $HOME/.antigen/antigen.zsh i{% endif%} From 19e48842d2b098af10894b6d4ec2cc4968560cfb Mon Sep 17 00:00:00 2001 From: vietcgi Date: Wed, 8 Jun 2022 13:32:07 -0700 Subject: [PATCH 3/6] Update antigenrc.j2 --- templates/antigenrc.j2 | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/templates/antigenrc.j2 b/templates/antigenrc.j2 index dc2eb5e..974df0f 100644 --- a/templates/antigenrc.j2 +++ b/templates/antigenrc.j2 @@ -1,10 +1,12 @@ {{ ansible_managed | comment }} -{% if ansible_os_family == 'Darwin' %} +{% if ansible_os_family == 'Darwin' && ansible_machine == 'arm64' %} +source /opt/homebrew/share/antigen/antigen.zsh +{% elif if ansible_os_family == 'Darwin' && ansible_machine == 'x86_64' %} source /opt/homebrew/share/antigen/antigen.zsh {% else %} source $HOME/.antigen/antigen.zsh -i{% endif%} +{% endif%} for i in ~/.antigen-etc/use.d/*.zsh; do if [ -r $i ]; then From ee94b1357759e5d00f63de7a306cdbdb8c7a4566 Mon Sep 17 00:00:00 2001 From: vietcgi Date: Wed, 8 Jun 2022 13:32:38 -0700 Subject: [PATCH 4/6] Update antigenrc.j2 --- templates/antigenrc.j2 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/templates/antigenrc.j2 b/templates/antigenrc.j2 index 974df0f..f7439eb 100644 --- a/templates/antigenrc.j2 +++ b/templates/antigenrc.j2 @@ -2,7 +2,7 @@ {% if ansible_os_family == 'Darwin' && ansible_machine == 'arm64' %} source /opt/homebrew/share/antigen/antigen.zsh -{% elif if ansible_os_family == 'Darwin' && ansible_machine == 'x86_64' %} +{% elif ansible_os_family == 'Darwin' && ansible_machine == 'x86_64' %} source /opt/homebrew/share/antigen/antigen.zsh {% else %} source $HOME/.antigen/antigen.zsh From 5214c4423e504965c842e1bb31cb9f0e3519196b Mon Sep 17 00:00:00 2001 From: vietcgi Date: Wed, 8 Jun 2022 13:48:02 -0700 Subject: [PATCH 5/6] Update antigenrc.j2 --- templates/antigenrc.j2 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/templates/antigenrc.j2 b/templates/antigenrc.j2 index f7439eb..f674e9b 100644 --- a/templates/antigenrc.j2 +++ b/templates/antigenrc.j2 @@ -3,7 +3,7 @@ {% if ansible_os_family == 'Darwin' && ansible_machine == 'arm64' %} source /opt/homebrew/share/antigen/antigen.zsh {% elif ansible_os_family == 'Darwin' && ansible_machine == 'x86_64' %} -source /opt/homebrew/share/antigen/antigen.zsh +source /usr/local/share/antigen/antigen.zsh {% else %} source $HOME/.antigen/antigen.zsh {% endif%} From a9b2f10e97cfc02b9917cfde08b96261024dd6f2 Mon Sep 17 00:00:00 2001 From: vietcgi Date: Wed, 8 Jun 2022 14:04:43 -0700 Subject: [PATCH 6/6] Update antigenrc.j2 --- templates/antigenrc.j2 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/templates/antigenrc.j2 b/templates/antigenrc.j2 index f674e9b..af0cf9f 100644 --- a/templates/antigenrc.j2 +++ b/templates/antigenrc.j2 @@ -1,8 +1,8 @@ {{ ansible_managed | comment }} -{% if ansible_os_family == 'Darwin' && ansible_machine == 'arm64' %} +{% if ansible_os_family == 'Darwin' and ansible_machine == 'arm64' %} source /opt/homebrew/share/antigen/antigen.zsh -{% elif ansible_os_family == 'Darwin' && ansible_machine == 'x86_64' %} +{% elif ansible_os_family == 'Darwin' and ansible_machine == 'x86_64' %} source /usr/local/share/antigen/antigen.zsh {% else %} source $HOME/.antigen/antigen.zsh