14 lines
418 B
YAML

---
- name: Install tmux
ansible.builtin.package:
name: tmux
state: present
- name: Start tmux in .bashrc
ansible.builtin.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