Initial commit

This commit is contained in:
Kuba Orlik 2025-09-12 20:35:52 +02:00
commit adec8a6842
3 changed files with 32 additions and 0 deletions

13
README.md Normal file
View File

@ -0,0 +1,13 @@
# Tmux role for Ansible
Sets tmux as the default shell and enables mouse support
# Installation:
Add this to requirements.yml:
```
- src: git+http://git.internet-czas-dzialac.pl/icd/ansible-tmux.git
version: main
name: nginx
```

2
tasks/files/tmux.conf Normal file
View File

@ -0,0 +1,2 @@
# Enable mouse support
set -g mouse on

17
tasks/main.yml Normal file
View File

@ -0,0 +1,17 @@
---
- name: Ensure tmux is installed
package:
name: tmux
state: present
- name: Copy tmux config with mouse support
copy:
src: tmux.conf
dest: "/etc/tmux.conf"
owner: "{{ ansible_user }}"
mode: "0644"
- name: Use tmux as default shell
ansible.builtin.lineinfile:
path: /root/.bashrc
line: 'case $- in *i*) [ -z "$TMUX" ] && exec tmux;; esac'