-
Notifications
You must be signed in to change notification settings - Fork 0
/
playbook.yml
93 lines (93 loc) · 4.02 KB
/
playbook.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
# vim: ft=yaml.ansible
---
- name: "manage dotfiles"
hosts: localhost
tasks:
- name: "Dotfiles - folder structure"
tags:
- dotfiles
- prereqs
block:
- name: "Ensure ~/.config folder is present"
ansible.builtin.file:
dest: "~/.config"
state: directory
- name: "Dotfiles - tmux: ensure tpm is present"
ansible.builtin.git:
repo: "https://github.com/tmux-plugins/tpm"
dest: "~/.tmux/plugins/tpm"
clone: true
update: true
depth: 1
- name: "Symlink i3 configuration"
when:
- dotfiles.using_i3 is defined
- dotfiles.using_i3 | bool
ansible.builtin.file:
src: "{{ playbook_dir }}/files/{{ item.src }}"
dest: "{{ item.dest }}"
state: "{{ item.state }}"
force: true
loop:
- {state: "link", src: ".config/i3", dest: "~/.config/i3"}
- {state: "link", src: ".config/avizo", dest: "~/.config/avizo"}
- {state: "link", src: ".config/fontconfig", dest: "~/.config/fontconfig"}
- {state: "link", src: ".config/rofi", dest: "~/.config/rofi"}
- {state: "link", src: ".config/fusuma", dest: "~/.config/fusuma"}
- {state: "link", src: ".config/tmuxp", dest: "~/.config/tmuxp"}
- {state: "link", src: ".config/dunst", dest: "~/.config/dunst"}
- {state: "link", src: ".config/conky", dest: "~/.config/conky"}
- {state: "link", src: ".config/picom.conf", dest: "~/.config/picom.conf"}
tags:
- dotfiles
- link
- name: "symlink sway configuration"
when:
- dotfiles.sway is defined
- dotfiles.sway | bool
ansible.builtin.file:
src: "{{ playbook_dir }}/files/{{ item.src }}"
dest: "{{ item.dest }}"
state: "{{ item.state }}"
force: true
loop:
- {state: "link", src: ".config/avizo", dest: "~/.config/avizo"}
- {state: "link", src: ".config/fontconfig", dest: "~/.config/fontconfig"}
- {state: "link", src: ".config/sway", dest: "~/.config/sway"}
- {state: "link", src: ".config/mako", dest: "~/.config/mako"}
- {state: "link", src: ".config/swayidle", dest: "~/.config/swayidle"}
- {state: "link", src: ".config/swaylock", dest: "~/.config/swaylock"}
- {state: "link", src: ".config/waybar", dest: "~/.config/waybar"}
- {state: "link", src: ".config/rofi", dest: "~/.config/rofi"}
- {state: "link", src: ".config/fusuma", dest: "~/.config/fusuma"}
- {state: "link", src: ".config/conky", dest: "~/.config/conky"}
tags:
- dotfiles
- link
- name: "symlink user dotfiles"
file:
src: "{{ playbook_dir }}/files/{{ item.src }}"
dest: "{{ item.dest }}"
state: "{{ item.state }}"
force: true
loop:
- {state: "link", src: ".shell_env", dest: "~/.shell_env"}
- {state: "link", src: ".bash_profile", dest: "~/.bash_profile"}
- {state: "link", src: ".bash_env", dest: "~/.bash_env"}
- {state: "link", src: ".bashrc", dest: "~/.bashrc"}
- {state: "link", src: ".zshenv", dest: "~/.zshenv"}
- {state: "link", src: ".zshrc", dest: "~/.zshrc"}
- {state: "link", src: ".aliases", dest: "~/.aliases"}
- {state: "link", src: ".tmux.conf", dest: "~/.tmux.conf"}
- {state: "link", src: ".vimrc", dest: "~/.vimrc"}
- {state: "link", src: ".config/nvim", dest: "~/.config/nvim"}
- {state: "link", src: ".config/starship-dark.toml", dest: "~/.config/starship-dark.toml"}
- {state: "link", src: ".config/starship-light.toml", dest: "~/.config/starship-light.toml"}
- {state: "link", src: ".config/tmuxp", dest: "~/.config/tmuxp"}
- {state: "link", src: ".config/k9s", dest: "~/.config/k9s"}
- {state: "link", src: ".config/alacritty", dest: "~/.config/alacritty"}
- {state: "link", src: ".scripts", dest: "~/.scripts"}
- {state: "link", src: ".gitconfig", dest: "~/.gitconfig"}
tags:
- dotfiles
- link