Feat(user): clean tmux install

This commit is contained in:
Bertrand Benjamin 2023-04-30 06:39:12 +02:00
parent 16bd8f0afe
commit 3ed71a34ec
2 changed files with 24 additions and 0 deletions

View File

@ -15,6 +15,10 @@
chdir: "/home/{{ user.username }}/.dotfiles"
with_items: "{{ user.config.stowing }}"
- name: init tmux
import_tasks: tmux.yml
when: '"tmux" in user.config.stowing'
- name: init neovim
import_tasks: neovim.yml
when: '"nvim" in user.config.stowing'

20
roles/user/tasks/tmux.yml Normal file
View File

@ -0,0 +1,20 @@
---
- name: Install tmux
community.general.pacman:
name: tmux
state: present
when: ansible_os_family == "Archlinux"
- name: Install tmux
apt:
name: tmux
state: present
when: ansible_os_family == "Debian"
- name: Install tpm
ansible.builtin.git:
repo: "https://github.com/tmux-plugins/tpm"
dest: "/home/{{ user.username }}/.tmux/plugins/tpm"
depth: 1
become: true
become_user: "{{ user.username }}"