ansible-antidote-role/tasks/install.yml

48 lines
1.1 KiB
YAML

---
- name: install dependencies
become: yes
package:
name:
- git
- zsh
- tar
- gzip
state: present
- name: create download directory
file:
path: "{{ antidote_download_dir }}"
state: directory
mode: "u=rwx,go=rx"
- name: download Antidote
get_url:
url: "{{ antidote_mirror }}/{{ antidote_filename }}"
dest: "{{ antidote_download_dir }}/{{ antidote_local_filename }}"
mode: "u=rw,go=r"
- name: create install directory
become: yes
become_user: "{{ username }}"
file:
path: "~{{ username }}/.antidote"
state: directory
mode: "u=rwx,go=rx"
loop: "{{ antidote_users | map(attribute='username') | list }}"
loop_control:
loop_var: username
- name: install Antidote
become: yes
unarchive:
src: "{{ antidote_download_dir }}/{{ antidote_local_filename }}"
remote_src: yes
dest: "~{{ username }}/.antidote"
extra_opts:
- "--strip-components=1"
owner: "{{ username }}"
mode: "go-w"
loop: "{{ antidote_users | map(attribute='username') | list }}"
loop_control:
loop_var: username