homeserver/roles/mgrote.tmux/tasks/main.yml
Quotengrote 15d783de86
FQCN eingeführt (#70)
* template --> ansible.builtin.template

* apt --> ansible.builtin.apt

* lineinfile --> ansible.builtin.lineinfile

* file --> ansible.builtin.file

* blockinfile --> ansible.builtin.blockinfile

* cron --> ansible.builtin.cron

* timezone --> ansible.builtin.timezone

* get_url --> ansible.builtin.get_url

* group --> ansible.builtin.group

* user --> ansible.builtin.user

* unarchive --> ansible.builtin.unarchive

* service --> ansible.builtin.service

* apache2_module --> ansible.builtin.apache2_module

* package --> ansible.builtin.apt

* template --> ansible.builtin.template 2
2020-11-21 19:41:19 +01:00

29 lines
790 B
YAML

- name: install tmux packages
become: yes
ansible.builtin.apt:
name:
- tmux
state: present
cache_valid_time: 360
# - 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