Handle dotfiles with ansible
This commit is contained in:
29
dotfiles.yml
Normal file
29
dotfiles.yml
Normal file
@@ -0,0 +1,29 @@
|
|||||||
|
dotfiles:
|
||||||
|
- from: autostart
|
||||||
|
to: .autostart
|
||||||
|
- from: git/gitconfig
|
||||||
|
to: .gitconfig
|
||||||
|
- from: gnupg/dirmngr.conf
|
||||||
|
to: .gnupg/dirmngr.conf
|
||||||
|
- from: gnupg/gpg-agent.conf
|
||||||
|
to: .gnupg/gpg-agent.conf
|
||||||
|
- from: gnupg/gpg.conf
|
||||||
|
to: .gnupg/gpg.conf
|
||||||
|
- from: i3
|
||||||
|
to: .i3
|
||||||
|
- from: tmux/tmux.conf
|
||||||
|
to: .tmux.conf
|
||||||
|
- from: vim/vimrc
|
||||||
|
to: .config/nvim/init.vim
|
||||||
|
- from: vim/vimrc
|
||||||
|
to: .vimrc
|
||||||
|
- from: x/Xresources
|
||||||
|
to: .Xresources
|
||||||
|
- from: x/xinitrc
|
||||||
|
to: .xinitrc
|
||||||
|
- from: zsh/zprofile
|
||||||
|
to: .zprofile
|
||||||
|
- from: zsh/zshrc
|
||||||
|
to: .zshrc
|
||||||
|
- from: zsh/zshrc.d
|
||||||
|
to: .zshrc.d
|
||||||
20
playbook.yml
20
playbook.yml
@@ -115,8 +115,24 @@
|
|||||||
ExecStart=-/sbin/agetty --autologin {{ user }} --noclear %I $TERM
|
ExecStart=-/sbin/agetty --autologin {{ user }} --noclear %I $TERM
|
||||||
become: true
|
become: true
|
||||||
|
|
||||||
- name: run dotbot
|
- name: load dotfile list
|
||||||
command: ./dotbot
|
include_vars:
|
||||||
|
file: dotfiles.yml
|
||||||
|
|
||||||
|
- name: link this folder to ~/.dotfiles
|
||||||
|
file:
|
||||||
|
state: link
|
||||||
|
force: true
|
||||||
|
path: "{{ ansible_user_dir }}/.dotfiles"
|
||||||
|
src: "{{ playbook_dir }}"
|
||||||
|
|
||||||
|
- name: link dotfiles
|
||||||
|
file:
|
||||||
|
state: link
|
||||||
|
force: true
|
||||||
|
path: "{{ ansible_user_dir }}/{{ item.to }}"
|
||||||
|
src: ~/.dotfiles/{{ item.from }}
|
||||||
|
with_items: "{{ dotfiles }}"
|
||||||
|
|
||||||
- name: create directories
|
- name: create directories
|
||||||
file:
|
file:
|
||||||
|
|||||||
Reference in New Issue
Block a user