Initial commit
This commit is contained in:
commit
75594b5e43
19 changed files with 182 additions and 0 deletions
5
.ansible-lint
Normal file
5
.ansible-lint
Normal file
|
|
@ -0,0 +1,5 @@
|
||||||
|
parseable: true
|
||||||
|
quiet: true
|
||||||
|
skip_list:
|
||||||
|
- '501'
|
||||||
|
use_default_rules: true
|
||||||
14
.gitignore
vendored
Normal file
14
.gitignore
vendored
Normal file
|
|
@ -0,0 +1,14 @@
|
||||||
|
*.retry
|
||||||
|
*.swp
|
||||||
|
|
||||||
|
.venv
|
||||||
|
.env
|
||||||
|
env
|
||||||
|
venv
|
||||||
|
|
||||||
|
node_modules/
|
||||||
|
|
||||||
|
.vault
|
||||||
|
.vaults/
|
||||||
|
vault
|
||||||
|
vaults/
|
||||||
42
.gitlab-ci.yml
Normal file
42
.gitlab-ci.yml
Normal file
|
|
@ -0,0 +1,42 @@
|
||||||
|
stages:
|
||||||
|
- lint
|
||||||
|
- test
|
||||||
|
|
||||||
|
cache:
|
||||||
|
key: "$CI_COMMIT_REF_SLUG"
|
||||||
|
paths:
|
||||||
|
- .cache/pip
|
||||||
|
- node_modules/
|
||||||
|
|
||||||
|
lint:
|
||||||
|
stage: lint
|
||||||
|
image: python:3.7
|
||||||
|
before_script:
|
||||||
|
- pip install ansible ansible-lint --quiet
|
||||||
|
script:
|
||||||
|
- ansible-lint playbook.yml
|
||||||
|
only:
|
||||||
|
refs:
|
||||||
|
- development
|
||||||
|
- merge_requests
|
||||||
|
|
||||||
|
pretty-lint:
|
||||||
|
stage: lint
|
||||||
|
image: node:12
|
||||||
|
before_script:
|
||||||
|
- npm install
|
||||||
|
script:
|
||||||
|
- npx prettier "**/*.yml" --check
|
||||||
|
only:
|
||||||
|
refs:
|
||||||
|
- development
|
||||||
|
- merge_requests
|
||||||
|
|
||||||
|
syntax-test:
|
||||||
|
stage: test
|
||||||
|
image: python:3.7
|
||||||
|
before_script:
|
||||||
|
- pip install ansible ansible-lint --quiet
|
||||||
|
- ansible-galaxy install -r roles/requirements.yml
|
||||||
|
script:
|
||||||
|
- ansible-playbook playbook.yml --syntax-check
|
||||||
9
.prettier.json
Normal file
9
.prettier.json
Normal file
|
|
@ -0,0 +1,9 @@
|
||||||
|
{
|
||||||
|
"singleQuote": true,
|
||||||
|
"printWidth": 90,
|
||||||
|
"tabWidth": 2,
|
||||||
|
"useTabs": false,
|
||||||
|
"bracketSpacing": true,
|
||||||
|
"parser": "yaml"
|
||||||
|
}
|
||||||
|
|
||||||
2
ansible.cfg
Normal file
2
ansible.cfg
Normal file
|
|
@ -0,0 +1,2 @@
|
||||||
|
[defaults]
|
||||||
|
roles_path = ./roles
|
||||||
3
playbook.yml
Normal file
3
playbook.yml
Normal file
|
|
@ -0,0 +1,3 @@
|
||||||
|
- hosts: localhost
|
||||||
|
roles:
|
||||||
|
- arch
|
||||||
6
roles/.gitignore
vendored
Normal file
6
roles/.gitignore
vendored
Normal file
|
|
@ -0,0 +1,6 @@
|
||||||
|
# ignore all external roles and files in the roles dir
|
||||||
|
/*
|
||||||
|
|
||||||
|
!.gitignore
|
||||||
|
!requirements.yml
|
||||||
|
!arch*/
|
||||||
0
roles/arch/tasks/git.yml
Normal file
0
roles/arch/tasks/git.yml
Normal file
30
roles/arch/tasks/main.yml
Normal file
30
roles/arch/tasks/main.yml
Normal file
|
|
@ -0,0 +1,30 @@
|
||||||
|
- name: load desktop specific vars
|
||||||
|
include_vars: desktop.yml
|
||||||
|
when: not platform or platform == "desktop"
|
||||||
|
|
||||||
|
- name: load laptop specific vars
|
||||||
|
include_vars: laptop.yml
|
||||||
|
when: platform and platform == "laptop"
|
||||||
|
|
||||||
|
- name: install shared packages
|
||||||
|
pacman:
|
||||||
|
name: "{{ packages }}"
|
||||||
|
|
||||||
|
- name: install platform specific packages
|
||||||
|
pacman:
|
||||||
|
name: "{{ platform_packages }}"
|
||||||
|
|
||||||
|
# TODO
|
||||||
|
# - (systemd networkd/iwl) network setup
|
||||||
|
# - nftables setup depending on platform
|
||||||
|
# - daily systemd-timer
|
||||||
|
# - weekly systemd-timer
|
||||||
|
# - reflector setup
|
||||||
|
|
||||||
|
- include_tasks: mpv.yml # TODO
|
||||||
|
- include_tasks: mpd.yml # TODO
|
||||||
|
- include_tasks: nfs.yml # TODO
|
||||||
|
- include_tasks: postgres.yml # TODO
|
||||||
|
- include_tasks: syncthing.yml # TODO depending on platform
|
||||||
|
- include_tasks: git.yml # TODO (identify)
|
||||||
|
- include_tasks: openvpn.yml # TODO depending on platform
|
||||||
0
roles/arch/tasks/mpd.yml
Normal file
0
roles/arch/tasks/mpd.yml
Normal file
0
roles/arch/tasks/mpv.yml
Normal file
0
roles/arch/tasks/mpv.yml
Normal file
0
roles/arch/tasks/nfs.yml
Normal file
0
roles/arch/tasks/nfs.yml
Normal file
0
roles/arch/tasks/openvpn.yml
Normal file
0
roles/arch/tasks/openvpn.yml
Normal file
0
roles/arch/tasks/postgres.yml
Normal file
0
roles/arch/tasks/postgres.yml
Normal file
0
roles/arch/tasks/syncthing.yml
Normal file
0
roles/arch/tasks/syncthing.yml
Normal file
27
roles/arch/templates/input.j2
Normal file
27
roles/arch/templates/input.j2
Normal file
|
|
@ -0,0 +1,27 @@
|
||||||
|
# {{ ansible_managed }} {{ ansible_date_time.time }} {{ ansible_date_time.date }}
|
||||||
|
## Seek units are in seconds, but note that these are limited by keyframes
|
||||||
|
RIGHT seek 5
|
||||||
|
LEFT seek -5
|
||||||
|
SHIFT+RIGHT seek 60
|
||||||
|
SHIFT+LEFT seek -60
|
||||||
|
|
||||||
|
# UP add volume 2
|
||||||
|
# DOWN add volume -2
|
||||||
|
|
||||||
|
UP add ao-volume 2
|
||||||
|
DOWN add ao-volume -2
|
||||||
|
m cycle ao-mute
|
||||||
|
|
||||||
|
PGUP add chapter 1 # skip to next chapter
|
||||||
|
PGDWN add chapter -1 # skip to previous chapter
|
||||||
|
|
||||||
|
q quit
|
||||||
|
|
||||||
|
j cycle sub # cycle through subtitles
|
||||||
|
|
||||||
|
#SHARP cycle audio # switch audio streams
|
||||||
|
|
||||||
|
f cycle fullscreen # toggle fullscreen
|
||||||
|
s screenshot # take a screenshot
|
||||||
|
S screenshot video # ...without subtitles
|
||||||
|
|
||||||
12
roles/arch/templates/mpv.j2
Normal file
12
roles/arch/templates/mpv.j2
Normal file
|
|
@ -0,0 +1,12 @@
|
||||||
|
# {{ ansible_managed }} {{ ansible_date_time.time }} {{ ansible_date_time.date }}
|
||||||
|
|
||||||
|
volume=100
|
||||||
|
sub-auto=fuzzy
|
||||||
|
gpu-api=vulkan
|
||||||
|
vo=gpu
|
||||||
|
hwdec=vaapi
|
||||||
|
|
||||||
|
ytdl-format=best
|
||||||
|
|
||||||
|
audio-samplerate=96000
|
||||||
|
audio-format=s64
|
||||||
24
roles/arch/vars/main.yml
Normal file
24
roles/arch/vars/main.yml
Normal file
|
|
@ -0,0 +1,24 @@
|
||||||
|
packages:
|
||||||
|
- firefox
|
||||||
|
- mpv
|
||||||
|
- youtube-dl
|
||||||
|
- keepassxc
|
||||||
|
- gimp
|
||||||
|
- nftables
|
||||||
|
- mpd
|
||||||
|
- nfs
|
||||||
|
- openvpn
|
||||||
|
- okular
|
||||||
|
- postgres
|
||||||
|
- plasma-meta
|
||||||
|
- syncthing
|
||||||
|
- tmux
|
||||||
|
- unrar
|
||||||
|
- vim
|
||||||
|
- git
|
||||||
|
- openssl
|
||||||
|
- kmail
|
||||||
|
- iproute2
|
||||||
|
- curl
|
||||||
|
- cantata
|
||||||
|
- reflector
|
||||||
8
roles/requirements.yml
Normal file
8
roles/requirements.yml
Normal file
|
|
@ -0,0 +1,8 @@
|
||||||
|
- src: git+https://git.fudiggity.nl/ansible/common.git
|
||||||
|
name: common
|
||||||
|
version: master
|
||||||
|
scm: git
|
||||||
|
- src: git+https://git.fudiggity.nl/ansible/npm.git
|
||||||
|
name: npm
|
||||||
|
version: master
|
||||||
|
scm: git
|
||||||
Loading…
Add table
Add a link
Reference in a new issue