ansible/roles/quality_of_life/tasks/main.yml

102 lines
2.1 KiB
YAML
Raw Permalink Normal View History

2022-09-04 18:57:47 +02:00
---
- name: quality of life packages
apk:
name:
- curl
2022-09-04 18:57:47 +02:00
- htop
- man-pages
- mandoc
2022-09-04 18:57:47 +02:00
- mksh # I want something somewhat nicer thant busybox ash
- mosh
- neovim
- ripgrep
- shadow
2022-09-04 18:57:47 +02:00
- tmux
when: ansible_distribution == "Alpine"
- name: install python3
apt:
name:
- htop
- mosh
- neovim
- ripgrep
- tmux
when: ansible_distribution in ["Debian", "Ubuntu"]
- name: install python3
openbsd_pkg:
name:
- htop
- mosh
- neovim
- ripgrep
# OpenBSD already ships with tmux
when: ansible_distribution == "OpenBSD"
2022-09-20 13:51:20 +02:00
- name: set up tmux
block:
- name: make tmux config directory
file:
path: /home/rilla/.config/tmux
state: directory
owner: rilla
group: rilla
- name: copy tmux config
copy:
src: tmux.conf
dest: /home/rilla/.config/tmux/tmux.conf
owner: rilla
group: rilla
- name: make sure .profile file exists
file:
name: /home/rilla/.profile
state: touch
owner: rilla
group: rilla
modification_time: preserve
access_time: preserve
mode: '0644'
- name: start tmux session on ssh connection
lineinfile:
path: /home/rilla/.profile
line: '[ -n "$PS1" ] && [ -z "$TMUX" ] && [ -n "$SSH_CONNECTION" ] && exec tmux -u'
insertafter: EOF
state: present
- name: set Alpine shell to mksh
block:
- name: install mksh
apk:
name: mksh
- name: change user default shell
user:
name: rilla
shell: /bin/mksh
- name: copy mkshrc
copy:
src: mkshrc
dest: /home/rilla/.mkshrc
owner: rilla
group: rilla
when: ansible_distribution == "Alpine"
- name: include to lbu config files
lbu:
include:
- /home/rilla/.config/tmux/tmux.conf
- /home/rilla/.mkshrc
- /home/rilla/.profile
2022-09-20 14:27:22 +02:00
exclude:
- /home/rilla/.local/share/nvim
- /home/rilla/.cache
2022-10-19 17:58:20 +02:00
when: ansible_distribution == "Alpine" and alpine_mode == "diskless"