feat: FULL DEPLOY, LETS GOOOO

This commit is contained in:
Price Hiller 2022-08-02 01:34:41 -05:00
parent 6fcf74d885
commit 4d4d2468c6
5 changed files with 49 additions and 20 deletions

View File

@ -1,2 +1,8 @@
--- ---
# defaults file for deploy-files # 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"

View File

@ -1,2 +1,37 @@
--- ---
# tasks file for deploy-files # 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 }}"

View File

@ -5,7 +5,6 @@ xdg_bin_home: "{{ ansible_env.HOME + '/.local/bin' }}"
xdg_data_home: "{{ ansible_env.HOME + '/.local/share' }}" xdg_data_home: "{{ ansible_env.HOME + '/.local/share' }}"
zsh_needed_dirs: zsh_needed_dirs:
- "{{ xdg_config_home }}"
- "{{ xdg_bin_home }}" - "{{ xdg_bin_home }}"
- "{{ xdg_data_home }}" - "{{ xdg_data_home }}"

View File

@ -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 - name: Check if poetry is installed
ansible.builtin.stat: ansible.builtin.stat:
path: "{{ ansible_env.HOME }}/.local/share/pypoetry" path: "{{ ansible_env.HOME }}/.local/share/pypoetry"

View File

@ -18,22 +18,3 @@
depth: 1 depth: 1
tags: tags:
- fzf - 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