WIP: migrate every package to a single file style #1

Draft
stobbsm wants to merge 48 commits from move_to_single_file_pkgs into main
4 changed files with 43 additions and 45 deletions
Showing only changes of commit 7ca12c74e5 - Show all commits

View File

@@ -1,23 +0,0 @@
# vim: set filetype=yaml.ansible :
---
- name: Set go configuration
ansible.builtin.set_fact:
go:
method: archive
arch: "{{ pkgconfig.go.archmap[ansible_architecture] }}"
ext: "{{ pkgconfig.go.extmap[ansible_system] }}"
sys: "{{ ansible_system | lower }}"
vers: "{{ pkgconfig.go.version }}"
- name: Set go composite facts
ansible.builtin.set_fact:
go:
method: archive
arch: "{{ go.arch }}"
archive: "go{{ go.vers }}.{{ go.sys }}-{{ go.arch }}.{{ pkgconfig.go.extmap[ansible_system] }}"
ext: "{{ go.ext }}"
prefix: "{% if ansible_distribution == 'MacOSX' %}/{% else %}{{ path.prefix }}{% endif %}"
sum: "{{ pkgconfig.go.sums[go.vers][ansible_system][go.arch] }}"
sys: "{{ go.sys }}"
base_url: "{{ pkgconfig.go.base_url }}"
vers: "{{ go.vers }}"

View File

@@ -2,28 +2,26 @@
---
- name: Configure ansible
when:
- __ansible_configured is undefined or
not __ansible_configured
- "'ansible' not in __configured"
block:
- name: Set ansible install method
when:
- ansible_install_method is undefined
ansible.builtin.set_fact:
ansible_install_method: "{% if install_method in ansible_install_methods %}{{ install_method }}{% else %}{{ ansible_install_methods[0] }}{% endif %}"
ansible_pkgname:
RedHat: ansible
Debian: ansible
Alpine: ansible
Archlinux: ansible
- name: Append ansible to system package manager install list
when:
- ansible_install_method == 'system'
ansible.builtin.set_fact:
pkg_sys: "{{ pkg_sys + [ansible_pkgname[ansible_os_family]] }}"
- name: Append ansible to pipx install list
when:
- ansible_install_method == 'source'
ansible.builtin.set_fact:
pkg_pipx: "{{ pkg_pipx + [ansible_pip_pkgname] }}"
- name: Complete ansible configuration
ansible.builtin.set_fact:
__ansible_configured: true
- name: Append ansible to system package manager install list
when:
- ansible_install_method == 'system'
ansible.builtin.set_fact:
pkg_sys: "{{ pkg_sys + [ansible_pkgname[ansible_os_family]] }}"
- name: Append ansible to pipx install list
__configured: "{{ __configured | combine( { 'ansible': true } ) }}"

View File

@@ -2,12 +2,20 @@
---
- name: Add bashls
when:
- bashls_configured is undefined
- "'bashls' not in __configured"
block:
- name: Append bash-language-server to pkg_npm
- name: Set bashls install method
when:
- bashls_install_method is undefined
ansible.builtin.set_fact:
pkg_npm: "{{ pkg_npm + ['bash-language-server'] }}"
bashls_install_method: "{% if install_method in bashls_install_methods %}{{ install_method }}{% else %}{{ bashls_install_methods[0] }}{% endif %}"
- name: Append bash-language-server to pkg_npm
when:
- bashls_install_method == 'source'
ansible.builtin.set_fact:
pkg_npm: "{{ pkg_npm + [bashls_npm_pkgname] }}"
- name: Set bashls_configured
ansible.builtin.set_fact:
bashls_configured: true
__configured: "{{ __configured | combine( { 'bashls': true } ) }}"

View File

@@ -43,7 +43,7 @@ __add_to_path: [] # list of paths that should be in PATH
__var_to_env: {} # dict of variables to add to your env
# Per package variables
## {{{ air
# {{{ air
air_version: latest
air_build_files:
- bin/air
@@ -51,7 +51,7 @@ air_install_url: github.com/air-verse/air
air_pkg_deps:
- pkgs/go.yml
# }}}
## {{{ alacritty
# {{{ alacritty
alacritty_version: v0.16.1
alacritty_git_repo: https://github.com/alacritty/alacritty
alacritty_pkgname: alacritty
@@ -111,11 +111,26 @@ alacritty_build_deps:
- python3
- desktop-file-utils
# }}}
# {{{ ansible
ansible_install_methods:
- system
- source
ansible_pkgname:
RedHat: ansible
Debian: ansible
Alpine: ansible
Archlinux: ansible
# }}}
# {{{ ansible_ls
ansible_ls_version: latest
ansible_ls_pkg_deps:
- pkgs/npm.yml
# }}}
# {{{ bashls
bashls_install_methods:
- source
bashls_npm_pkgname: bash-language-server
# }}}
# {{{ go
go_archive_version: 1.25.6
go_archive_archmap: