ansible-antidote-role/tasks/install.yml
2022-12-29 16:07:16 +01:00

48 lines
1.2 KiB
YAML

---
- name: Install dependencies
become: true
ansible.builtin.package:
name:
- git
- zsh
- tar
- gzip
state: present
- name: Create download directory
ansible.builtin.file:
path: "{{ antidote_download_dir }}"
state: directory
mode: "u=rwx,go=rx"
- name: Download Antidote
ansible.builtin.get_url:
url: "{{ antidote_mirror }}/{{ antidote_filename }}"
dest: "{{ antidote_download_dir }}/{{ antidote_local_filename }}"
mode: "u=rw,go=r"
- name: Create install directory
become: true
become_user: "{{ username }}"
ansible.builtin.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: true
ansible.builtin.unarchive:
src: "{{ antidote_download_dir }}/{{ antidote_local_filename }}"
remote_src: true
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