-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathWorkplace.yml
70 lines (65 loc) · 2.21 KB
/
Workplace.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
---
- name: Some actions to setup workstation
hosts: all, localhost
tasks:
- name: Bash aliases, terminal deprioritization
tags: user
blockinfile:
path: ~/.bashrc
backup: yes
create: yes
marker: "# vg: {mark} ANSIBLE MANAGED BLOCK"
validate: bash -x %s
block: |
test -n "$COLORTERM" && renice +12 $$ && ionice -c3 -n7 -p $$
shopt -s autocd
alias 2e=~/stuff/2emacs.py
alias inh="systemd-inhibit --what=handle-lid-switch"
alias inhj="inh journalctl -f"
alias g3="bash -ecx 'git stash && git pull --rebase --recurse-submodules && git stash apply'"
alias d3='docker run --rm -v $(pwd):$(pwd) -w $(pwd)'
alias d4='d3 -u $(id -u)'
alias d5='d4 -e "HOME=$(pwd)"'
alias d3i='inh docker run --rm -v $(pwd):$(pwd) -w$(pwd)'
vgYtdlFlags="--output \
\"%(upload_date)s-%(uploader)s-%(title)s-%(id)s.%(ext)s\""
alias y0="python2 ~/src/youtube-dl/youtube_dl/__main__.py"
alias yd="y0 $vgYtdlFlags"
alias iy="inh python2\
~/src/youtube-dl/youtube_dl/__main__.py $vgYtdlFlags"
alias yp='python3 ~/src/yt-dlp/yt_dlp/__main__.py'
alias y3="yp $vgYtdlFlags"
alias yp9='python3.9 ~/src/yt-dlp/yt_dlp/__main__.py'
alias y9="yp9 $vgYtdlFlags"
alias 12='scl enable gcc-toolset-12'
alias 13='scl enable gcc-toolset-13'
- name: Disable ssh password
tags: never
become: true
lineinfile:
validate: 'sshd -t -f %s'
path: /etc/ssh/sshd_config
regexp: '^[^#\w]*PasswordAuthentication.*$'
line: 'PasswordAuthentication no'
- name: Core dumps 1/2
tags: system1
become: true
lineinfile:
path: /etc/systemd/system.conf
regexp: '^[^#\w]*DefaultLimitCORE.*$'
line: 'DefaultLimitCORE=infinity'
- name: Core dumps 2/2
tags: system1
become: true
shell: 'systemctl daemon-reload'
- name: Some actions for a server account
tags: user, server
hosts: all
tasks:
- name: authorized_keys
lineinfile:
path: ~/.ssh/authorized_keys
backup: yes
line: >-
ssh-ed25519
AAAAC3NzaC1lZDI1NTE5AAAAIGQcUAv+wO0lKeZEXH+Pawnr4L4fTJZADaQopwISzivs x