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:
parent
2ab2a60a5d
commit
29e1071218
5 changed files with 35 additions and 1 deletions
|
@ -60,5 +60,8 @@ l3d_users__dotfiles__history_file_size: '-1'
|
||||||
# vim config
|
# vim config
|
||||||
l3d_users__vimrc: true
|
l3d_users__vimrc: true
|
||||||
|
|
||||||
|
# tmux config
|
||||||
|
l3d_users__tmuxcfg: true
|
||||||
|
|
||||||
# run simple versionscheck
|
# run simple versionscheck
|
||||||
submodules_versioncheck: false
|
submodules_versioncheck: false
|
||||||
|
|
|
@ -17,3 +17,8 @@
|
||||||
ansible.builtin.include_tasks:
|
ansible.builtin.include_tasks:
|
||||||
file: 'vimrc.yml'
|
file: 'vimrc.yml'
|
||||||
when: l3d_users__vimrc | bool
|
when: l3d_users__vimrc | bool
|
||||||
|
|
||||||
|
- name: Setup and configure tmux
|
||||||
|
ansible.builtin.include_tasks:
|
||||||
|
file: 'tmux.yml'
|
||||||
|
when: l3d_users__tmuxcfg | bool
|
||||||
|
|
23
roles/dotfiles/tasks/tmux.yml
Normal file
23
roles/dotfiles/tasks/tmux.yml
Normal 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'
|
2
roles/dotfiles/templates/tmux.conf.j2
Normal file
2
roles/dotfiles/templates/tmux.conf.j2
Normal file
|
@ -0,0 +1,2 @@
|
||||||
|
|
||||||
|
set -g history-limit 65536
|
|
@ -3,6 +3,7 @@ l3d_users__dotfiles_packages:
|
||||||
- bash
|
- bash
|
||||||
- vim
|
- vim
|
||||||
- htop
|
- htop
|
||||||
|
- tmux
|
||||||
|
|
||||||
playbook_version_number: 5
|
playbook_version_number: 6
|
||||||
playbook_version_path: 'l3d.users.dotfiles.version'
|
playbook_version_path: 'l3d.users.dotfiles.version'
|
||||||
|
|
Loading…
Reference in a new issue