diff --git a/urubian/playbook-server-urubian.yml b/urubian/playbook-server-urubian.yml index 7c0931e..e33232c 100644 --- a/urubian/playbook-server-urubian.yml +++ b/urubian/playbook-server-urubian.yml @@ -4,8 +4,8 @@ become: true roles: + - role: tmux + - role: htop - role: mumble - tags: - - mumble diff --git a/urubian/roles/tmux/tasks/main.yml b/urubian/roles/tmux/tasks/main.yml new file mode 100644 index 0000000..6399977 --- /dev/null +++ b/urubian/roles/tmux/tasks/main.yml @@ -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 + +