-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathnvim-unix-app-image.yml
55 lines (54 loc) · 1.96 KB
/
nvim-unix-app-image.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
- name: Download and Install NeoVim
hosts:
- all
- "*"
- localhost
gather_facts: false
vars_files: vars.yml
tasks:
- name: Get latest NeoVim release
uri:
url: "https://api.github.com/repos/{{ github_repo_owner }}/{{ github_repo_name }}/releases/latest"
return_content: yes
validate_certs: no
register: latest_release
- name: Extract download URL from release response
set_fact:
download_url: "{{ latest_release.json.assets | selectattr('name', 'match', '.*\\.appimage$') | map(attribute='browser_download_url') | first }}"
- name: Download NeoVim AppImage
get_url:
url: "{{ download_url }}"
dest: "/tmp/nvim.appimage"
mode: a+x
- name: Create destination directory
file:
path: "{{ neovim_install_dir }}/nvim"
state: directory
- name: Move NeoVim AppImage to install directory
shell: "mv /tmp/nvim.appimage {{ neovim_install_dir }}/nvim"
- name: Set execute permissions on NeoVim AppImage
file:
path: "{{ neovim_install_dir }}/nvim/nvim.appimage"
mode: a+x
- name: Extract NeoVim AppImage
shell: "{{ neovim_install_dir }}/nvim/nvim.appimage --appimage-extract"
- name: Set execute permissions on NeoVim AppImage
file:
path: "{{ neovim_install_dir }}/nvim/squashfs-root/usr/bin/nvim"
mode: 0755
- name: Create symlink to neovim executable
file:
src: "{{ neovim_install_dir }}/nvim/squashfs-root/usr/bin/nvim"
dest: "/usr/local/bin/nvim"
state: link
force: true
- name: Install Packer
git:
repo: https://github.com/wbthomason/packer.nvim
dest: "{{ home }}/.local/share/nvim/site/pack/packer/opt/packer.nvim"
depth: 1
- name: Add init
get_url:
url: https://raw.githubusercontent.com/c-jamie/dev-toolchain/master/dotfiles/init.lua
dest: "{{ home }}/.config/nvim/init.lua"
mode: "0700"