84c1c7bd0e
* touch .bashrc um Fehler anzufangen falls die Datei nicht existiert * become: yes * Task Name
36 lines
928 B
YAML
36 lines
928 B
YAML
- name: install tmux packages
|
|
become: yes
|
|
ansible.builtin.apt:
|
|
name:
|
|
- tmux
|
|
state: present
|
|
cache_valid_time: 360
|
|
|
|
- name: touch "{{ tmux_bashrc_destination }}"
|
|
become: yes
|
|
file:
|
|
path: "{{ tmux_bashrc_destination }}"
|
|
state: touch
|
|
|
|
# - name: ensure homedir exists
|
|
# become: yes
|
|
# ansible.builtin.file:
|
|
# path: " {{ tmux_conf_destination }}"
|
|
# state: directory
|
|
|
|
# - name: copy .tmux.conf
|
|
# become: yes
|
|
# ansible.builtin.template:
|
|
# src: ".tmux.conf"
|
|
# dest: "{{ tmux_conf_destination }}"
|
|
# backup: true
|
|
|
|
- name: add tmux-session config to .bashrc
|
|
become: yes
|
|
ansible.builtin.blockinfile:
|
|
path: "{{ tmux_bashrc_destination }}"
|
|
block: |
|
|
if command -v tmux &> /dev/null && [ -z "$TMUX" ]; then
|
|
tmux attach -t {{ tmux_standardsession_name }} || tmux new -s {{ tmux_standardsession_name }}
|
|
fi
|