-
Notifications
You must be signed in to change notification settings - Fork 3
/
playbook.yml
63 lines (60 loc) · 2.17 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
---
- name: 'Sync and refresh existing installation'
hosts: all
become: true
tasks:
- name: Sync
shell: "pacman -Sy"
- name: Update keyring
shell: "pacman -S archlinux-keyring --noconfirm"
- name: Update all packages
shell: "pacman -Syu --noconfirm"
- name: 'Install packages'
hosts: all
become: true
tasks:
- name: Install iptables-nft
shell: "yes | pacman -S --needed iptables-nft"
- name: Install packages from package list
become: false
shell: |
yes | sudo pacman -S --needed - < /home/{{ username }}/pkglist.txt --noconfirm
rm /home/{{ username }}/pkglist.txt
- name: Install yay
become: false
shell: |
git clone https://aur.archlinux.org/yay.git
cd yay
yes | makepkg -si
rm -rf yay
- name: Install qemu-guest-agent
shell: "sudo pacman -S --noconfirm qemu-guest-agent"
- name: 'Start and enable services'
hosts: all
become: true
tasks:
- name: Enable Qemu guest agent
shell: "systemctl enable qemu-guest-agent"
- name: Enable Docker
shell: "systemctl enable docker"
- name: 'Install zsh along with theme'
hosts: all
become: false
tasks:
- name: Install zsh
shell: "sudo pacman -S --noconfirm zsh"
- name: Install theme dependencies
shell: |
sh -c "$(wget -O- https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
git clone https://github.com/zsh-users/zsh-autosuggestions ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-autosuggestions
git clone https://github.com/zsh-users/zsh-history-substring-search ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-history-substring-search
git clone https://github.com/zsh-users/zsh-syntax-highlighting.git ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-syntax-highlighting
- name: Copy theme settings
shell: |
git clone https://github.com/Naman1997/Terminal-themes.git
cp Terminal-themes/zsh/.z* /home/{{ username }}/
rm -rf Terminal-themes/
- name: Set login shell as zsh
ansible.builtin.command: usermod --shell /bin/zsh {{ username }}
become: true
changed_when: false