added support for alpine linux

streamlined vimrc and color directory
This commit is contained in:
Radar231 2022-01-03 07:49:37 -05:00
parent 2a50eeaf52
commit 9655d44a61
1 changed files with 36 additions and 48 deletions

View File

@ -15,6 +15,26 @@
- debug: msg="Installing custom vim setup"
############################################################
# ensure vim is installed
#######################################
- name: install vim (Debian)
apt:
name:
- vim
- vim-scripts
state: latest
when: ansible_os_family == "Debian"
#######################################
- name: install vim (Alpine)
apk:
name:
- vim
state: latest
when: ansible_distribution == "Alpine"
############################################################
- name: Create .vim directory
file:
@ -34,62 +54,30 @@
mode: "0755"
############################################################
- name: Make sure vim-scripts package is installed (Ubuntu)
apt:
name: vim-scripts
state: latest
when: ansible_os_family == "Debian"
############################################################
- name: Make sure vim-enhanced package is install (Centos)
yum:
name: vim-enhanced
state: latest
when: ansible_distribution == "CentOS"
############################################################
- name: Create colors symlink (Ubuntu)
- name: Create .vim/colors directory
file:
path: "{{ homedir }}/.vim/colors"
src: "/usr/share/vim-scripts/colors"
state: link
when: ansible_distribution == "Ubuntu" or ansible_distribution == "Pop!_OS" or ansible_distribution == "Linux Mint"
state: directory
owner: "{{ username }}"
group: "{{ username }}"
mode: "0755"
############################################################
- name: Create colors symlink (Debian)
file:
path: "{{ homedir }}/.vim/colors"
src: "/usr/share/vim-scripts/color_sampler_pack/colors"
state: link
when: ansible_distribution == "Debian"
############################################################
- name: Create colors symlink (CentOS)
file:
path: "{{ homedir }}/.vim/colors"
src: "/usr/share/vim/vim74/colors"
state: link
when: ansible_distribution == "CentOS"
############################################################
- name: Copy in default vimrc (Ubuntu)
- name: Copy calmar256-dark color file
copy:
src: "files/vimrc.ubuntu"
src: "files/calmar256-dark.vim"
dest: "{{ homedir }}/.vim/colors/calmar256-dark.vim"
owner: "{{ username }}"
group: "{{ username }}"
mode: "0644"
############################################################
- name: Copy vimrc
copy:
src: "files/vimrc"
dest: "{{ homedir }}/.vimrc"
owner: "{{ username }}"
group: "{{ username }}"
mode: "0644"
when: ansible_os_family == "Debian"
############################################################
- name: Copy in default vimrc (CentOS)
copy:
src: "files/vimrc.centos"
dest: "{{ homedir }}/.vimrc"
owner: "{{ username }}"
group: "{{ username }}"
mode: "0644"
when: ansible_distribution == "CentOS"
# EOF