Skip to content

Commit

Permalink
Pinned Antigen version
Browse files Browse the repository at this point in the history
Pinned the Antigen version to the 2.0.2 release.

Later versions suffer from the following bug: zsh-users/antigen#583
  • Loading branch information
freemanjp committed Aug 15, 2018
1 parent 0879a53 commit 88ad978
Show file tree
Hide file tree
Showing 4 changed files with 61 additions and 1 deletion.
15 changes: 15 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,21 @@ Role Variables
The following variables will change the behavior of this role:

```yaml
# Antigen version number
antigen_version: '2.0.2'

# SHA256 sum for the redistributable package
antigen_redis_sha256sum: 'f47ec933b32c578abe8cb39b24e0ddd114ef5cc01b3c05bcb634859ead31493f'

# Should Oh-My-Zsh be installed with Antigen (doesn't call `antigen use`)
antigen_install_oh_my_zsh: yes

# Mirror location for Antigen download
antigen_redis_mirror: 'https://github.com/zsh-users/antigen/releases/download/v{{ antigen_version }}'

# Directory to store files downloaded for Antigen installation on the remote box
antigen_download_dir: "{{ x_ansible_download_dir | default(ansible_env.HOME + '/.ansible/tmp/downloads') }}"

# Antigen is installed per user so you need to specify the users to install it for
users:
- username: # The username of the user to install Antigen for
Expand Down
12 changes: 12 additions & 0 deletions defaults/main.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,15 @@
---
# Antigen version number
antigen_version: '2.0.2'

# SHA256 sum for the redistributable package
antigen_redis_sha256sum: 'f47ec933b32c578abe8cb39b24e0ddd114ef5cc01b3c05bcb634859ead31493f'

# Should Oh-My-Zsh be installed with Antigen (doesn't call `antigen use`)
antigen_install_oh_my_zsh: yes

# Mirror location for Antigen download
antigen_redis_mirror: 'https://github.com/zsh-users/antigen/releases/download/v{{ antigen_version }}'

# Directory to store files downloaded for Antigen installation on the remote box
antigen_download_dir: "{{ x_ansible_download_dir | default(ansible_env.HOME + '/.ansible/tmp/downloads') }}"
25 changes: 25 additions & 0 deletions tasks/install.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,31 @@
- git
- zsh

- name: create download directory
file:
state: directory
mode: 'u=rwx,go=rx'
dest: '{{ antigen_download_dir }}'

- name: download Antigen
get_url:
url: '{{ antigen_redis_mirror }}/{{ antigen_redis_filename }}'
dest: '{{ antigen_download_dir }}/{{ antigen_local_filename }}'
sha256sum: '{{ antigen_redis_sha256sum }}'
mode: 'u=rw,go=r'

- name: install Antigen
become: yes
unarchive:
src: '{{ antigen_download_dir }}/{{ antigen_local_filename }}'
remote_src: yes
dest: '~{{ item.username }}/.antigen'
creates: '~{{ item.username }}/.antigen/antigen.zsh'
owner: root
group: root
mode: 'go-w'
with_items: '{{ users }}'

- name: clone antigen for users
tags:
# Suppress warning: [ANSIBLE0006] git used in place of git module
Expand Down
10 changes: 9 additions & 1 deletion vars/main.yml
Original file line number Diff line number Diff line change
@@ -1,2 +1,10 @@
---
# vars file for ansible_role_antigen
# The root folder of this Antigen installation
antigen_home: '~/.antigen'

# File name for the Antigen redistributable installation file
antigen_redis_filename: 'v{{ antigen_version }}.tar.gz'

# Local file name for the Antigen redistributable installation file (needs to
# have the package name to avoid conflicts)
antigen_local_filename: 'antigen-{{ antigen_version }}.tar.gz'

0 comments on commit 88ad978

Please sign in to comment.