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
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
|
Loading…
Add table
Add a link
Reference in a new issue