Applied ansible-lint fixes

This commit is contained in:
Sonny Bakker 2026-01-16 10:20:25 +01:00
parent 24b567fc57
commit 347104529f
20 changed files with 239 additions and 220 deletions

View file

@ -1,7 +1,8 @@
---
- name: Install language servers on debian hosts
become: true
community.general.npm:
name: '{{ item }}'
name: "{{ item }}"
global: true
loop: '{{ language_servers | map(attribute="package") | list }}'
@ -9,16 +10,16 @@
become: true
ansible.builtin.file:
state: directory
path: '{{ neovim.install_path }}'
owner: '{{ ansible_user_id }}'
group: '{{ ansible_user_gid }}'
mode: '0755'
path: "{{ neovim.install_path }}"
owner: "{{ ansible_user_id }}"
group: "{{ ansible_user_gid }}"
mode: "0755"
- name: Register the current neovim version
ansible.builtin.command:
argv:
- '{{ neovim.install_path }}/bin/nvim'
- '--version'
- "{{ neovim.install_path }}/bin/nvim"
- "--version"
register: neovim_stats
changed_when: false
ignore_errors: true
@ -30,21 +31,21 @@
- name: Download neovim {{ neovim.version }}
ansible.builtin.get_url:
url: 'https://github.com/neovim/neovim/releases/download/{{ neovim.version }}/nvim-linux-x86_64.tar.gz'
url: "https://github.com/neovim/neovim/releases/download/{{ neovim.version }}/nvim-linux-x86_64.tar.gz"
dest: /tmp/nvim-linux64.tar.gz
mode: '0755'
checksum: '{{ neovim.download_checksum }}'
mode: "0755"
checksum: "{{ neovim.download_checksum }}"
when: neovim_stats.rc > 0 or neovim_installed_version != neovim.version
register: neovim_download
- name: Extract downloaded neovim version
ansible.builtin.unarchive:
src: /tmp/nvim-linux64.tar.gz
dest: '{{ neovim.install_path }}'
dest: "{{ neovim.install_path }}"
extra_opts:
- '--strip-components=1'
- '--show-stored-names'
- '--overwrite'
- "--strip-components=1"
- "--show-stored-names"
- "--overwrite"
when: |
neovim_download.state == 'file'
and (neovim_installed_version is undefined or neovim_installed_version != neovim.version)
@ -52,6 +53,6 @@
- name: Add neovim to PATH
become: true
ansible.builtin.template:
src: 'templates/debian/nvim.profile.j2'
dest: '/etc/profile.d/neovim.sh'
mode: '0755'
src: "templates/debian/nvim.profile.j2"
dest: "/etc/profile.d/neovim.sh"
mode: "0755"