move a lot of configuration around

This commit is contained in:
Matthew Stobbs
2025-02-11 20:22:42 -07:00
parent 275f5df722
commit 6d52cc6a4d
33 changed files with 180 additions and 117 deletions

View File

@@ -1,17 +1,50 @@
# vim: set filetype=yaml.ansible :
---
- ansible.builtin.include_vars:
- name: Load neovim config
ansible.builtin.include_vars:
file: neovim.yml
name: _neovim
- ansible.builtin.set_fact:
- name: Combine neovim default and user config
ansible.builtin.set_fact:
pkgconfig_neovim: "{{ _neovim | ansible.builtin.combine(pkgconfig.neovim) }}"
- name: append neovim to srcpkgs
- name: Set neovim facts
ansible.builtin.set_fact:
srcpkgs: "{{ srcpkgs + ['neovim'] }}"
when: not pkgconfig_neovim.use_syspkg
nvim:
appimg: "{{ pkgconfig_neovim.appimage }}"
become: "{{ pkgconfig_neovim.dobecome }}"
bldtype: "{{ pkgconfig_neovim.build_type }}"
group: "{{ pkgconfig_neovim.group }}"
instdir: "{{ pkgconfig_neovim.install_dir }}"
instmtd: "{{ pkgconfig_neovim.install_method }}"
instpfx: "{{ pkgconfig_neovim.install_prefix }}"
owner: "{{ pkgconfig_neovim.owner }}"
ver: "{{ pkgconfig_neovim.version }}"
- name: append neovim to syspkgs
- name: Linux specific install
when:
- ansible_system == 'Linux'
block:
# install system package when on an up to date distro
- name: Append to syspkgs
when:
- (ansible_distribution == 'Fedora') or
(ansible_distribution == 'Ubuntu')
- name: Append to appimages
when:
- nvim.instmtd == 'appimage'
ansible.builtin.set_fact:
appimages: "{{ appimages + ['neovim'] }}"
- name: Append neovim to syspkgs
when:
- ansible_os_family == 'Darwin'
ansible.builtin.set_fact:
syspkgs: "{{ syspkgs + ['neovim'] }}"
when: pkgconfig_neovim.use_syspkg
- name: Append neovim to srcpkgs
when:
- nvim.instmtd == 'source'
ansible.builtin.set_fact:
srcpkgs: "{{ srcpkgs + ['neovim'] }}"