1
0
Fork 0
mirror of https://github.com/roles-ansible/ansible_role_dotfiles.git synced 2024-08-16 16:09:49 +02:00

Add tmux option

This commit is contained in:
L3D 2022-04-12 00:23:15 +02:00
parent 6b5cd5988b
commit 4e22d06883
Signed by: l3d
GPG key ID: CD08445BFF4313D1
5 changed files with 33 additions and 1 deletions

View file

@ -54,5 +54,8 @@ dotfiles__custom_config: []
# show hidden files in ranger
dotfiles__ranger_hidden_files: true
# configure tmux
dotfiles__modify_tmux: true
accounts:
- "{{ ansible_user_id }}"

View file

@ -18,3 +18,7 @@
- name: deploy ranger config
ansible.builtin.include_tasks: ranger.yml
- name: deploy .tmux.conf
ansible.builtin.include_tasks: tmux.yml
when: dotfiles__modify_tmux | bool

23
tasks/tmux.yml Normal file
View file

@ -0,0 +1,23 @@
---
- name: Copy vimrc configuration to root
become: true
ansible.builtin.copy:
src: 'templates/tmux.conf.j2'
dest: '/root/.tmux.conf'
owner: root
group: root
mode: 'u=rw,g=r,o='
- name: Copy vimrc configuration to non admin users
become: true
ansible.builtin.copy:
src: 'templates/tmux.conf.j2'
dest: '/home/{{ item }}/.tmux.conf'
owner: '{{ item }}'
group: '{{ item }}'
mode: 'u=rw,g=r,o='
with_items: "{{ accounts }}"
when:
- accounts is defined
- accounts != ['root']
- accounts != 'root'

2
templates/tmux.conf.j2 Normal file
View file

@ -0,0 +1,2 @@
set -g history-limit 65536

View file

@ -1,3 +1,3 @@
---
playbook_version_number: 2074 # should be increased integer
playbook_version_number: 2075 # should be increased integer
playbook_version_path: 'role_dotfiles_chaos-bodensee_github.version'