Ansible_workstation/roles/user/tasks/dotfiles.yml

26 lines
615 B
YAML

---
- name: Install os-specific packages
include_tasks: "{{ ansible_os_family | lower }}.yml"
- name: Clone dotfiles
ansible.builtin.git:
repo: "{{ user.config.giturl }}"
dest: "/home/{{ user.username }}/.dotfiles"
become: true
become_user: "{{ user.username }}"
- name: stow configs
ansible.builtin.command:
cmd: stow {{ item }}
chdir: "/home/{{ user.username }}/.dotfiles"
with_items: "{{ user.config.stowing }}"
- name: init neovim
import_tasks: neovim.yml
when: '"nvim" in user.config.stowing'
- name: init vim
import_tasks: vim.yml
when: '"vim" in user.config.stowing'