-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpc-config.yml
94 lines (87 loc) · 2.77 KB
/
pc-config.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
94
## Remember to call it with extra vars
# Launch command
# ansible-playbook pc-config.yml --extra-vars "account='$USER'" --ask-become-pass
---
- name: include update.yml
ansible.builtin.import_playbook: update.yml
- name: include tools.yml
ansible.builtin.import_playbook: tools.yml
- name: include environment.yml
ansible.builtin.import_playbook: environment.yml
vars:
zdotdir: ~/.config/zsh
- hosts: localhost
gather_facts: yes
become: yes
tasks:
# Development
- name: install node
pacman:
name: ['nodejs', 'npm']
when: '"Arch" in ansible_distribution'
- name: install Node Version Manager (Arch)
shell: curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.2/install.sh | bash
become_user: "{{ account }}"
when: '"Arch" in ansible_distribution'
- name: install Node Version Manager (Mac)
homebrew:
name: nvm
state: present
when: '"MacOSX" in ansible_distribution'
become_user: "{{ account }}"
- name: install nvim (Arch)
pacman: name=neovim
when: '"Arch" in ansible_distribution'
- name: install nvim (Mac)
homebrew:
name: neovim
state: present
when: '"MacOSX" in ansible_distribution'
become_user: "{{ account }}"
- name: install fira code release
pacman: name=ttf-fira-code
when: '"Arch" in ansible_distribution'
- name: create directory fonts if not present
file:
path: ~/.local/share/fonts/nerd-fonts
state: directory
mode: 0775
recurse: yes
become: true
become_user: "{{ account }}"
- name: install fonts
ansible.builtin.get_url:
url: https://github.com/ryanoasis/nerd-fonts/raw/refs/tags/v2.3.3/patched-fonts/FiraCode/Regular/complete/Fira%20Code%20Regular%20Nerd%20Font%20Complete.ttf
dest: "~/.local/share/fonts/nerd-fonts/Fira Code Regular Nerd Font Complete.ttf"
become: true
become_user: "{{ account }}"
- name: install database management
pacman: name=dbeaver
when: '"Arch" in ansible_distribution'
# Environment
- name: install browser
pacman: name=chromium
when: '"Arch" in ansible_distribution'
- name: install polybar
pacman: name=polybar
when: '"Arch" in ansible_distribution'
- name: install rofi launcher
pacman: name=rofi
when: '"Arch" in ansible_distribution'
- name: install TMUX (Arch)
pacman: name=tmux
when: '"Arch" in ansible_distribution'
- name: install TMUX (MAC)
homebrew:
name: tmux
state: present
when: '"MacOSX" in ansible_distribution'
become_user: "{{ account }}"
- name: install TMUX plugin manager
ansible.builtin.git:
repo: https://github.com/tmux-plugins/tpm
dest: $HOME/.config/tmux/plugins/tpm
single_branch: yes
version: master
become: true
become_user: "{{ account }}"