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

Merge pull request #6 from roles-ansible/tmux

Add tmux dotfile option
This commit is contained in:
L3D 2022-04-12 14:44:20 +02:00 committed by GitHub
commit 5cd1afc650
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 33 additions and 1 deletions

View file

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

View file

@ -18,3 +18,7 @@
- name: deploy ranger config - name: deploy ranger config
ansible.builtin.include_tasks: ranger.yml 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' playbook_version_path: 'role_dotfiles_chaos-bodensee_github.version'