Sostituzione di prepare con un playbook che viene lanciato sulla macchina locale.
This commit is contained in:
parent
23343af106
commit
813cf57d54
4
ansible.cfg
Normal file
4
ansible.cfg
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
[defaults]
|
||||||
|
inventory = hosts
|
||||||
|
host_key_checking=False
|
||||||
|
roles = roles
|
6
deploy.yml
Normal file
6
deploy.yml
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
---
|
||||||
|
- hosts: all
|
||||||
|
roles:
|
||||||
|
- dotfiles
|
||||||
|
become: yes
|
||||||
|
become_user: root
|
70
prepare.sh
70
prepare.sh
@ -1,70 +0,0 @@
|
|||||||
#!/bin/sh
|
|
||||||
|
|
||||||
# copying all the needed stuff in place.
|
|
||||||
DOTFILES=${HOME}/.dotfiles
|
|
||||||
|
|
||||||
# copying zshrc file
|
|
||||||
if [[ ! -f "$HOME/.zshrc" ]]; then
|
|
||||||
# no first setup done
|
|
||||||
|
|
||||||
# Determining operating system so we can quickly setup basic configuration
|
|
||||||
if grep -qi 'debian' /proc/version; then
|
|
||||||
# Debian
|
|
||||||
sudo apt install -y zsh-autosuggestions zsh-syntax-highlighting
|
|
||||||
ln -sf ${DOTFILES}/zsh/distro/debian.base.zsh ${DOTFILES}/zsh/distro.base.zsh
|
|
||||||
fi
|
|
||||||
if grep -qi 'ubuntu' /proc/version; then
|
|
||||||
# TODO: complete instructions for Ubuntu
|
|
||||||
ln -sf ${DOTFILES}/zsh/distro/ubuntu.base.zsh ${DOTFILES}/zsh/distro.base.zsh
|
|
||||||
fi
|
|
||||||
if grep -qi 'manjaro' /proc/version; then
|
|
||||||
# TODO: complete instructions for Manjaro
|
|
||||||
pamac install manjaro-zsh-config
|
|
||||||
ln -sf ${DOTFILES}/zsh/distro/manjaro.base.zsh ${DOTFILES}/zsh/distro.base.zsh
|
|
||||||
fi
|
|
||||||
if grep -qi 'archlinux' /proc/version; then
|
|
||||||
pacman -S zsh-autosuggestions zsh-syntax-highlighting
|
|
||||||
ln -sf ${DOTFILES}/zsh/distro/archlinux.base.zsh ${DOTFILES}/zsh/distro.base.zsh
|
|
||||||
fi
|
|
||||||
if grep -qi 'voidlinux' /proc/version; then
|
|
||||||
xbps-install -S zsh
|
|
||||||
ln -sf ${DOTFILES}/zsh/distro/void.base.zsh ${DOTFILES}/zsh/distro.base.zsh
|
|
||||||
fi
|
|
||||||
if [[ -f /etc/redhat-release ]] && grep -qi centos /etc/redhat-release; then
|
|
||||||
# TODO: installation on centos.
|
|
||||||
ln -sf ${DOTFILES}/zsh/distro/centos.base.zsh ${DOTFILES}/zsh/distro.base.zsh
|
|
||||||
fi
|
|
||||||
|
|
||||||
cp "${DOTFILES}/zshrc" "$HOME/.zshrc"
|
|
||||||
|
|
||||||
if [[ -f ${DOTFILES}/zsh/antibody_plugins.txt ]]; then
|
|
||||||
# Installing natively on archlinux, manjaro
|
|
||||||
if grep -i archlinux /proc/version || grep -i manjaro /proc/version; then
|
|
||||||
yay -S --no-confirm zsh-antidote
|
|
||||||
else
|
|
||||||
git clone --depth=1 https://github.com/mattmc3/antidote.git ${ZDOTDIR:-$HOME}/.antidote
|
|
||||||
fi
|
|
||||||
|
|
||||||
mkdir -p ~/.zsh/conf.d
|
|
||||||
source /usr/share/zsh-antidote/antidote.zsh
|
|
||||||
antidote bundle < ${DOTFILES}/zsh/antibody_plugins.txt > ~/.zsh/conf.d/000_antidote.zsh
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Copying tmux configuration file and initialize plugins.
|
|
||||||
if [[ ! -f "$HOME/.tmux.conf" ]]; then
|
|
||||||
mkdir -p ${HOME}/.config/tmux/plugins
|
|
||||||
git clone https://github.com/tmux-plugins/tpm ${HOME}/.config/tmux/plugins/tpm
|
|
||||||
ln -sf "${DOTFILES}/tmux.conf" "$HOME/.config/tmux/tmux.conf"
|
|
||||||
echo "Please, open Tmux and run 'prefix I'."
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Vim - configure vundle and install plugins.
|
|
||||||
if [[ ! -f "${HOME}/.vimrc" ]]; then
|
|
||||||
ln -sf ${DOTFILES}/vimrc ${HOME}/.vimrc
|
|
||||||
ln -sf ${DOTFILES}/vim ${HOME}/.vim
|
|
||||||
# Installing vim-plug
|
|
||||||
curl -fLo ~/.vim/autoload/plug.vim --create-dirs \
|
|
||||||
https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim
|
|
||||||
# Installing vim-plug and relative plugins
|
|
||||||
vim +PlugInstall +qall
|
|
||||||
fi
|
|
2
roles/antidote/defaults/main.yml
Normal file
2
roles/antidote/defaults/main.yml
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
---
|
||||||
|
dotfdir: "{{ lookup('ansible.builtin.env', 'HOME' ) }}/.dotfiles"
|
17
roles/antidote/tasks/configuration.yml
Normal file
17
roles/antidote/tasks/configuration.yml
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
---
|
||||||
|
# Configuring zsh bundles
|
||||||
|
|
||||||
|
- name: Assuring the conf.d folder exists
|
||||||
|
ansible.builtin.file:
|
||||||
|
dest: "{{ lookup('ansible.builtin.env', 'HOME' ) }}/.zsh/conf.d"
|
||||||
|
state: directory
|
||||||
|
owner: syntaxerrormmm
|
||||||
|
group: syntaxerrormmm
|
||||||
|
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
|
16
roles/antidote/tasks/installation.yml
Normal file
16
roles/antidote/tasks/installation.yml
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
---
|
||||||
|
# Installing antidote.
|
||||||
|
|
||||||
|
- name: Creating destination folder
|
||||||
|
ansible.builtin.file:
|
||||||
|
dest: "{{ lookup('ansible.builtin.env', 'HOME' ) }}/.zsh/antidote"
|
||||||
|
state: directory
|
||||||
|
owner: syntaxerrormmm
|
||||||
|
group: syntaxerrormmm
|
||||||
|
mode: "0755"
|
||||||
|
|
||||||
|
- name: Installing antidote with git
|
||||||
|
ansible.builtin.git:
|
||||||
|
repo: "https://github.com/mattmc3/antidote.git"
|
||||||
|
dest: "{{ lookup('ansible.builtin.env','HOME' ) }}/.zsh/antidote"
|
||||||
|
depth: 1
|
14
roles/antidote/tasks/main.yml
Normal file
14
roles/antidote/tasks/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
|
12
roles/dotfiles/meta/main.yml
Normal file
12
roles/dotfiles/meta/main.yml
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
---
|
||||||
|
dependencies:
|
||||||
|
- git
|
||||||
|
- fzf
|
||||||
|
- pip
|
||||||
|
- rsync
|
||||||
|
- rclone
|
||||||
|
- zsh
|
||||||
|
- antidote
|
||||||
|
- tmux
|
||||||
|
- vim
|
||||||
|
- vim-plug
|
9
roles/fzf/tasks/install/alpine.yml
Normal file
9
roles/fzf/tasks/install/alpine.yml
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
---
|
||||||
|
# FZF on alpine
|
||||||
|
|
||||||
|
- name: (alp) FZF installation
|
||||||
|
community.general.apk:
|
||||||
|
name: fzf
|
||||||
|
state: present
|
||||||
|
update_cache: true
|
||||||
|
become: true
|
9
roles/fzf/tasks/install/archlinux.yml
Normal file
9
roles/fzf/tasks/install/archlinux.yml
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
---
|
||||||
|
# FZF on Arch
|
||||||
|
|
||||||
|
- name: (arch) FZF install
|
||||||
|
community.general.pacman:
|
||||||
|
name: fzf
|
||||||
|
state: present
|
||||||
|
update_cache: true
|
||||||
|
become: true
|
9
roles/fzf/tasks/install/debian.yml
Normal file
9
roles/fzf/tasks/install/debian.yml
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
---
|
||||||
|
# FZF on Debian
|
||||||
|
|
||||||
|
- name: (deb) FZF install
|
||||||
|
ansible.builtin.apt:
|
||||||
|
name: fzf
|
||||||
|
state: present
|
||||||
|
update_cache: true
|
||||||
|
become: true
|
21
roles/fzf/tasks/install/redhat.yml
Normal file
21
roles/fzf/tasks/install/redhat.yml
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
---
|
||||||
|
# FZF on RedHat
|
||||||
|
# reverting to installation from git repo
|
||||||
|
|
||||||
|
- name: (rHa) FZF - Build directory
|
||||||
|
ansible.builtin.file:
|
||||||
|
dest: "{{ lookup('ansible.builtin.env', 'HOME' ) }}/.fzf"
|
||||||
|
state: directory
|
||||||
|
owner: syntaxerrormmm
|
||||||
|
group: syntaxerrormmm
|
||||||
|
mode: '0755'
|
||||||
|
|
||||||
|
- name: (rHa) FZF - clone from git
|
||||||
|
ansible.builtin.git:
|
||||||
|
repo: https://github.com/junegunn/fzf.git
|
||||||
|
depth: 1
|
||||||
|
dest: "{{ lookup('ansible.builtin.env', 'HOME' ) }}/.fzf"
|
||||||
|
|
||||||
|
- name: (rHa) FZF - Installing
|
||||||
|
ansible.builtin.command: >-
|
||||||
|
{{ lookup('ansible.builtin.env', 'HOME' ) }}/.fzf/install
|
9
roles/fzf/tasks/install/void.yml
Normal file
9
roles/fzf/tasks/install/void.yml
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
---
|
||||||
|
# FZF - install on Void
|
||||||
|
|
||||||
|
- name: (void) FZF - install
|
||||||
|
community.general.xbps:
|
||||||
|
name: fzf
|
||||||
|
state: present
|
||||||
|
update_cache: true
|
||||||
|
become: true
|
13
roles/fzf/tasks/main.yml
Normal file
13
roles/fzf/tasks/main.yml
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
---
|
||||||
|
# Installation of fzf
|
||||||
|
|
||||||
|
- name: Installation
|
||||||
|
ansible.builtin.include_tasks: "install/{{ ansible_os_family | lower }}.yml"
|
||||||
|
args:
|
||||||
|
apply:
|
||||||
|
tags:
|
||||||
|
- fzf
|
||||||
|
- fzf-install
|
||||||
|
tags:
|
||||||
|
- fzf
|
||||||
|
- fzf-install
|
14
roles/git/tasks/configuration.yml
Normal file
14
roles/git/tasks/configuration.yml
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
---
|
||||||
|
# Configuring git
|
||||||
|
|
||||||
|
- name: Configuring git username
|
||||||
|
ansible.builtin.git_config:
|
||||||
|
name: user.name
|
||||||
|
scope: global
|
||||||
|
value: "Emiliano Vavassori"
|
||||||
|
|
||||||
|
- name: Configuring git email
|
||||||
|
ansible.builtin.git_config:
|
||||||
|
name: user.email
|
||||||
|
scope: global
|
||||||
|
value: syntaxerrormmm@gmail.com
|
9
roles/git/tasks/install/alpine.yml
Normal file
9
roles/git/tasks/install/alpine.yml
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
---
|
||||||
|
# git on alpine
|
||||||
|
|
||||||
|
- name: (alp) installing git
|
||||||
|
community.general.apk:
|
||||||
|
name: git
|
||||||
|
state: present
|
||||||
|
update_cache: true
|
||||||
|
become: true
|
9
roles/git/tasks/install/archlinux.yml
Normal file
9
roles/git/tasks/install/archlinux.yml
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
---
|
||||||
|
# git on Archlinux
|
||||||
|
|
||||||
|
- name: (arch) installing git
|
||||||
|
community.general.pacman:
|
||||||
|
name: git
|
||||||
|
state: present
|
||||||
|
update_cache: true
|
||||||
|
become: true
|
9
roles/git/tasks/install/debian.yml
Normal file
9
roles/git/tasks/install/debian.yml
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
---
|
||||||
|
# git on Debian
|
||||||
|
|
||||||
|
- name: (deb) installing git
|
||||||
|
ansible.builtin.apt:
|
||||||
|
name: git
|
||||||
|
state: present
|
||||||
|
update_cache: true
|
||||||
|
become: true
|
9
roles/git/tasks/install/redhat.yml
Normal file
9
roles/git/tasks/install/redhat.yml
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
---
|
||||||
|
# git on RedHat
|
||||||
|
|
||||||
|
- name: (rHa) installing git
|
||||||
|
ansible.builtin.yum:
|
||||||
|
name: git
|
||||||
|
state: present
|
||||||
|
update_cache: true
|
||||||
|
become: true
|
9
roles/git/tasks/install/void.yml
Normal file
9
roles/git/tasks/install/void.yml
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
---
|
||||||
|
# git on void
|
||||||
|
|
||||||
|
- name: (void) installing git
|
||||||
|
community.general.xbps:
|
||||||
|
name: git
|
||||||
|
state: present
|
||||||
|
update_cache: true
|
||||||
|
become: true
|
19
roles/git/tasks/main.yml
Normal file
19
roles/git/tasks/main.yml
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
---
|
||||||
|
# Installing and configuring git
|
||||||
|
|
||||||
|
- name: Installation
|
||||||
|
ansible.builtin.include_tasks: "install/{{ ansible_os_family | lower }}.yml"
|
||||||
|
args:
|
||||||
|
apply:
|
||||||
|
tags:
|
||||||
|
- git
|
||||||
|
- git-install
|
||||||
|
tags:
|
||||||
|
- git
|
||||||
|
- git-install
|
||||||
|
|
||||||
|
- name: Configuring git
|
||||||
|
ansible.builtin.import_tasks: configuration.yml
|
||||||
|
tags:
|
||||||
|
- git
|
||||||
|
- git-config
|
11
roles/pip/tasks/install/alpine.yml
Normal file
11
roles/pip/tasks/install/alpine.yml
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
---
|
||||||
|
# pip on alpine
|
||||||
|
|
||||||
|
- name: (alp) installing pip
|
||||||
|
community.general.apk:
|
||||||
|
name:
|
||||||
|
- py3-pip
|
||||||
|
- py3-virtualenv
|
||||||
|
state: present
|
||||||
|
update_cache: true
|
||||||
|
become: true
|
11
roles/pip/tasks/install/archlinux.yml
Normal file
11
roles/pip/tasks/install/archlinux.yml
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
---
|
||||||
|
# pip on Archlinux
|
||||||
|
|
||||||
|
- name: (arch) installing pip
|
||||||
|
community.general.pacman:
|
||||||
|
name:
|
||||||
|
- python-pip
|
||||||
|
- python-virtualenv
|
||||||
|
state: present
|
||||||
|
update_cache: true
|
||||||
|
become: true
|
11
roles/pip/tasks/install/debian.yml
Normal file
11
roles/pip/tasks/install/debian.yml
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
---
|
||||||
|
# Pip on debian
|
||||||
|
|
||||||
|
- name: (deb) installing pip
|
||||||
|
ansible.builtin.apt:
|
||||||
|
name:
|
||||||
|
- python3-pip
|
||||||
|
- python3-virtualenv
|
||||||
|
state: present
|
||||||
|
update_cache: true
|
||||||
|
become: true
|
11
roles/pip/tasks/install/redhat.yml
Normal file
11
roles/pip/tasks/install/redhat.yml
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
---
|
||||||
|
# pip on redhat
|
||||||
|
|
||||||
|
- name: (rHa) installing pip
|
||||||
|
ansible.builtin.yum:
|
||||||
|
name:
|
||||||
|
- python3-pip
|
||||||
|
- python-virtualenv
|
||||||
|
state: present
|
||||||
|
update_cache: true
|
||||||
|
become: true
|
11
roles/pip/tasks/install/void.yml
Normal file
11
roles/pip/tasks/install/void.yml
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
---
|
||||||
|
# pip on void
|
||||||
|
|
||||||
|
- name: (void) installing pip
|
||||||
|
community.general.xbps:
|
||||||
|
name:
|
||||||
|
- python-pip
|
||||||
|
- python3-virtualenv
|
||||||
|
state: present
|
||||||
|
update_cache: true
|
||||||
|
become: true
|
13
roles/pip/tasks/main.yml
Normal file
13
roles/pip/tasks/main.yml
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
---
|
||||||
|
# Verifying pip is installed.
|
||||||
|
|
||||||
|
- name: Installing pip
|
||||||
|
ansible.builtin.include_tasks: "install/{{ ansible_os_family | lower }}.yml"
|
||||||
|
args:
|
||||||
|
apply:
|
||||||
|
tags:
|
||||||
|
- pip
|
||||||
|
- pip-install
|
||||||
|
tags:
|
||||||
|
- pip
|
||||||
|
- pip-install
|
7
roles/rclone/tasks/install/alpine.yml
Normal file
7
roles/rclone/tasks/install/alpine.yml
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
---
|
||||||
|
- name: (alp) installing rclone
|
||||||
|
community.general.apk:
|
||||||
|
name: rclone
|
||||||
|
state: present
|
||||||
|
update_cache: true
|
||||||
|
become: true
|
7
roles/rclone/tasks/install/archlinux.yml
Normal file
7
roles/rclone/tasks/install/archlinux.yml
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
---
|
||||||
|
- name: (arch) installing rclone
|
||||||
|
community.general.pacman:
|
||||||
|
name: rclone
|
||||||
|
state: present
|
||||||
|
update_cache: true
|
||||||
|
become: true
|
7
roles/rclone/tasks/install/debian.yml
Normal file
7
roles/rclone/tasks/install/debian.yml
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
---
|
||||||
|
- name: (deb) installing rclone
|
||||||
|
ansible.builtin.apt:
|
||||||
|
name: rclone
|
||||||
|
state: present
|
||||||
|
update_cache: true
|
||||||
|
become: true
|
7
roles/rclone/tasks/install/redhat.yml
Normal file
7
roles/rclone/tasks/install/redhat.yml
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
---
|
||||||
|
- name: (rHa) installing rclone
|
||||||
|
ansible.builtin.yum:
|
||||||
|
name: rclone
|
||||||
|
state: present
|
||||||
|
update_cache: true
|
||||||
|
become: true
|
7
roles/rclone/tasks/install/void.yml
Normal file
7
roles/rclone/tasks/install/void.yml
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
---
|
||||||
|
- name: (void) installing rclone
|
||||||
|
community.general.xbps:
|
||||||
|
name: rclone
|
||||||
|
state: present
|
||||||
|
update_cache: true
|
||||||
|
become: true
|
13
roles/rclone/tasks/main.yml
Normal file
13
roles/rclone/tasks/main.yml
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
---
|
||||||
|
# Rclone
|
||||||
|
|
||||||
|
- name: Installation
|
||||||
|
ansible.builtin.include_tasks: "install/{{ ansible_os_family | lower }}.yml"
|
||||||
|
args:
|
||||||
|
apply:
|
||||||
|
tags:
|
||||||
|
- rclone
|
||||||
|
- rclone-install
|
||||||
|
tags:
|
||||||
|
- rclone
|
||||||
|
- rclone-install
|
9
roles/rsync/tasks/install/alpine.yml
Normal file
9
roles/rsync/tasks/install/alpine.yml
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
---
|
||||||
|
# rsync
|
||||||
|
|
||||||
|
- name: (alp) installing rsync
|
||||||
|
community.general.apk:
|
||||||
|
name: rsync
|
||||||
|
state: present
|
||||||
|
update_cache: true
|
||||||
|
become: true
|
7
roles/rsync/tasks/install/archlinux.yml
Normal file
7
roles/rsync/tasks/install/archlinux.yml
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
---
|
||||||
|
- name: (arch) installing rsync
|
||||||
|
community.general.pacman:
|
||||||
|
name: rsync
|
||||||
|
state: present
|
||||||
|
update_cache: true
|
||||||
|
become: true
|
7
roles/rsync/tasks/install/debian.yml
Normal file
7
roles/rsync/tasks/install/debian.yml
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
---
|
||||||
|
- name: (deb) installing rsync
|
||||||
|
ansible.builtin.apt:
|
||||||
|
name: rsync
|
||||||
|
state: present
|
||||||
|
update_cache: true
|
||||||
|
become: true
|
7
roles/rsync/tasks/install/redhat.yml
Normal file
7
roles/rsync/tasks/install/redhat.yml
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
---
|
||||||
|
- name: (rHa) installing rsync
|
||||||
|
ansible.builtin.yum:
|
||||||
|
name: rsync
|
||||||
|
state: present
|
||||||
|
update_cache: true
|
||||||
|
become: true
|
7
roles/rsync/tasks/install/void.yml
Normal file
7
roles/rsync/tasks/install/void.yml
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
---
|
||||||
|
- name: (void) installing rsync
|
||||||
|
community.general.xbps:
|
||||||
|
name: rsync
|
||||||
|
state: present
|
||||||
|
update_cache: true
|
||||||
|
become: true
|
13
roles/rsync/tasks/main.yml
Normal file
13
roles/rsync/tasks/main.yml
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
---
|
||||||
|
# Rsync
|
||||||
|
|
||||||
|
- name: Installation
|
||||||
|
ansible.builtin.include_tasks: "install/{{ ansible_os_family | lower }}.yml"
|
||||||
|
args:
|
||||||
|
apply:
|
||||||
|
tags:
|
||||||
|
- rsync
|
||||||
|
- rsync-install
|
||||||
|
tags:
|
||||||
|
- rsync
|
||||||
|
- rsync-install
|
2
roles/tmux/defaults/main.yml
Normal file
2
roles/tmux/defaults/main.yml
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
---
|
||||||
|
dotfdir: "{{ lookup('ansible.builtin.env', 'HOME' ) }}/.dotfiles"
|
32
roles/tmux/tasks/configuration.yml
Normal file
32
roles/tmux/tasks/configuration.yml
Normal 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
|
7
roles/tmux/tasks/install/alpine.yml
Normal file
7
roles/tmux/tasks/install/alpine.yml
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
---
|
||||||
|
- name: (alp) installing tmux
|
||||||
|
community.general.apk:
|
||||||
|
name: tmux
|
||||||
|
state: present
|
||||||
|
update_cache: true
|
||||||
|
become: true
|
7
roles/tmux/tasks/install/archlinux.yml
Normal file
7
roles/tmux/tasks/install/archlinux.yml
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
---
|
||||||
|
- name: (arch) installing tmux
|
||||||
|
community.general.pacman:
|
||||||
|
name: tmux
|
||||||
|
state: present
|
||||||
|
update_cache: true
|
||||||
|
become: true
|
7
roles/tmux/tasks/install/debian.yml
Normal file
7
roles/tmux/tasks/install/debian.yml
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
---
|
||||||
|
- name: (deb) installing tmux
|
||||||
|
ansible.builtin.apt:
|
||||||
|
name: tmux
|
||||||
|
state: present
|
||||||
|
update_cache: true
|
||||||
|
become: true
|
7
roles/tmux/tasks/install/redhat.yml
Normal file
7
roles/tmux/tasks/install/redhat.yml
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
---
|
||||||
|
- name: (rHa) installing tmux
|
||||||
|
ansible.builtin.yum:
|
||||||
|
name: tmux
|
||||||
|
state: present
|
||||||
|
update_cache: true
|
||||||
|
become: true
|
7
roles/tmux/tasks/install/void.yml
Normal file
7
roles/tmux/tasks/install/void.yml
Normal 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
23
roles/tmux/tasks/main.yml
Normal 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."
|
5
roles/vim-plug/handlers/main.yml
Normal file
5
roles/vim-plug/handlers/main.yml
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
---
|
||||||
|
- name: repolist
|
||||||
|
ansible.builtin.command: yum repolist
|
||||||
|
become: true
|
||||||
|
become_user: root
|
10
roles/vim-plug/tasks/depend/alpine.yml
Normal file
10
roles/vim-plug/tasks/depend/alpine.yml
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
---
|
||||||
|
- name: (alp) installing plugin dependencies
|
||||||
|
community.general.apk:
|
||||||
|
name:
|
||||||
|
- nodejs
|
||||||
|
- npm
|
||||||
|
- yarn
|
||||||
|
state: present
|
||||||
|
update_cache: true
|
||||||
|
become: true
|
10
roles/vim-plug/tasks/depend/archlinux.yml
Normal file
10
roles/vim-plug/tasks/depend/archlinux.yml
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
---
|
||||||
|
- name: (arch) installing plugin dependencies
|
||||||
|
community.general.pacman:
|
||||||
|
name:
|
||||||
|
- nodejs
|
||||||
|
- npm
|
||||||
|
- yarn
|
||||||
|
state: present
|
||||||
|
update_cache: true
|
||||||
|
become: true
|
10
roles/vim-plug/tasks/depend/debian.yml
Normal file
10
roles/vim-plug/tasks/depend/debian.yml
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
---
|
||||||
|
- name: (deb) installing plugin dependencies
|
||||||
|
ansible.builtin.apt:
|
||||||
|
name:
|
||||||
|
- nodejs
|
||||||
|
- npm
|
||||||
|
- yarnpkg
|
||||||
|
state: present
|
||||||
|
update_cache: true
|
||||||
|
become: true
|
34
roles/vim-plug/tasks/depend/redhat.yml
Normal file
34
roles/vim-plug/tasks/depend/redhat.yml
Normal file
@ -0,0 +1,34 @@
|
|||||||
|
---
|
||||||
|
- name: (rHa) installing plugin dependencies
|
||||||
|
ansible.builtin.yum:
|
||||||
|
name:
|
||||||
|
- nodejs
|
||||||
|
- npm
|
||||||
|
state: present
|
||||||
|
update_cache: true
|
||||||
|
become: true
|
||||||
|
|
||||||
|
# Yarn is available in other repository.
|
||||||
|
- name: (rHa) installing yarn repo
|
||||||
|
ansible.builtin.get_url:
|
||||||
|
url: "https://dl.yarnpkg.com/rpm/yarn.repo"
|
||||||
|
dest: /etc/yum.repos.d/yarn.repo
|
||||||
|
become: true
|
||||||
|
notify: repolist
|
||||||
|
|
||||||
|
- name: (rHa) installing yarn gpg key
|
||||||
|
ansible.builtin.rpm_key:
|
||||||
|
key: "http://dl.yarnpkg.com/rpm/pubkey.gpg"
|
||||||
|
state: present
|
||||||
|
become: true
|
||||||
|
notify: repolist
|
||||||
|
|
||||||
|
- name: Flushing handlers
|
||||||
|
ansible.builtin.meta: flush_handlers
|
||||||
|
|
||||||
|
- name: (rHa) installing yarn
|
||||||
|
ansible.builtin.yum:
|
||||||
|
name: yarn
|
||||||
|
state: present
|
||||||
|
update_cache: true
|
||||||
|
become: true
|
9
roles/vim-plug/tasks/depend/void.yml
Normal file
9
roles/vim-plug/tasks/depend/void.yml
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
---
|
||||||
|
- name: (void) installing plugin dependencies
|
||||||
|
community.general.xbps:
|
||||||
|
name:
|
||||||
|
- nodejs
|
||||||
|
- yarn-bin
|
||||||
|
state: present
|
||||||
|
update_cache: true
|
||||||
|
become: true
|
20
roles/vim-plug/tasks/installation.yml
Normal file
20
roles/vim-plug/tasks/installation.yml
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
---
|
||||||
|
# Installation tasks
|
||||||
|
|
||||||
|
- name: Installing plugin dependencies
|
||||||
|
ansible.builtin.include_tasks: "depend/{{ ansible_os_family | lower }}.yml"
|
||||||
|
|
||||||
|
- name: Creating autoload dir
|
||||||
|
ansible.builtin.file:
|
||||||
|
path: "{{ lookup('ansible.builtin.env', 'HOME' ) }}/.vim/autoload"
|
||||||
|
state: directory
|
||||||
|
owner: syntaxerrormmm
|
||||||
|
group: syntaxerrormmm
|
||||||
|
|
||||||
|
- name: Installing vim-plug from git
|
||||||
|
ansible.builtin.get_url:
|
||||||
|
url: "https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim"
|
||||||
|
dest: "{{ lookup('ansible.builtin.env', 'HOME' ) }}/.vim/autoload/plug.vim"
|
||||||
|
owner: syntaxerrormmm
|
||||||
|
group: syntaxerrormmm
|
||||||
|
mode: '0644'
|
12
roles/vim-plug/tasks/main.yml
Normal file
12
roles/vim-plug/tasks/main.yml
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
---
|
||||||
|
# Configuring vim-plug
|
||||||
|
|
||||||
|
- name: Installation
|
||||||
|
ansible.builtin.import_tasks: installation.yml
|
||||||
|
tags:
|
||||||
|
- vim-plug
|
||||||
|
- vim-plug-install
|
||||||
|
|
||||||
|
- name: Configuration
|
||||||
|
ansible.builtin.shell: >-
|
||||||
|
vim +PlugInstall +qall
|
2
roles/vim/defaults/main.yml
Normal file
2
roles/vim/defaults/main.yml
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
---
|
||||||
|
dotfdir: "{{ lookup('ansible.builtin.env', 'HOME' ) }}/.dotfiles"
|
18
roles/vim/tasks/configuration.yml
Normal file
18
roles/vim/tasks/configuration.yml
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
---
|
||||||
|
# Configuring vim
|
||||||
|
|
||||||
|
- name: Linking main file
|
||||||
|
ansible.builtin.file:
|
||||||
|
src: "{{ dotfdir }}/vimrc"
|
||||||
|
dest: "{{ lookup('ansible.builtin.env', 'HOME' ) }}/.vimrc"
|
||||||
|
state: link
|
||||||
|
owner: syntaxerrormmm
|
||||||
|
group: syntaxerrormmm
|
||||||
|
|
||||||
|
- name: Linking main folder
|
||||||
|
ansible.builtin.file:
|
||||||
|
src: "{{ dotfdir }}/vim"
|
||||||
|
dest: "{{ lookup('ansible.builtin.env', 'HOME' ) }}/.vim"
|
||||||
|
state: link
|
||||||
|
owner: syntaxerrormmm
|
||||||
|
group: syntaxerrormmm
|
7
roles/vim/tasks/install/alpine.yml
Normal file
7
roles/vim/tasks/install/alpine.yml
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
---
|
||||||
|
- name: (alp) installing vim
|
||||||
|
community.general.apk:
|
||||||
|
name: vim
|
||||||
|
state: present
|
||||||
|
update_cache: true
|
||||||
|
become: true
|
7
roles/vim/tasks/install/archlinux.yml
Normal file
7
roles/vim/tasks/install/archlinux.yml
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
---
|
||||||
|
- name: (arch) installing vim
|
||||||
|
community.general.pacman:
|
||||||
|
name: vim
|
||||||
|
state: present
|
||||||
|
update_cache: true
|
||||||
|
become: true
|
7
roles/vim/tasks/install/debian.yml
Normal file
7
roles/vim/tasks/install/debian.yml
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
---
|
||||||
|
- name: (deb) installing vim
|
||||||
|
ansible.builtin.apt:
|
||||||
|
name: vim
|
||||||
|
state: present
|
||||||
|
update_cache: true
|
||||||
|
become: true
|
7
roles/vim/tasks/install/redhat.yml
Normal file
7
roles/vim/tasks/install/redhat.yml
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
---
|
||||||
|
- name: (rHa) installing vim
|
||||||
|
ansible.builtin.yum:
|
||||||
|
name: vim
|
||||||
|
state: present
|
||||||
|
update_cache: true
|
||||||
|
become: true
|
7
roles/vim/tasks/install/void.yml
Normal file
7
roles/vim/tasks/install/void.yml
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
---
|
||||||
|
- name: (void) installing Vim
|
||||||
|
community.general.xbps:
|
||||||
|
name: vim
|
||||||
|
state: present
|
||||||
|
update_cache: true
|
||||||
|
become: true
|
19
roles/vim/tasks/main.yml
Normal file
19
roles/vim/tasks/main.yml
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
---
|
||||||
|
# Vim
|
||||||
|
|
||||||
|
- name: Installation
|
||||||
|
ansible.builtin.include_tasks: "install/{{ ansible_os_family | lower }}.yml"
|
||||||
|
args:
|
||||||
|
apply:
|
||||||
|
tags:
|
||||||
|
- vim
|
||||||
|
- vim-install
|
||||||
|
tags:
|
||||||
|
- vim
|
||||||
|
- vim-install
|
||||||
|
|
||||||
|
- name: Configuration
|
||||||
|
ansible.builtin.import_tasks: configuration.yml
|
||||||
|
tags:
|
||||||
|
- vim
|
||||||
|
- vim-config
|
2
roles/zsh/defaults/main.yml
Normal file
2
roles/zsh/defaults/main.yml
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
---
|
||||||
|
dotfdir: "{{ lookup('ansible.builtin.env', 'HOME' }}/.dotfiles"
|
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…
Reference in New Issue
Block a user