add task 'tmux'

This commit is contained in:
Václav Uruba 2022-12-07 16:34:15 +01:00
parent 312dab589c
commit 99708799ff
Signed by: uruba
GPG Key ID: 9D8E987C4B2E1E9C
2 changed files with 17 additions and 2 deletions

View File

@ -4,8 +4,8 @@
become: true
roles:
- role: tmux
- role: htop
- role: mumble
tags:
- mumble

View File

@ -0,0 +1,15 @@
---
- name: Install tmux
package:
name: tmux
state: present
- name: Start tmux in .bashrc
blockinfile:
path: "{{ lookup('env','HOME') }}/.bashrc"
marker: "# {mark} ANSIBLE MANAGED SECTION (tmux)"
block: |
if [[ -n "$PS1" ]] && [[ -z "$TMUX" ]] && [[ -n "$SSH_CONNECTION" ]]; then
tmux attach-session -t uruba || tmux new-session -s uruba
fi