-
-
Notifications
You must be signed in to change notification settings - Fork 1
/
base.yml
119 lines (111 loc) · 3.22 KB
/
base.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
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
---
- name: Base setup
hosts: localhost
become: true
roles:
- role: github_cli
vars:
github_cli_file: linux_amd64.deb
tasks:
# Needed to skip snap installation in docker container
- name: Get facts on current container, if any
community.docker.current_container_facts:
- name: Add ppas
ansible.builtin.apt_repository:
repo: "{{ item }}"
with_items:
- ppa:neovim-ppa/unstable
- ppa:aslatter/ppa
- name: Install base APT packages
ansible.builtin.apt:
pkg:
- alacritty
- autorandr
- build-essential
- cmake
- libglib2.0-dev
- libssl-dev
- lxappearance
- xsel
- xclip
- xbindkeys
- slock
- zsh
- arandr
- tmux
- git
- feh
- htop
- fontconfig
- curl
- ripgrep
- at
- tree
- scrot
- firejail
- shellcheck
- neovim
- pulsemixer
- fonts-noto-color-emoji
- rofi
- xdg-utils
- desktop-file-utils
- snapd
state: present
- name: Remove specific APT packages
ansible.builtin.apt:
pkg:
- dc
- xscreensaver
- transmission-gtk
- thunderbird
- pidgin
state: absent
- name: Install Snap packages
community.general.snap:
name:
- code
- obsidian
classic: true
when: not ansible_module_running_in_container
- name: Set zsh as default shell
ansible.builtin.user:
name: "{{ lookup('env', 'USER') }}"
shell: /bin/zsh
append: true
- name: Setup zsh-autosuggestions
ansible.builtin.git:
repo: https://github.com/zsh-users/zsh-autosuggestions
dest: "{{ lookup('env', 'HOME') }}/.zsh/zsh-autosuggestions"
update: false
single_branch: yes
version: v0.7.0
changed_when: false
- name: Set nvim as vi alternative
ansible.builtin.command: update-alternatives --install /usr/bin/vi vi /usr/bin/nvim 60
changed_when: false
- name: Set nvim as vim alternative
ansible.builtin.command: update-alternatives --install /usr/bin/vim vim /usr/bin/nvim 60
changed_when: false
- name: Set nvim as editor alternative
ansible.builtin.command: update-alternatives --install /usr/bin/editor editor /usr/bin/nvim 60
changed_when: false
- name: Install python packages for neovim
ansible.builtin.apt:
pkg: python3-neovim
# Integrate git with libsecret
- name: Install libsecret
ansible.builtin.apt:
pkg:
- libsecret-1-0
- libsecret-1-dev
state: present
update_cache: true
- name: Check for libsecret Makefile
ansible.builtin.stat:
path: /usr/share/doc/git/contrib/credential/libsecret/Makefile
register: makefile_present
- name: Make libsecret git credential helper
ansible.builtin.command: make chdir=/usr/share/doc/git/contrib/credential/libsecret
when: makefile_present.stat.exists
changed_when: false # noqa no-changed-when