Sostituzione di prepare con un playbook che viene lanciato sulla macchina locale.

This commit is contained in:
Emiliano Vavassori 2024-10-01 00:19:21 +02:00
parent 23343af106
commit 813cf57d54
78 changed files with 885 additions and 70 deletions

View file

@ -0,0 +1,2 @@
---
dotfdir: "{{ lookup('ansible.builtin.env', 'HOME' ) }}/.dotfiles"

View file

@ -0,0 +1,32 @@
---
# Tmux standard configuration
- name: Creating configuration folders
ansible.builtin.file:
path: "{{ lookup('ansible.builtin.env', 'HOME' ) }}/.config/tmux/plugins"
state: directory
owner: syntaxerrormmm
group: syntaxerrormmm
mode: '0755'
- name: Getting tpm
ansible.builtin.git:
repo: https://github.com/tmux-plugins/tpm.git
depth: 1
dest: "{{ lookup('ansible.builtin.env', 'HOME' ) }}/.config/tmux/plugins/tpm"
- name: Linking default configuration file
ansible.builtin.file:
src: "{{ dotfdir }}/tmux.conf"
dest: "{{ lookup('ansible.builtin.env', 'HOME' ) }}/.config/tmux/tmux.conf"
state: link
owner: syntaxerrormmm
group: syntaxerrormmm
- name: Fallback default old standard
ansible.builtin.file:
src: "{{ lookup('ansible.builtin.env', 'HOME' ) }}/.config/tmux/tmux.conf"
dest: "{{ lookup('ansible.builtin.env', 'HOME' ) }}/.tmux.conf"
state: link
owner: syntaxerrormmm
group: syntaxerrormmm

View file

@ -0,0 +1,7 @@
---
- name: (alp) installing tmux
community.general.apk:
name: tmux
state: present
update_cache: true
become: true

View file

@ -0,0 +1,7 @@
---
- name: (arch) installing tmux
community.general.pacman:
name: tmux
state: present
update_cache: true
become: true

View file

@ -0,0 +1,7 @@
---
- name: (deb) installing tmux
ansible.builtin.apt:
name: tmux
state: present
update_cache: true
become: true

View file

@ -0,0 +1,7 @@
---
- name: (rHa) installing tmux
ansible.builtin.yum:
name: tmux
state: present
update_cache: true
become: true

View file

@ -0,0 +1,7 @@
---
- name: (void) installing tmux
community.general.xbps:
name: tmux
state: present
update_cache: true
become: true

23
roles/tmux/tasks/main.yml Normal file
View file

@ -0,0 +1,23 @@
---
# Managing tmux
- name: Installation
ansible.builtin.include_tasks: "install/{{ ansible_os_family | lower }}.yml"
args:
apply:
tags:
- tmux
- tmux-install
tags:
- tmux
- tmux-install
- name: Configuration
ansible.builtin.import_tasks: configuration.yml
tags:
- tmux
- tmux-config
- name: Manual steps
ansible.builtin.debug:
msg: "Please run prefix + I in tmux to install the needed plugins."