init
This commit is contained in:
commit
bb833e61a6
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
|
@ -0,0 +1 @@
|
||||||
|
playbook.retry
|
18
playbook.yml
Normal file
18
playbook.yml
Normal file
|
@ -0,0 +1,18 @@
|
||||||
|
---
|
||||||
|
- hosts: 127.0.0.1
|
||||||
|
connection: local
|
||||||
|
become: yes
|
||||||
|
any_errors_fatal: yes
|
||||||
|
roles:
|
||||||
|
- role: packages
|
||||||
|
tags:
|
||||||
|
- packages
|
||||||
|
- role: gui
|
||||||
|
tags:
|
||||||
|
- gui
|
||||||
|
- role: prog
|
||||||
|
tags:
|
||||||
|
- prog
|
||||||
|
- role: docker
|
||||||
|
tags:
|
||||||
|
- docker
|
3
roles/docker/handlers/main.yml
Normal file
3
roles/docker/handlers/main.yml
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
---
|
||||||
|
- name: update-grub
|
||||||
|
shell: update-grub
|
7
roles/docker/tasks/kernel.yml
Normal file
7
roles/docker/tasks/kernel.yml
Normal file
|
@ -0,0 +1,7 @@
|
||||||
|
---
|
||||||
|
- name: add boot parameters for docker
|
||||||
|
lineinfile:
|
||||||
|
path: /etc/default/grub
|
||||||
|
regexp: '^GRUB_CMDLINE_LINUX_DEFAULT='
|
||||||
|
line: 'GRUB_CMDLINE_LINUX_DEFAULT="quiet cgroup_enable=memory swapaccount=1"'
|
||||||
|
notify: update-grub
|
8
roles/docker/tasks/main.yml
Normal file
8
roles/docker/tasks/main.yml
Normal file
|
@ -0,0 +1,8 @@
|
||||||
|
---
|
||||||
|
- import_tasks: packages.yml
|
||||||
|
tags:
|
||||||
|
- docker:packages
|
||||||
|
|
||||||
|
- import_tasks: kernel.yml
|
||||||
|
tags:
|
||||||
|
- docker:kernel
|
21
roles/docker/tasks/packages.yml
Normal file
21
roles/docker/tasks/packages.yml
Normal file
|
@ -0,0 +1,21 @@
|
||||||
|
---
|
||||||
|
- name: install docker dependencies
|
||||||
|
apt:
|
||||||
|
name: "apt-transport-https"
|
||||||
|
state: present
|
||||||
|
|
||||||
|
- name: add docker repository key
|
||||||
|
apt_key:
|
||||||
|
url: https://download.docker.com/linux/debian/gpg
|
||||||
|
state: present
|
||||||
|
|
||||||
|
- name: add docker repository
|
||||||
|
apt_repository:
|
||||||
|
repo: deb https://download.docker.com/linux/debian buster stable
|
||||||
|
state: present
|
||||||
|
|
||||||
|
- name: install docker
|
||||||
|
apt:
|
||||||
|
name: "docker-ce"
|
||||||
|
update_cache: yes
|
||||||
|
state: present
|
5
roles/gui/files/20-intel.conf
Normal file
5
roles/gui/files/20-intel.conf
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
Section "Device"
|
||||||
|
Identifier "Intel Graphics"
|
||||||
|
Driver "intel"
|
||||||
|
Option "Backlight" "intel_backlight"
|
||||||
|
EndSection
|
3
roles/gui/files/lock
Executable file
3
roles/gui/files/lock
Executable file
|
@ -0,0 +1,3 @@
|
||||||
|
#!/bin/sh
|
||||||
|
i3lock -c 000000
|
||||||
|
xset dpms force off
|
12
roles/gui/files/lock.service
Normal file
12
roles/gui/files/lock.service
Normal file
|
@ -0,0 +1,12 @@
|
||||||
|
[Unit]
|
||||||
|
Description=Lock X session
|
||||||
|
Before=sleep.target
|
||||||
|
|
||||||
|
[Service]
|
||||||
|
User=simon
|
||||||
|
Type=forking
|
||||||
|
Environment=DISPLAY=:0
|
||||||
|
ExecStart=/usr/local/bin/lock
|
||||||
|
|
||||||
|
[Install]
|
||||||
|
WantedBy=sleep.target
|
BIN
roles/gui/files/wallpaper.jpg
Normal file
BIN
roles/gui/files/wallpaper.jpg
Normal file
Binary file not shown.
After Width: | Height: | Size: 2 MiB |
5
roles/gui/tasks/awesome.yml
Normal file
5
roles/gui/tasks/awesome.yml
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
---
|
||||||
|
- name: install awesome
|
||||||
|
apt:
|
||||||
|
name: "awesome"
|
||||||
|
state: present
|
5
roles/gui/tasks/lightdm.yml
Normal file
5
roles/gui/tasks/lightdm.yml
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
---
|
||||||
|
- name: install lightdm
|
||||||
|
apt:
|
||||||
|
name: "lightdm"
|
||||||
|
state: present
|
28
roles/gui/tasks/lock.yml
Normal file
28
roles/gui/tasks/lock.yml
Normal file
|
@ -0,0 +1,28 @@
|
||||||
|
---
|
||||||
|
- name: install i3lock
|
||||||
|
apt:
|
||||||
|
name: "i3lock"
|
||||||
|
state: present
|
||||||
|
|
||||||
|
- name: install lock script
|
||||||
|
copy:
|
||||||
|
src: lock
|
||||||
|
dest: /usr/local/bin/lock
|
||||||
|
mode: 0755
|
||||||
|
|
||||||
|
- name: copy lock systemd service
|
||||||
|
copy:
|
||||||
|
src: lock.service
|
||||||
|
dest: /lib/systemd/system/lock.service
|
||||||
|
|
||||||
|
- name: enable lock systemd service
|
||||||
|
service:
|
||||||
|
name: lock
|
||||||
|
enabled: true
|
||||||
|
|
||||||
|
- name: susped at lid close when docked
|
||||||
|
ini_file:
|
||||||
|
path: /etc/systemd/logind.conf
|
||||||
|
section: Login
|
||||||
|
option: HandleLidSwitchDocked
|
||||||
|
value: suspend
|
16
roles/gui/tasks/main.yml
Normal file
16
roles/gui/tasks/main.yml
Normal file
|
@ -0,0 +1,16 @@
|
||||||
|
---
|
||||||
|
- import_tasks: lightdm.yml
|
||||||
|
tags:
|
||||||
|
- gui:lightdm
|
||||||
|
- import_tasks: xorg.yml
|
||||||
|
tags:
|
||||||
|
- gui:xorg
|
||||||
|
- import_tasks: awesome.yml
|
||||||
|
tags:
|
||||||
|
- gui:awesome
|
||||||
|
- import_tasks: wallpaper.yml
|
||||||
|
tags:
|
||||||
|
- gui:wallpaper
|
||||||
|
- import_tasks: lock.yml
|
||||||
|
tags:
|
||||||
|
- gui:lock
|
5
roles/gui/tasks/wallpaper.yml
Normal file
5
roles/gui/tasks/wallpaper.yml
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
---
|
||||||
|
- name: install wallpaper
|
||||||
|
copy:
|
||||||
|
src: wallpaper.jpg
|
||||||
|
dest: /usr/share/wallpapers/wallpaper.jpg
|
10
roles/gui/tasks/xorg.yml
Normal file
10
roles/gui/tasks/xorg.yml
Normal file
|
@ -0,0 +1,10 @@
|
||||||
|
---
|
||||||
|
- name: create xorg config directory
|
||||||
|
file:
|
||||||
|
path: /etc/X11/xorg.conf.d
|
||||||
|
state: directory
|
||||||
|
|
||||||
|
- name: install xorg config for backlight
|
||||||
|
copy:
|
||||||
|
src: 20-intel.conf
|
||||||
|
dest: /etc/X11/xorg.conf.d/20-intel.conf
|
18
roles/packages/tasks/base.yml
Normal file
18
roles/packages/tasks/base.yml
Normal file
|
@ -0,0 +1,18 @@
|
||||||
|
---
|
||||||
|
- name: install base packages
|
||||||
|
apt:
|
||||||
|
name: "{{ item }}"
|
||||||
|
state: present
|
||||||
|
with_items:
|
||||||
|
- git
|
||||||
|
- htop
|
||||||
|
- lm-sensors
|
||||||
|
- rxvt-unicode
|
||||||
|
- tmux
|
||||||
|
- vim-nox
|
||||||
|
- zsh
|
||||||
|
|
||||||
|
- name: set urxvt as default terminal emulator
|
||||||
|
alternatives:
|
||||||
|
name: x-terminal-emulator
|
||||||
|
path: /usr/bin/urxvt
|
10
roles/packages/tasks/communication.yml
Normal file
10
roles/packages/tasks/communication.yml
Normal file
|
@ -0,0 +1,10 @@
|
||||||
|
---
|
||||||
|
- name: install network manager
|
||||||
|
apt:
|
||||||
|
name: "{{ item }}"
|
||||||
|
state: present
|
||||||
|
with_items:
|
||||||
|
- claws-mail
|
||||||
|
- claws-mail-pgpinline
|
||||||
|
- claws-mail-pgpmime
|
||||||
|
- mumble
|
7
roles/packages/tasks/deps.yml
Normal file
7
roles/packages/tasks/deps.yml
Normal file
|
@ -0,0 +1,7 @@
|
||||||
|
---
|
||||||
|
- name: install generic dependencies
|
||||||
|
apt:
|
||||||
|
name: "{{ item }}"
|
||||||
|
state: present
|
||||||
|
with_items:
|
||||||
|
- libdbus-glib-1-2
|
11
roles/packages/tasks/design.yml
Normal file
11
roles/packages/tasks/design.yml
Normal file
|
@ -0,0 +1,11 @@
|
||||||
|
---
|
||||||
|
- name: install design packages
|
||||||
|
apt:
|
||||||
|
name: "{{ item }}"
|
||||||
|
state: present
|
||||||
|
with_items:
|
||||||
|
- darktable
|
||||||
|
- fonts-roboto
|
||||||
|
- fonts-texgyre
|
||||||
|
- gimp
|
||||||
|
- inkscape
|
28
roles/packages/tasks/main.yml
Normal file
28
roles/packages/tasks/main.yml
Normal file
|
@ -0,0 +1,28 @@
|
||||||
|
---
|
||||||
|
- import_tasks: base.yml
|
||||||
|
tags:
|
||||||
|
- packages:base
|
||||||
|
- import_tasks: tools.yml
|
||||||
|
tags:
|
||||||
|
- packages:tools
|
||||||
|
- import_tasks: deps.yml
|
||||||
|
tags:
|
||||||
|
- packages:deps
|
||||||
|
- import_tasks: media.yml
|
||||||
|
tags:
|
||||||
|
- packages:media
|
||||||
|
- import_tasks: design.yml
|
||||||
|
tags:
|
||||||
|
- packages:design
|
||||||
|
- import_tasks: communication.yml
|
||||||
|
tags:
|
||||||
|
- packages:communication
|
||||||
|
- import_tasks: office.yml
|
||||||
|
tags:
|
||||||
|
- packages:office
|
||||||
|
- import_tasks: network.yml
|
||||||
|
tags:
|
||||||
|
- packages:network
|
||||||
|
- import_tasks: web.yml
|
||||||
|
tags:
|
||||||
|
- packages:web
|
18
roles/packages/tasks/media.yml
Normal file
18
roles/packages/tasks/media.yml
Normal file
|
@ -0,0 +1,18 @@
|
||||||
|
---
|
||||||
|
- name: install media packages
|
||||||
|
apt:
|
||||||
|
name: "{{ item }}"
|
||||||
|
state: present
|
||||||
|
with_items:
|
||||||
|
- audacious
|
||||||
|
- audacity
|
||||||
|
- calibre
|
||||||
|
- eom
|
||||||
|
- jpegoptim
|
||||||
|
- mkvtoolnix
|
||||||
|
- mkvtoolnix-gui
|
||||||
|
- mpv
|
||||||
|
- pasystray
|
||||||
|
- pavucontrol
|
||||||
|
- pulseaudio
|
||||||
|
- sidplayfp
|
9
roles/packages/tasks/network.yml
Normal file
9
roles/packages/tasks/network.yml
Normal file
|
@ -0,0 +1,9 @@
|
||||||
|
---
|
||||||
|
- name: install network packages
|
||||||
|
apt:
|
||||||
|
name: "{{ item }}"
|
||||||
|
state: present
|
||||||
|
with_items:
|
||||||
|
- blueman
|
||||||
|
- network-manager
|
||||||
|
- network-manager-gnome
|
13
roles/packages/tasks/office.yml
Normal file
13
roles/packages/tasks/office.yml
Normal file
|
@ -0,0 +1,13 @@
|
||||||
|
---
|
||||||
|
- name: install office packages
|
||||||
|
apt:
|
||||||
|
name: "{{ item }}"
|
||||||
|
state: present
|
||||||
|
with_items:
|
||||||
|
- evince
|
||||||
|
- gscan2pdf
|
||||||
|
- libreoffice
|
||||||
|
- libreoffice-gtk3
|
||||||
|
- libreoffice-l10n-de
|
||||||
|
- mupdf
|
||||||
|
- texlive-full
|
19
roles/packages/tasks/tools.yml
Normal file
19
roles/packages/tasks/tools.yml
Normal file
|
@ -0,0 +1,19 @@
|
||||||
|
---
|
||||||
|
- name: installing tools
|
||||||
|
apt:
|
||||||
|
name: "{{ item }}"
|
||||||
|
state: present
|
||||||
|
with_items:
|
||||||
|
- arandr
|
||||||
|
- atool
|
||||||
|
- bmon
|
||||||
|
- dnsutils
|
||||||
|
- libnotify-bin
|
||||||
|
- mtr-tiny
|
||||||
|
- ncdu
|
||||||
|
- pass
|
||||||
|
- redshift-gtk
|
||||||
|
- ripgrep
|
||||||
|
- rsync
|
||||||
|
- thunar
|
||||||
|
- xbacklight
|
8
roles/packages/tasks/web.yml
Normal file
8
roles/packages/tasks/web.yml
Normal file
|
@ -0,0 +1,8 @@
|
||||||
|
---
|
||||||
|
- name: install web packages
|
||||||
|
apt:
|
||||||
|
name: "{{ item }}"
|
||||||
|
state: present
|
||||||
|
with_items:
|
||||||
|
- aria2
|
||||||
|
- chromium
|
5
roles/prog/tasks/go.yml
Normal file
5
roles/prog/tasks/go.yml
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
---
|
||||||
|
- name: install golang
|
||||||
|
apt:
|
||||||
|
name: "golang"
|
||||||
|
state: present
|
7
roles/prog/tasks/main.yml
Normal file
7
roles/prog/tasks/main.yml
Normal file
|
@ -0,0 +1,7 @@
|
||||||
|
---
|
||||||
|
- import_tasks: python.yml
|
||||||
|
tags:
|
||||||
|
- prog:python
|
||||||
|
- import_tasks: go.yml
|
||||||
|
tags:
|
||||||
|
- prog:go
|
15
roles/prog/tasks/python.yml
Normal file
15
roles/prog/tasks/python.yml
Normal file
|
@ -0,0 +1,15 @@
|
||||||
|
---
|
||||||
|
- name: install pip
|
||||||
|
apt:
|
||||||
|
name: "python3-pip"
|
||||||
|
state: present
|
||||||
|
|
||||||
|
- name: install python modules via pip
|
||||||
|
pip:
|
||||||
|
name: "{{ item }}"
|
||||||
|
state: present
|
||||||
|
executable: pip3
|
||||||
|
with_items:
|
||||||
|
- docker-compose
|
||||||
|
- ipython
|
||||||
|
- powerline-status
|
Reference in a new issue