1
0
Fork 0
mirror of https://github.com/roles-ansible/ansible_collection_users.git synced 2024-08-16 10:29:50 +02:00

Create tmux config

This commit is contained in:
L3D 2024-04-06 20:15:01 +02:00
parent 2ab2a60a5d
commit 29e1071218
No known key found for this signature in database
GPG key ID: AD65B920933B4B20
5 changed files with 35 additions and 1 deletions

View file

@ -60,5 +60,8 @@ l3d_users__dotfiles__history_file_size: '-1'
# vim config
l3d_users__vimrc: true
# tmux config
l3d_users__tmuxcfg: true
# run simple versionscheck
submodules_versioncheck: false

View file

@ -17,3 +17,8 @@
ansible.builtin.include_tasks:
file: 'vimrc.yml'
when: l3d_users__vimrc | bool
- name: Setup and configure tmux
ansible.builtin.include_tasks:
file: 'tmux.yml'
when: l3d_users__tmuxcfg | bool

View file

@ -0,0 +1,23 @@
---
- name: Create tmux configuration for root
become: true
ansible.builtin.template:
src: 'templates/tmux.conf.j2'
dest: '/root/.tmux.conf'
owner: 'root'
group: 'root'
mode: 'u=rw,g=r,o=r'
- name: Create vimrc configuration per defined user
become: true
ansible.builtin.template:
src: 'templates/tmux.conf.j2'
dest: "{{ user.home | default('/home/' + user.name) }}/.tmux.conf"
owner: "{{ user.name }}"
group: "{{ user.name }}"
mode: '0640'
loop: "{{ _l3d_users__merged_users }}"
loop_control:
label: "user={{ user.name }}"
loop_var: user
when: user.state | default ('present') == 'present'

View file

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

View file

@ -3,6 +3,7 @@ l3d_users__dotfiles_packages:
- bash
- vim
- htop
- tmux
playbook_version_number: 5
playbook_version_number: 6
playbook_version_path: 'l3d.users.dotfiles.version'