Ansible_workstation/roles/user/tasks/dotfiles.yml

29 lines
698 B
YAML
Raw Permalink Normal View History

2022-01-12 05:06:12 +00:00
---
2022-03-04 04:56:37 +00:00
- name: Install os-specific packages
include_tasks: "{{ ansible_os_family | lower }}.yml"
2022-01-12 05:06:12 +00:00
- name: Clone dotfiles
ansible.builtin.git:
repo: "{{ user.config.giturl }}"
dest: "/home/{{ user.username }}/.dotfiles"
2022-03-04 04:56:37 +00:00
become: true
become_user: "{{ user.username }}"
2022-01-12 05:06:12 +00:00
- name: stow configs
ansible.builtin.command:
cmd: stow {{ item }}
chdir: "/home/{{ user.username }}/.dotfiles"
with_items: "{{ user.config.stowing }}"
2022-01-12 14:04:28 +00:00
- 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'
- name: init sway
import_tasks: sway.yml
when: '"sway" in user.config.stowing'