Pulizia generale dei ruoli: le installazioni systemwide sono nel deploy di ansible_mgmt.
This commit is contained in:
parent
24908aa484
commit
353f316c1e
71 changed files with 5 additions and 885 deletions
8
roles/zsh-user-cfg/tasks/config/alpine.yml
Normal file
8
roles/zsh-user-cfg/tasks/config/alpine.yml
Normal file
|
@ -0,0 +1,8 @@
|
|||
---
|
||||
# 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
|
16
roles/zsh-user-cfg/tasks/config/archlinux.yml
Normal file
16
roles/zsh-user-cfg/tasks/config/archlinux.yml
Normal file
|
@ -0,0 +1,16 @@
|
|||
---
|
||||
# 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
|
||||
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
|
||||
when: ansible_lsb != [] and ansible_lsb.description == 'Manjaro Linux'
|
16
roles/zsh-user-cfg/tasks/config/debian.yml
Normal file
16
roles/zsh-user-cfg/tasks/config/debian.yml
Normal file
|
@ -0,0 +1,16 @@
|
|||
---
|
||||
# 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
|
||||
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
|
||||
when: ansible_distribution == 'Ubuntu'
|
41
roles/zsh-user-cfg/tasks/config/main.yml
Normal file
41
roles/zsh-user-cfg/tasks/config/main.yml
Normal file
|
@ -0,0 +1,41 @@
|
|||
---
|
||||
# Configuring zsh
|
||||
|
||||
- name: Fixing base settings
|
||||
ansible.builtin.include_tasks: "{{ ansible_os_family | lower }}.yml"
|
||||
|
||||
- name: Set zsh as default shell for user
|
||||
ansible.builtin.user:
|
||||
name: "{{ additional_user }}"
|
||||
shell: /usr/bin/zsh
|
||||
become_user: root
|
||||
become: true
|
||||
|
||||
- name: Creating personal folder for customization
|
||||
ansible.builtin.file:
|
||||
path: "{{ lookup('ansible.builtin.env', 'HOME') }}/.zsh/conf.d"
|
||||
state: directory
|
||||
mode: '0755'
|
||||
become_user: "{{ additional_user }}"
|
||||
become: true
|
||||
|
||||
- name: Removing previous file if present
|
||||
ansible.builtin.file:
|
||||
path: "{{ lookup('ansible.builtin.env', 'HOME') }}/.zshrc"
|
||||
state: absent
|
||||
become_user: "{{ additional_user }}"
|
||||
become: true
|
||||
|
||||
- name: Linking main file
|
||||
ansible.builtin.file:
|
||||
src: "{{ dotfdir }}/zshrc"
|
||||
dest: "{{ lookup('ansible.builtin.env', 'HOME') }}/.zshrc"
|
||||
state: link
|
||||
force: true
|
||||
become_user: "{{ additional_user }}"
|
||||
become: true
|
||||
|
||||
- name: Configuring package manager - antidote
|
||||
ansible.builtin.import_tasks: pkgman/main.yml
|
||||
become_user: "{{ additional_user }}"
|
||||
become: true
|
16
roles/zsh-user-cfg/tasks/config/pkgman/configuration.yml
Normal file
16
roles/zsh-user-cfg/tasks/config/pkgman/configuration.yml
Normal file
|
@ -0,0 +1,16 @@
|
|||
---
|
||||
# Configuring zsh bundles
|
||||
|
||||
- name: Assuring the conf.d folder exists
|
||||
ansible.builtin.file:
|
||||
dest: "{{ lookup('ansible.builtin.env', 'HOME') }}/.zsh/conf.d"
|
||||
state: directory
|
||||
mode: '0755'
|
||||
|
||||
- name: Building lazy-loading list
|
||||
ansible.builtin.shell: >-
|
||||
source ~/.zsh/antidote/antidote.zsh;
|
||||
antidote bundle < {{ dotfdir }}/zsh/antibody_plugins.txt > ~/.zsh/conf.d/000_antidote.zsh
|
||||
args:
|
||||
executable: /usr/bin/zsh
|
||||
changed_when: true
|
15
roles/zsh-user-cfg/tasks/config/pkgman/installation.yml
Normal file
15
roles/zsh-user-cfg/tasks/config/pkgman/installation.yml
Normal file
|
@ -0,0 +1,15 @@
|
|||
---
|
||||
# Installing antidote.
|
||||
|
||||
- name: Creating destination folder
|
||||
ansible.builtin.file:
|
||||
dest: "{{ lookup('ansible.builtin.env', 'HOME') }}/.zsh/antidote"
|
||||
state: directory
|
||||
mode: '0755'
|
||||
|
||||
- name: Installing antidote with git
|
||||
# noqa: latest[git]
|
||||
ansible.builtin.git:
|
||||
repo: "https://github.com/mattmc3/antidote.git"
|
||||
dest: "{{ lookup('ansible.builtin.env', 'HOME') }}/.zsh/antidote"
|
||||
depth: 1
|
14
roles/zsh-user-cfg/tasks/config/pkgman/main.yml
Normal file
14
roles/zsh-user-cfg/tasks/config/pkgman/main.yml
Normal file
|
@ -0,0 +1,14 @@
|
|||
---
|
||||
# Deploying antidote
|
||||
|
||||
- name: Installing antidote
|
||||
ansible.builtin.import_tasks: installation.yml
|
||||
tags:
|
||||
- antidote
|
||||
- antidote-install
|
||||
|
||||
- name: Configuring antidote
|
||||
ansible.builtin.import_tasks: configuration.yml
|
||||
tags:
|
||||
- antidote
|
||||
- antidote-config
|
8
roles/zsh-user-cfg/tasks/config/redhat.yml
Normal file
8
roles/zsh-user-cfg/tasks/config/redhat.yml
Normal file
|
@ -0,0 +1,8 @@
|
|||
---
|
||||
# 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
|
8
roles/zsh-user-cfg/tasks/config/void.yml
Normal file
8
roles/zsh-user-cfg/tasks/config/void.yml
Normal file
|
@ -0,0 +1,8 @@
|
|||
---
|
||||
# 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
|
19
roles/zsh-user-cfg/tasks/main.yml
Normal file
19
roles/zsh-user-cfg/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