This commit is contained in:
Simon Bruder 2018-10-12 20:44:28 +00:00
commit bb833e61a6
No known key found for this signature in database
GPG key ID: 6F03E0000CC5B62F
29 changed files with 315 additions and 0 deletions

1
.gitignore vendored Normal file
View file

@ -0,0 +1 @@
playbook.retry

18
playbook.yml Normal file
View 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

View file

@ -0,0 +1,3 @@
---
- name: update-grub
shell: update-grub

View 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

View file

@ -0,0 +1,8 @@
---
- import_tasks: packages.yml
tags:
- docker:packages
- import_tasks: kernel.yml
tags:
- docker:kernel

View 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

View file

@ -0,0 +1,5 @@
Section "Device"
Identifier "Intel Graphics"
Driver "intel"
Option "Backlight" "intel_backlight"
EndSection

3
roles/gui/files/lock Executable file
View file

@ -0,0 +1,3 @@
#!/bin/sh
i3lock -c 000000
xset dpms force off

View 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

Binary file not shown.

After

Width:  |  Height:  |  Size: 2 MiB

View file

@ -0,0 +1,5 @@
---
- name: install awesome
apt:
name: "awesome"
state: present

View file

@ -0,0 +1,5 @@
---
- name: install lightdm
apt:
name: "lightdm"
state: present

28
roles/gui/tasks/lock.yml Normal file
View 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
View 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

View 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
View 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

View 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

View 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

View file

@ -0,0 +1,7 @@
---
- name: install generic dependencies
apt:
name: "{{ item }}"
state: present
with_items:
- libdbus-glib-1-2

View file

@ -0,0 +1,11 @@
---
- name: install design packages
apt:
name: "{{ item }}"
state: present
with_items:
- darktable
- fonts-roboto
- fonts-texgyre
- gimp
- inkscape

View 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

View 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

View file

@ -0,0 +1,9 @@
---
- name: install network packages
apt:
name: "{{ item }}"
state: present
with_items:
- blueman
- network-manager
- network-manager-gnome

View 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

View 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

View 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
View file

@ -0,0 +1,5 @@
---
- name: install golang
apt:
name: "golang"
state: present

View file

@ -0,0 +1,7 @@
---
- import_tasks: python.yml
tags:
- prog:python
- import_tasks: go.yml
tags:
- prog:go

View 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