feat: FULL DEPLOY, LETS GOOOO
This commit is contained in:
parent
6fcf74d885
commit
f8cec5c3ea
@ -17,3 +17,6 @@
|
||||
- role: nvim
|
||||
tags:
|
||||
- nvim
|
||||
- role: deploy-files
|
||||
tags:
|
||||
- deploy
|
||||
|
@ -1,2 +1,8 @@
|
||||
---
|
||||
# defaults file for deploy-files
|
||||
dots_repo: https://gitlab.orion-technologies.io/philler/dots.git
|
||||
deploy_path: "{{ ansible_env.HOME }}/.dot_files"
|
||||
dots_path: "{{ deploy_path }}/dots"
|
||||
dot_file_deploys:
|
||||
- path: "{{ dots_path }}/.config"
|
||||
- path: "{{ dots_path }}/.nvim-environments"
|
||||
|
@ -1,2 +1,37 @@
|
||||
---
|
||||
# tasks file for deploy-files
|
||||
- name: Get dot files from git
|
||||
# noqa git-latest
|
||||
ansible.builtin.git:
|
||||
repo: "{{ dots_repo }}"
|
||||
recursive: true
|
||||
dest: "{{ deploy_path }}"
|
||||
update: true
|
||||
version: HEAD
|
||||
|
||||
- name: Find all dot files in given paths
|
||||
ansible.builtin.find:
|
||||
paths: "{{ item.paths }}"
|
||||
hidden: true
|
||||
file_type: "{{ item.file_type }}"
|
||||
patterns:
|
||||
- "*"
|
||||
- ".*"
|
||||
register: dot_files_found
|
||||
loop:
|
||||
- file_type: file
|
||||
paths: "{{ dots_path }}/"
|
||||
- file_type: any
|
||||
paths: "{{ dots_path }}/.local/share/"
|
||||
|
||||
- name: Extract file paths to variable
|
||||
ansible.builtin.set_fact:
|
||||
dot_file_deploys: "{{ item.files + dot_file_deploys }}"
|
||||
loop: "{{ dot_files_found.results }}"
|
||||
|
||||
- name: Deploy symlinks
|
||||
ansible.builtin.file:
|
||||
state: link
|
||||
src: "{{ item.path }}"
|
||||
path: "{{ ansible_env.HOME }}/{{ item.path | replace(dots_path, '') }}"
|
||||
loop: "{{ dot_file_deploys }}"
|
||||
|
@ -5,7 +5,6 @@ xdg_bin_home: "{{ ansible_env.HOME + '/.local/bin' }}"
|
||||
xdg_data_home: "{{ ansible_env.HOME + '/.local/share' }}"
|
||||
|
||||
zsh_needed_dirs:
|
||||
- "{{ xdg_config_home }}"
|
||||
- "{{ xdg_bin_home }}"
|
||||
- "{{ xdg_data_home }}"
|
||||
|
||||
|
@ -1,4 +1,12 @@
|
||||
---
|
||||
- name: Check if distutils is installed for Debian based systems
|
||||
ansible.builtin.apt:
|
||||
name:
|
||||
- python3-apt
|
||||
- python3-distutils
|
||||
state: present
|
||||
when: ansible_facts.os_family == 'Debian'
|
||||
|
||||
- name: Check if poetry is installed
|
||||
ansible.builtin.stat:
|
||||
path: "{{ ansible_env.HOME }}/.local/share/pypoetry"
|
||||
|
@ -18,22 +18,3 @@
|
||||
depth: 1
|
||||
tags:
|
||||
- fzf
|
||||
- prereq
|
||||
|
||||
- name: Check if FZF shell files have been generated
|
||||
ansible.builtin.stat:
|
||||
path: "{{ xdg_config_home }}/fzf"
|
||||
register: fzf_shell_exists
|
||||
|
||||
- name: Install FZF
|
||||
when: not fzf_shell_exists.stat.exists
|
||||
ansible.builtin.command:
|
||||
argv:
|
||||
- "{{ fzf_install_path }}/install"
|
||||
- --key-bindings
|
||||
- --completion
|
||||
- --no-update-rc
|
||||
- --xdg
|
||||
tags:
|
||||
- fzf
|
||||
- prereq
|
||||
|
Loading…
Reference in New Issue
Block a user