-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathWorkplace.yml
More file actions
104 lines (98 loc) · 3.3 KB
/
Copy pathWorkplace.yml
File metadata and controls
104 lines (98 loc) · 3.3 KB
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
#!/usr/bin/env ansible-playbook
---
- 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 -z "$DISPLAY" || renice +12 $$ && ionice -c3 -n7 -p $$
shopt -s autocd
alias 2e=~/stuff/2emacs.py
alias inh="systemd-inhibit --what=sleep"
alias inhj="inh journalctl -f"
# Handle other aliases
# Without backslash: $0 $@ evaluated after alias subst
alias in0='systemd-inhibit --what=sleep \
bash -ic "eval \$0 \$@"'
alias mkiso='bash -ecx "hdiutil makehybrid -o \$(basename \$0) \$0"'
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)'
alias p3='podman run --rm -v $(pwd):$(pwd) -w $(pwd)'
alias p4='p3 -u $(id -u)'
alias p5='p4 -e "HOME=$(pwd)"'
vgYtdlFlags="--sub-format srt --sub-lang \".*-orig\" \
--abort-on-unavailable-fragment --output \
\"%(upload_date)s-%(uploader_id)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 f18="y3 -f18"
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 --'
alias m1='zenity --info --text'
alias š=systemctl
# \$0 = evaluated by the root shell
# $(whoami) = evaluated after alias expansion
alias m2='sudo bash -xec "mkdir -p /Volumes/\$0 && \
mount.cifs \$0 /Volumes/\$0 -o intr,uid=$(whoami),sec=krb5"'
- name: gdb options
tags: user
blockinfile:
path: ~/.gdbinit
backup: yes
create: yes
marker: "# vg: {mark} ANSIBLE MANAGED BLOCK"
block: |
set pagination off
set filename-display absolute
set debuginfod enabled on
- name: Bash aliases for root
tags: user
become: true
blockinfile:
path: /root/.bashrc
backup: yes
create: yes
marker: "# vg: {mark} ANSIBLE MANAGED BLOCK"
validate: bash -x %s
block: |
shopt -s autocd
alias inh="systemd-inhibit --what=sleep"
alias š=systemctl
- 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