clean up, refactor, documentation
- reducing amount of splitting in configs - documenting configuration
This commit is contained in:
Binary file not shown.
|
Before Width: | Height: | Size: 19 KiB |
@@ -1,8 +0,0 @@
|
||||
[Desktop Entry]
|
||||
Encoding=UTF-8
|
||||
Version=1.0
|
||||
Type=Application
|
||||
Terminal=false
|
||||
Exec={{ _neovide.install_prefix }}/bin/neovide
|
||||
Name=Neovide
|
||||
Icon={{ _neovide.install_prefix }}/share/icons/neovide.png
|
||||
@@ -1,8 +1,4 @@
|
||||
---
|
||||
- ansible.builtin.include_vars:
|
||||
file: go.yml
|
||||
name: _go
|
||||
|
||||
- name: check go version
|
||||
ansible.builtin.command:
|
||||
cmd: "go version"
|
||||
@@ -10,15 +6,15 @@
|
||||
ignore_errors: true
|
||||
|
||||
- name: install/update go
|
||||
when: "'{{ _go.version }}' not in r_go_version.stdout"
|
||||
when: "'{{ pkgconfig.go.version }}' not in r_go_version.stdout"
|
||||
block:
|
||||
- name: set go arch
|
||||
ansible.builtin.set_fact:
|
||||
arch: "{{ _go.archmap[ansible_architecture] }}"
|
||||
arch: "{{ pkgconfig.go.archmap[ansible_architecture] }}"
|
||||
|
||||
- name: set go archive filename
|
||||
ansible.builtin.set_fact:
|
||||
go_archive: "go{{ _go.version }}.{{ ansible_system | lower }}-{{ arch }}.{{ _go.extmap[ansible_system] }}"
|
||||
go_archive: "go{{ pkgconfig.go.version }}.{{ ansible_system | lower }}-{{ arch }}.{{ pkgconfig.go.extmap[ansible_system] }}"
|
||||
tags:
|
||||
- dev
|
||||
- go
|
||||
@@ -35,7 +31,7 @@
|
||||
ansible.builtin.get_url:
|
||||
dest: "{{ d_go_dl_tmp.path }}/{{ go_archive }}"
|
||||
url: "https://go.dev/dl/{{ go_archive }}"
|
||||
checksum: "{{ _go[_go.version][ansible_system][arch] }}"
|
||||
checksum: "{{ pkgconfig.go[pkgconfig.go.version][ansible_system][arch] }}"
|
||||
decompress: false
|
||||
tags:
|
||||
- dev
|
||||
@@ -44,12 +40,12 @@
|
||||
- name: ensure go install dir exists
|
||||
become: true
|
||||
ansible.builtin.file:
|
||||
path: "{{ _go.install_path }}"
|
||||
path: "{{ pkgconfig.go.install_path }}"
|
||||
state: directory
|
||||
|
||||
- name: extract go package
|
||||
ansible.builtin.unarchive:
|
||||
dest: "{{ _go.install_path }}"
|
||||
dest: "{{ pkgconfig.go.install_path }}"
|
||||
src: "{{ d_go_dl_tmp.path }}/{{ go_archive }}"
|
||||
remote_src: true
|
||||
when: ansible_system == 'Linux'
|
||||
|
||||
@@ -1,8 +1,4 @@
|
||||
---
|
||||
- ansible.builtin.include_vars:
|
||||
file: neovide.yml
|
||||
name: _neovide
|
||||
|
||||
- name: build and install neovide
|
||||
become: true
|
||||
ansible.builtin.command:
|
||||
@@ -10,20 +6,20 @@
|
||||
- cargo
|
||||
- install
|
||||
- --root
|
||||
- "{% if ansible_os_family != 'Linux' %}.{% else %}{{ _neovide.install_prefix }}"
|
||||
- "{% if ansible_os_family != 'Linux' %}.{% else %}{{ pkgconfig.neovide.install_prefix }}"
|
||||
- --git
|
||||
- https://github.com/neovide/neovide.git
|
||||
- "{{ pkgconfig.neovide.git_repo }}"
|
||||
- --tag
|
||||
- "{{ _neovide.version }}"
|
||||
- "{{ pkgconfig.neovide.version }}"
|
||||
|
||||
- name: Copy neovide icon
|
||||
become: true
|
||||
ansible.builtin.copy:
|
||||
src: neovide/icon.png
|
||||
dest: "{{ _neovide.install_prefix }}/share/icons/neovide.png"
|
||||
dest: "{{ pkgconfig.neovide.install_prefix }}/share/icons/neovide.png"
|
||||
|
||||
- name: Copy neovide.desktop
|
||||
become: true
|
||||
ansible.builtin.templatefile:
|
||||
src: neovide/neovide.desktop
|
||||
dest: "{{ _neovide.install_prefix }}/share/applications/neovide.desktop"
|
||||
dest: "{{ pkgconfig.neovide.install_prefix }}/share/applications/neovide.desktop"
|
||||
|
||||
@@ -1,36 +1,55 @@
|
||||
- ansible.builtin.include_vars:
|
||||
file: neovim.yml
|
||||
name: _neovim
|
||||
|
||||
- name: create temp path
|
||||
ansible.builtin.tempfile:
|
||||
state: directory
|
||||
prefix: nvim.
|
||||
register: d_nvim_tmp
|
||||
|
||||
- name: clone neovim git repository
|
||||
ansible.builtin.git:
|
||||
depth: 1
|
||||
dest: "{{ d_nvim_tmp.path }}/neovim"
|
||||
repo: "{{ _neovim.git_repo }}"
|
||||
version: "v{{ _neovim.version }}"
|
||||
|
||||
- name: build neovim
|
||||
ansible.builtin.command:
|
||||
chdir: "{{ d_nvim_tmp.path }}/neovim"
|
||||
cmd:
|
||||
- make
|
||||
- "CMAKE_BUILD_Type={{ _neovim.build_type }}"
|
||||
- "CMAKE_INSTALL_PREFIX={{ _neovim.install_prefix }}"
|
||||
---
|
||||
- name: build neovim from source
|
||||
block:
|
||||
- name: create temp path
|
||||
ansible.builtin.tempfile:
|
||||
state: directory
|
||||
prefix: nvim.
|
||||
register: d_nvim_tmp
|
||||
|
||||
- name: clone neovim git repository
|
||||
ansible.builtin.git:
|
||||
depth: 1
|
||||
dest: "{{ d_nvim_tmp.path }}/neovim"
|
||||
repo: "{{ pkgconfig.neovim.git_repo }}"
|
||||
version: "{{ pkgconfig.neovim.version }}"
|
||||
|
||||
- name: build and install neovim
|
||||
ansible.builtin.make:
|
||||
chdir: "{{ d_nvim_tmp.path }}/neovim"
|
||||
params:
|
||||
CMAKE_BUILD_TYPE: "{{ pkgconfig.neovim.build_type }}"
|
||||
CMAKE_INSTALL_PREFIX: "{{ pkgconfig.neovim.install_prefix }}"
|
||||
target: install
|
||||
become: "{{ pkgconfig.neovim.become }}"
|
||||
become_user: "{% if pkgconfig.neovim.become %}{{ pkgconfig.neovim.owner }}{% else %}~{% endif %}"
|
||||
when: not pkgconfig.neovim.use_appimage
|
||||
|
||||
- name: install neovim appimage
|
||||
become: true
|
||||
ansible.builtin.get_url:
|
||||
url: https://github.com/neovim/neovim/releases/download/v{{ _neovim.version }}/nvim.appimage
|
||||
dest: /usr/local/bin/nvim
|
||||
checksum: sha256:6a021e9465fe3d3375e28c3e94c1c2c4f7d1a5a67e4a78cf52d18d77b1471390
|
||||
tags:
|
||||
- RedHat
|
||||
- linux
|
||||
- package
|
||||
block:
|
||||
- ansible.builin.file:
|
||||
state: directory
|
||||
mode: "0755"
|
||||
path: "{{ pkgconfig.neovim.install_dir }}"
|
||||
owner: "{{ pkgconfig.neovim.owner }}"
|
||||
group: "{{ pkgconfig.neovim.group }}"
|
||||
|
||||
- ansible.builtin.get_url:
|
||||
mode: "0755"
|
||||
decompress: false
|
||||
backup: true
|
||||
url: "{{ pkgconfig.neovim.appimage_url_pfx }}/{{ pkgconfig.neovim.version }}/nvim.appimage"
|
||||
checksum: "sha256:{{ pkgconfig.neovim.appimage_url_pfx }}/{{ pkgconfig.neovim.version }}/nvim.appimage.sha256sum"
|
||||
dest: "{{ pkgconfig.neovim.install_dir }}/nvim.appimage.{{ pkgconfig.neovim.version }}"
|
||||
owner: "{{ pkgconfig.neovim.owner }}"
|
||||
group: "{{ pkgconfig.neovim.group }}"
|
||||
|
||||
- ansible.builtin.file:
|
||||
state: link
|
||||
src: "{{ pkgconfig.neovim.install_dir }}/nvim.appimage.{{ pkgconfig.neovim.version }}"
|
||||
path: "{{ pkgconfig.neovim.install_prefix }}/bin/nvim"
|
||||
when:
|
||||
- pkgconfig.neovim.use_appimage
|
||||
become: "{{ pkgconfig.neovim.become }}"
|
||||
become_user: "{% if pkgconfig.neovim.become %}{{ pkgconfig.neovim.owner }}{% else %}~{% endif %}"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user