2022-11-20 18:55:05 +01:00
|
|
|
---
|
2022-12-29 16:07:16 +01:00
|
|
|
- name: Install dependencies
|
|
|
|
become: true
|
|
|
|
ansible.builtin.package:
|
2022-11-20 18:55:05 +01:00
|
|
|
name:
|
|
|
|
- git
|
|
|
|
- zsh
|
|
|
|
- tar
|
|
|
|
- gzip
|
|
|
|
state: present
|
|
|
|
|
2022-12-29 16:07:16 +01:00
|
|
|
- name: Create download directory
|
|
|
|
ansible.builtin.file:
|
2022-11-20 18:55:05 +01:00
|
|
|
path: "{{ antidote_download_dir }}"
|
|
|
|
state: directory
|
|
|
|
mode: "u=rwx,go=rx"
|
|
|
|
|
2022-12-29 16:07:16 +01:00
|
|
|
- name: Download Antidote
|
|
|
|
ansible.builtin.get_url:
|
2022-11-20 18:55:05 +01:00
|
|
|
url: "{{ antidote_mirror }}/{{ antidote_filename }}"
|
|
|
|
dest: "{{ antidote_download_dir }}/{{ antidote_local_filename }}"
|
|
|
|
mode: "u=rw,go=r"
|
|
|
|
|
2022-12-29 16:07:16 +01:00
|
|
|
- name: Create install directory
|
|
|
|
become: true
|
2022-11-20 18:55:05 +01:00
|
|
|
become_user: "{{ username }}"
|
2022-12-29 16:07:16 +01:00
|
|
|
ansible.builtin.file:
|
2022-11-20 18:55:05 +01:00
|
|
|
path: "~{{ username }}/.antidote"
|
|
|
|
state: directory
|
|
|
|
mode: "u=rwx,go=rx"
|
2022-11-20 18:59:29 +01:00
|
|
|
loop: "{{ antidote_users | map(attribute='username') | list }}"
|
2022-11-20 18:55:05 +01:00
|
|
|
loop_control:
|
|
|
|
loop_var: username
|
|
|
|
|
2022-12-29 16:07:16 +01:00
|
|
|
- name: Install Antidote
|
|
|
|
become: true
|
|
|
|
ansible.builtin.unarchive:
|
2022-11-20 18:55:05 +01:00
|
|
|
src: "{{ antidote_download_dir }}/{{ antidote_local_filename }}"
|
2022-12-29 16:07:16 +01:00
|
|
|
remote_src: true
|
2022-11-20 18:55:05 +01:00
|
|
|
dest: "~{{ username }}/.antidote"
|
|
|
|
extra_opts:
|
|
|
|
- "--strip-components=1"
|
|
|
|
owner: "{{ username }}"
|
|
|
|
mode: "go-w"
|
2022-11-20 18:59:29 +01:00
|
|
|
loop: "{{ antidote_users | map(attribute='username') | list }}"
|
2022-11-20 18:55:05 +01:00
|
|
|
loop_control:
|
|
|
|
loop_var: username
|