add nvim from git

This commit is contained in:
kekskurse 2024-04-29 10:33:56 +02:00
parent 6646de3bc6
commit 546618c7ab
1 changed files with 32 additions and 1 deletions

View File

@ -20,9 +20,13 @@
- net-tools - net-tools
- unzip - unzip
- btop - btop
- neovim
- git - git
- name: Remove "neovim" package
ansible.builtin.apt:
name: neovim
state: absent
- name: Create swap file - name: Create swap file
command: dd if=/dev/zero of={{ swapfile_path }} bs=1M count={{ swapfile_size }} command: dd if=/dev/zero of={{ swapfile_path }} bs=1M count={{ swapfile_size }}
args: args:
@ -98,6 +102,33 @@
ansible.builtin.command: "b2 authorize_account {{ b2keyID }} {{ b2applicationKey }}" ansible.builtin.command: "b2 authorize_account {{ b2keyID }} {{ b2applicationKey }}"
# Install neovim from source if not exists, needed because the apt version ist 7.x but we need 8.x
- name: Check if nviom config folder exists
stat:
path: "/opt/nvim-linux64/bin"
register: nvim
- name: Download foo.conf
ansible.builtin.get_url:
url: "https://github.com/neovim/neovim/releases/download/v0.9.5/nvim-linux64.tar.gz"
dest: "/tmp/nvim-linux64.tar.gz"
mode: '0440'
when: not nvim.stat.exists
- name: Extract foo.tgz into /var/lib/foo
ansible.builtin.unarchive:
src: "/tmp/nvim-linux64.tar.gz"
dest: /opt
when: not nvim.stat.exists
- name: Ensure SELinux is set to enforcing mode
ansible.builtin.lineinfile:
path: ~/bashrc
regexp: '^export PATH'
line: 'export PATH="$PATH:/opt/nvim-linux64/bin"'
when: not nvim.stat.exists
# Setup neovim # Setup neovim
- name: Check if nviom config folder exists - name: Check if nviom config folder exists
stat: stat: