Sostituzione di prepare con un playbook che viene lanciato sulla macchina locale.
This commit is contained in:
parent
23343af106
commit
813cf57d54
78 changed files with 885 additions and 70 deletions
10
roles/zsh/tasks/config/alpine.yml
Normal file
10
roles/zsh/tasks/config/alpine.yml
Normal file
|
@ -0,0 +1,10 @@
|
|||
---
|
||||
# Configuration for base settings - Alpine
|
||||
|
||||
- name: (alp) - ZSH base configuration
|
||||
ansible.builtin.file:
|
||||
src: "{{ dotfdir }}/zsh/distro/alpine.base.zsh"
|
||||
dest: "{{ dotfdir }}/zsh/distro.base.zsh"
|
||||
state: link
|
||||
owner: syntaxerrormmm
|
||||
group: syntaxerrormmm
|
20
roles/zsh/tasks/config/archlinux.yml
Normal file
20
roles/zsh/tasks/config/archlinux.yml
Normal file
|
@ -0,0 +1,20 @@
|
|||
---
|
||||
# Configuration for base settings - Archlinux
|
||||
|
||||
- name: (arch) - ZSH base configuration
|
||||
ansible.builtin.file:
|
||||
src: "{{ dotfdir }}/zsh/distro/archlinux.base.zsh"
|
||||
dest: "{{ dotfdir }}/zsh/distro.base.zsh"
|
||||
state: link
|
||||
owner: syntaxerrormmm
|
||||
group: syntaxerrormmm
|
||||
when: ansible_lsb == [] or ansible_lsb.description == 'Arch Linux'
|
||||
|
||||
- name: (manj) - ZSH base configuration
|
||||
ansible.builtin.file:
|
||||
src: "{{ dotfdir }}/zsh/distro/manjaro.base.zsh"
|
||||
dest: "{{ dotfdir }}/zsh/distro.base.zsh"
|
||||
state: link
|
||||
owner: syntaxerrormmm
|
||||
group: syntaxerrormmm
|
||||
when: ansible_lsb != [] and ansible_lsb.description == 'Manjaro Linux'
|
20
roles/zsh/tasks/config/debian.yml
Normal file
20
roles/zsh/tasks/config/debian.yml
Normal file
|
@ -0,0 +1,20 @@
|
|||
---
|
||||
# Configuration for base settings - Debian
|
||||
|
||||
- name: (deb) - ZSH base configuration
|
||||
ansible.builtin.file:
|
||||
src: "{{ dotfdir }}/zsh/distro/debian.base.zsh"
|
||||
dest: "{{ dotfdir }}/zsh/distro.base.zsh"
|
||||
state: link
|
||||
owner: syntaxerrormmm
|
||||
group: syntaxerrormmm
|
||||
when: ansible_distribution == 'Debian'
|
||||
|
||||
- name: (ubu) - ZSH base configuration
|
||||
ansible.builtin.file:
|
||||
src: "{{ dotfdir }}/zsh/distro/ubuntu.base.zsh"
|
||||
dest: "{{ dotfdir }}/zsh/distro.base.zsh"
|
||||
state: link
|
||||
owner: syntaxerrormmm
|
||||
group: syntaxerrormmm
|
||||
when: ansible_distribution == 'Ubuntu'
|
26
roles/zsh/tasks/config/main.yml
Normal file
26
roles/zsh/tasks/config/main.yml
Normal file
|
@ -0,0 +1,26 @@
|
|||
---
|
||||
# Configuring zsh
|
||||
|
||||
- name: Fixing base settings
|
||||
ansible.builtin.include_tasks: "{{ ansible_os_family | lower }}.yml"
|
||||
|
||||
- name: Set zsh as default shell for syntaxerrormmm
|
||||
ansible.builtin.user:
|
||||
name: syntaxerrormmm
|
||||
shell: /usr/bin/zsh
|
||||
|
||||
- name: Creating personal folder for customization
|
||||
ansible.builtin.file:
|
||||
path: "{{ lookup('ansible.builtin.env', 'HOME' ) }}/.zsh/conf.d"
|
||||
state: directory
|
||||
owner: syntaxerrormmm
|
||||
group: syntaxerrormmm
|
||||
mode: "0755"
|
||||
|
||||
- name: Linking main file
|
||||
ansible.builtin.file:
|
||||
src: "{{ dotfdir }}/zshrc"
|
||||
dest: "{{ lookup('ansible.builtin.env', 'HOME' ) }}/.zshrc"
|
||||
state: link
|
||||
owner: syntaxerrormmm
|
||||
group: syntaxerrormmm
|
10
roles/zsh/tasks/config/redhat.yml
Normal file
10
roles/zsh/tasks/config/redhat.yml
Normal file
|
@ -0,0 +1,10 @@
|
|||
---
|
||||
# Configuration for base settings - RedHat
|
||||
|
||||
- name: (rha) - ZSH base configuration
|
||||
ansible.builtin.file:
|
||||
src: "{{ dotfdir }}/zsh/distro/centos.base.zsh"
|
||||
dest: "{{ dotfdir }}/zsh/distro.base.zsh"
|
||||
state: link
|
||||
owner: syntaxerrormmm
|
||||
group: syntaxerrormmm
|
10
roles/zsh/tasks/config/void.yml
Normal file
10
roles/zsh/tasks/config/void.yml
Normal file
|
@ -0,0 +1,10 @@
|
|||
---
|
||||
# Configuration for base settings - Void
|
||||
|
||||
- name: (void) - ZSH base configuration
|
||||
ansible.builtin.file:
|
||||
src: "{{ dotfdir }}/zsh/distro/void.base.zsh"
|
||||
dest: "{{ dotfdir }}/zsh/distro.base.zsh"
|
||||
state: link
|
||||
owner: syntaxerrormmm
|
||||
group: syntaxerrormmm
|
31
roles/zsh/tasks/configuration.yml
Normal file
31
roles/zsh/tasks/configuration.yml
Normal file
|
@ -0,0 +1,31 @@
|
|||
---
|
||||
# Configuring zsh
|
||||
|
||||
- name: Set zsh as default shell for syntaxerrormmm
|
||||
ansible.builtin.user:
|
||||
name: syntaxerrormmm
|
||||
shell: /usr/bin/zsh
|
||||
tags:
|
||||
- zsh
|
||||
- omz
|
||||
- zsh-config
|
||||
- zsh-config-omz
|
||||
|
||||
- name: Creating personal folder for customization
|
||||
ansible.builtin.file:
|
||||
path: "{{ lookup('ansible.builtin.env', 'HOME' ) }}/.zsh/conf.d"
|
||||
state: directory
|
||||
owner: syntaxerrormmm
|
||||
group: syntaxerrormmm
|
||||
mode: "0755"
|
||||
|
||||
- name: Linking main file
|
||||
ansible.builtin.file:
|
||||
src: "{{ dotfdir }}/zshrc"
|
||||
dest: "{{ lookup('ansible.builtin.env', 'HOME' ) }}/.zshrc"
|
||||
state: link
|
||||
owner: syntaxerrormmm
|
||||
group: syntaxerrormmm
|
||||
|
||||
- name: Fixing base settings
|
||||
ansible.builtin.include_tasks: "{{ ansible_os_family | lower }}.yml"
|
14
roles/zsh/tasks/install/alpine.yml
Normal file
14
roles/zsh/tasks/install/alpine.yml
Normal file
|
@ -0,0 +1,14 @@
|
|||
---
|
||||
- name: (Alpine) Installing packages around zsh
|
||||
community.general.apk:
|
||||
name:
|
||||
- zsh
|
||||
- zsh-completions
|
||||
- zsh-autosuggestions
|
||||
- zsh-syntax-highlighting
|
||||
- zsh-history-substring-search
|
||||
- zsh-theme-powerlevel10k
|
||||
- zsh-vcs
|
||||
state: present
|
||||
update_cache: true
|
||||
become: true
|
13
roles/zsh/tasks/install/archlinux.yml
Normal file
13
roles/zsh/tasks/install/archlinux.yml
Normal file
|
@ -0,0 +1,13 @@
|
|||
---
|
||||
- name: (Arch) Installing packages around zsh
|
||||
community.general.pacman:
|
||||
name:
|
||||
- zsh
|
||||
- zsh-completions
|
||||
- zsh-autosuggestions
|
||||
- zsh-syntax-highlighting
|
||||
- zsh-history-substring-search
|
||||
- zsh-theme-powerlevel10k
|
||||
state: present
|
||||
update_cache: true
|
||||
become: true
|
25
roles/zsh/tasks/install/debian.yml
Normal file
25
roles/zsh/tasks/install/debian.yml
Normal file
|
@ -0,0 +1,25 @@
|
|||
---
|
||||
# Installing zsh and its dependency
|
||||
|
||||
- name: (Deb) Installing packages around zsh
|
||||
ansible.builtin.apt:
|
||||
name:
|
||||
- zsh
|
||||
- zsh-autosuggestions
|
||||
- zsh-syntax-highlighting
|
||||
state: present
|
||||
update_cache: true
|
||||
when: ansible_distribution == 'Debian'
|
||||
become: true
|
||||
|
||||
- name: (ubu) Installing packages around zsh
|
||||
ansible.builtin.apt:
|
||||
name:
|
||||
- zsh
|
||||
- zsh-autosuggestions
|
||||
- zsh-syntax-highlighting
|
||||
- zsh-theme-powerlevel9k
|
||||
state: present
|
||||
update_cache: true
|
||||
when: ansible_distribution == 'Ubuntu'
|
||||
become: true
|
9
roles/zsh/tasks/install/redhat.yml
Normal file
9
roles/zsh/tasks/install/redhat.yml
Normal file
|
@ -0,0 +1,9 @@
|
|||
---
|
||||
- name: (RH) Installing packages around zsh
|
||||
ansible.builtin.yum:
|
||||
name:
|
||||
- zsh
|
||||
- zsh-syntax-highlighting
|
||||
state: present
|
||||
update_cache: true
|
||||
become: true
|
14
roles/zsh/tasks/install/void.yml
Normal file
14
roles/zsh/tasks/install/void.yml
Normal file
|
@ -0,0 +1,14 @@
|
|||
---
|
||||
# Installing zsh and its dependency
|
||||
|
||||
- name: (Void) Installing packages around zsh
|
||||
community.general.xbps:
|
||||
name:
|
||||
- zsh
|
||||
- zsh-completions
|
||||
- zsh-autosuggestions
|
||||
- zsh-syntax-highlighting
|
||||
- zsh-history-substring-search
|
||||
state: present
|
||||
update_cache: true
|
||||
become: true
|
19
roles/zsh/tasks/main.yml
Normal file
19
roles/zsh/tasks/main.yml
Normal file
|
@ -0,0 +1,19 @@
|
|||
---
|
||||
# Setting up zsh
|
||||
|
||||
- name: Installation
|
||||
ansible.builtin.include_tasks: "install/{{ ansible_os_family | lower }}.yml"
|
||||
args:
|
||||
apply:
|
||||
tags:
|
||||
- zsh
|
||||
- zsh-install
|
||||
tags:
|
||||
- zsh
|
||||
- zsh-install
|
||||
|
||||
- name: Configuration
|
||||
ansible.builtin.import_tasks: config/main.yml
|
||||
tags:
|
||||
- zsh
|
||||
- zsh-config
|
Loading…
Add table
Add a link
Reference in a new issue