2023-11-02 19:51:54 +01:00
|
|
|
---
|
2021-06-19 16:52:28 +02:00
|
|
|
- name: Ensure directories for applications are present
|
2023-11-02 19:51:54 +01:00
|
|
|
ansible.builtin.file:
|
2021-06-19 16:52:28 +02:00
|
|
|
state: directory
|
|
|
|
path: "{{ ansible_user_dir }}/{{ item }}"
|
2023-11-02 19:51:54 +01:00
|
|
|
mode: u=rwx,g=rx,o=rx
|
2021-06-19 16:52:28 +02:00
|
|
|
with_items:
|
2023-11-02 19:51:54 +01:00
|
|
|
- .cache/zsh
|
|
|
|
- .cache/mpd
|
|
|
|
- .ssh
|
|
|
|
- .local/bin
|
|
|
|
- .ansible/collections/ansible_collections/geoffreyfrogeye
|
2021-06-19 16:52:28 +02:00
|
|
|
|
2021-06-13 14:46:01 +02:00
|
|
|
- name: Install dotfiles repository
|
2023-11-02 19:51:54 +01:00
|
|
|
ansible.builtin.git:
|
2021-06-19 16:52:28 +02:00
|
|
|
repo: "{% if has_forge_access %}git@git.frogeye.fr:{% else %}https://git.frogeye.fr/{% endif %}geoffrey/dotfiles.git"
|
2021-06-13 14:46:01 +02:00
|
|
|
dest: "{{ ansible_user_dir }}/.dotfiles"
|
2023-11-02 19:51:54 +01:00
|
|
|
update: true
|
2021-06-13 14:46:01 +02:00
|
|
|
notify: install dotfiles
|
2021-11-09 13:59:25 +01:00
|
|
|
tags: dotfiles_repo
|
2021-06-27 21:10:04 +02:00
|
|
|
# TODO Put actual dotfiles in a subdirectory of the repo, so we don't have to put everything in config
|
2021-06-13 14:46:01 +02:00
|
|
|
|
2021-06-23 21:47:42 +02:00
|
|
|
- name: Register as Ansible collection
|
2023-11-02 19:51:54 +01:00
|
|
|
ansible.builtin.file:
|
2021-06-23 21:47:42 +02:00
|
|
|
state: link
|
|
|
|
src: "{{ ansible_user_dir }}/.dotfiles/config/automatrop"
|
|
|
|
path: "{{ ansible_user_dir }}/.ansible/collections/ansible_collections/geoffreyfrogeye/automatrop"
|
|
|
|
|
2021-06-16 22:57:18 +02:00
|
|
|
- name: Install python dependencies for scripts
|
2023-11-02 19:51:54 +01:00
|
|
|
ansible.builtin.pip:
|
2021-06-16 22:57:18 +02:00
|
|
|
requirements: "{{ ansible_user_dir }}/.dotfiles/config/scripts/requirements.txt"
|
2023-11-02 19:50:00 +01:00
|
|
|
extra_args: --break-system-packages # It's fine, it's local anyways
|