basic installs working
need to run tests on all the builds alone, should use a container system
This commit is contained in:
@@ -1,10 +1,10 @@
|
||||
# vim: set filetype=yaml.ansible :
|
||||
---
|
||||
- name: Install appimages
|
||||
- name: Install appimages {{ appimage.name }}
|
||||
become: "{{ install_become }}"
|
||||
become_user: "{{ install_become_user }}"
|
||||
block:
|
||||
- name: Ensure appimage path exists
|
||||
- name: Ensure appimage path exists {{ appimage.name }}
|
||||
ansible.builtin.file:
|
||||
path: "{{ path_appimage }}/{{ appimage.name }}"
|
||||
mode: "{{ appimage.mode | default('0755') }}"
|
||||
@@ -12,7 +12,7 @@
|
||||
group: "{{ appimage.group | default(ansible_user_gid) }}"
|
||||
state: directory
|
||||
|
||||
- name: Fetch appimage
|
||||
- name: Fetch appimage {{ appimage.name }}
|
||||
ansible.builtin.get_url:
|
||||
mode: "{{ appimage.mode | default('0755') }}"
|
||||
owner: "{{ appimage.owner | default(ansible_user_id) }}"
|
||||
@@ -22,7 +22,7 @@
|
||||
decompress: false
|
||||
backup: false
|
||||
|
||||
- name: Link appimage to bin
|
||||
- name: Link appimage to bin {{ appimage.name }}
|
||||
vars:
|
||||
links:
|
||||
- from: "{{ path_appimage }}/{{ appimage.name }}/{{ appimage.filename }}"
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
- archive.name is defined
|
||||
- archive.url is defined
|
||||
block:
|
||||
- name: Extract archive to given path
|
||||
- name: Extract archive to given path {{ archive.name }}
|
||||
block:
|
||||
- name: Ensure directory exists
|
||||
become: "{{ install_become }}"
|
||||
@@ -25,7 +25,7 @@
|
||||
owner: "{{ archive.owner | default(ansible_facts['user_id']) }}"
|
||||
group: "{{ archive.group | default(ansible_facts['user_gid']) }}"
|
||||
|
||||
- name: Download archive to cache
|
||||
- name: Download archive to cache {{ archive.name }}
|
||||
ansible.builtin.get_url:
|
||||
dest: "{{ d_cache.path }}/{{ archive.name }}"
|
||||
url: "{{ archive.url }}"
|
||||
@@ -33,7 +33,7 @@
|
||||
decompress: false
|
||||
mode: '0644'
|
||||
|
||||
- name: Extract archive
|
||||
- name: Extract archive {{ archive.name }}
|
||||
become: "{{ install_become }}"
|
||||
become_user: "{{ install_become_user }}"
|
||||
ansible.builtin.unarchive:
|
||||
@@ -43,7 +43,7 @@
|
||||
include: "{{ archive.include | default(omit) }}"
|
||||
exclude: "{{ archive.exclude | default(omit) }}"
|
||||
|
||||
- name: Symlink archive files
|
||||
- name: Symlink archive files {{ archive.name }}
|
||||
when:
|
||||
- archive.links is defined
|
||||
- archive.links | length > 0
|
||||
|
||||
@@ -1,4 +1,11 @@
|
||||
# vim: set filetype=yaml.ansible
|
||||
#
|
||||
## Helper: cargo.yml
|
||||
## Description: Install packages using the cargo command
|
||||
## Variables: top level 'dict'
|
||||
## name: package name on cargo
|
||||
## version: cargo version, omitted if empty
|
||||
## locked: _bool_, optional. Default false
|
||||
---
|
||||
- name: Dump install vars
|
||||
ansible.builtin.debug:
|
||||
|
||||
@@ -1,4 +1,15 @@
|
||||
# vim: set filetype=yaml.ansible :
|
||||
#
|
||||
## Helper: cargo_buil.yml
|
||||
## Description: download source, build and install using cargo
|
||||
## Variables: top level 'dict'
|
||||
## source_dir: git source directory
|
||||
## repo: git repository url
|
||||
## depth: _int_ optional, Default 1. Git depth to clone
|
||||
## force_git: _bool_ optional, default true. Force clone, overwriting existing dir
|
||||
## recursive: _bool_ optional, default true. Do a recursive clone
|
||||
## version: _string_ optional, default 'latest'. Version to checkout and build
|
||||
## build_flags: _list[str]_ optional. If set, will append these to the build command
|
||||
---
|
||||
- name: Cargo source install helper
|
||||
block:
|
||||
|
||||
@@ -15,6 +15,7 @@
|
||||
- name: Run configure target
|
||||
when:
|
||||
- pkg.target.configure is defined
|
||||
register: make_configure
|
||||
community.general.make:
|
||||
chdir: "{{ pkg.path }}"
|
||||
target: "{{ pkg.target.configure.name }}"
|
||||
@@ -23,6 +24,7 @@
|
||||
- name: Run build target
|
||||
when:
|
||||
- pkg.target.build is defined
|
||||
register: make_build
|
||||
community.general.make:
|
||||
chdir: "{{ pkg.path }}"
|
||||
target: "{{ pkg.target.build.name }}"
|
||||
@@ -41,14 +43,18 @@
|
||||
loop: "{{ pkg.targets.preinstall }}"
|
||||
loop_control:
|
||||
loop_var: target
|
||||
register: make_preinstall
|
||||
community.general.make:
|
||||
chdir: "{{ pkg.path }}"
|
||||
target: "{{ target.name }}"
|
||||
params: "{{ target.params | default(omit) }}"
|
||||
|
||||
- name: Run install target
|
||||
become: "{{ install_become }}"
|
||||
become_user: "{{ install_become_user }}"
|
||||
when:
|
||||
- pkg.targets.install is defined
|
||||
register: make_install
|
||||
community.general.make:
|
||||
chdir: "{{ pkg.path }}"
|
||||
target: "{{ pkg.targets.install.name }}"
|
||||
@@ -60,6 +66,7 @@
|
||||
loop: "{{ pkg.targets.postinstall }}"
|
||||
loop_control:
|
||||
loop_var: target
|
||||
register: make_postinstall
|
||||
community.general.make:
|
||||
chdir: "{{ pkg.path }}"
|
||||
target: "{{ target.name }}"
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
- name: Download and extract source archive
|
||||
when:
|
||||
- pkg.archive is defined
|
||||
ansible.bulitin.include_tasks: helpers/archive.yml
|
||||
ansible.builtin.include_tasks: helpers/archive.yml
|
||||
|
||||
- name: Ensure facts are set
|
||||
ansible.builtin.set_fact:
|
||||
|
||||
@@ -47,8 +47,8 @@
|
||||
- name: Configure pkg dependencies
|
||||
loop: "{{ air.pkg_deps }}"
|
||||
loop_control:
|
||||
loop_var: pkg
|
||||
ansible.builtin.include_tasks: "pkgs/{{ pkg }}.yml"
|
||||
loop_var: dep
|
||||
ansible.builtin.include_tasks: "pkgs/{{ dep }}.yml"
|
||||
|
||||
- name: Add air to install list
|
||||
ansible.builtin.set_fact:
|
||||
|
||||
@@ -18,6 +18,8 @@
|
||||
Alpine: ansible
|
||||
Archlinux: ansible
|
||||
pip: ansible
|
||||
pkg_deps:
|
||||
- pipx
|
||||
# }}}
|
||||
- name: Configure ansible
|
||||
when:
|
||||
@@ -45,6 +47,12 @@
|
||||
when:
|
||||
- ansible_imethod == 'source'
|
||||
block:
|
||||
- name: Add ansible package deps
|
||||
loop: "{{ ansible.pkg_deps }}"
|
||||
loop_control:
|
||||
loop_var: dep
|
||||
ansible.builtin.include_tasks: pkgs/{{ dep }}.yml
|
||||
|
||||
- name: Configure ansible source install
|
||||
ansible.builtin.set_fact:
|
||||
ansible_src_install:
|
||||
|
||||
@@ -21,6 +21,8 @@
|
||||
FreeBSD: py311-ansible-lint
|
||||
pip:
|
||||
name: ansible_lint
|
||||
pkg_deps:
|
||||
- pipx
|
||||
# }}}
|
||||
- name: Configure ansible_lint
|
||||
when:
|
||||
@@ -59,6 +61,12 @@
|
||||
when:
|
||||
- ansible_lint_imethod == 'system'
|
||||
block:
|
||||
- name: Add ansible lint package deps
|
||||
loop: "{{ ansible_lint.pkg_deps }}"
|
||||
loop_control:
|
||||
loop_var: dep
|
||||
ansible.builtin.include_tasks: pkgs/{{ dep }}.yml
|
||||
|
||||
- name: Queue ansible_lint system install
|
||||
ansible.builtin.set_fact:
|
||||
pkg_sys: "{{ pkg_sys + [ansible_lint_pkgname[os_family]] }}"
|
||||
|
||||
@@ -10,8 +10,13 @@
|
||||
ansible.builtin.set_fact:
|
||||
cmakelang:
|
||||
methods:
|
||||
- source
|
||||
- system
|
||||
pkgname: cmakelang
|
||||
pkgname:
|
||||
RedHat: cmakelang
|
||||
pip: cmakelang
|
||||
pkg_deps:
|
||||
- pipx
|
||||
# }}}
|
||||
- name: Add cmakelang
|
||||
when:
|
||||
@@ -35,6 +40,29 @@
|
||||
ansible.builtin.set_fact:
|
||||
cmakelang_install: "{{ cmakelang_imethod }}={{ cmakelang.pkgname }}"
|
||||
|
||||
- name: Configure cmakelang source install
|
||||
when:
|
||||
- cmakelang_imethod == 'source'
|
||||
block:
|
||||
- name: Add cmakelang package deps
|
||||
loop: "{{ cmakelang.pkg_deps }}"
|
||||
loop_control:
|
||||
loop_var: dep
|
||||
ansible.builtin.include_tasks: pkgs/{{ dep }}.yml
|
||||
|
||||
- name: Confgure cmakelang pipx install
|
||||
ansible.builtin.set_fact:
|
||||
cmakelang_pipx_install:
|
||||
name: "{{ cmakelang.pkgname['pip'] }}"
|
||||
|
||||
- name: Queue cmakelang pipx install
|
||||
ansible.builtin.set_fact:
|
||||
pkg_pipx: "{{ pkg_pipx + [cmakelang_pipx_install] }}"
|
||||
|
||||
- name: Finalise cmakelang source install
|
||||
ansible.builtin.set_fact:
|
||||
cmakelang_install: "{{ cmakelang_imethod }}={{ cmakelang_pipx_install }}"
|
||||
|
||||
- name: Finalise cmakelang configuration
|
||||
ansible.builtin.set_fact:
|
||||
__configured: "{{ __configured | combine( { 'cmakelang': cmakelang_install } ) }}"
|
||||
|
||||
@@ -10,12 +10,17 @@
|
||||
ansible.builtin.set_fact:
|
||||
direnv:
|
||||
methods:
|
||||
- source
|
||||
- system
|
||||
pkgname:
|
||||
RedHat: direnv
|
||||
Alpine: direnv
|
||||
Debian: direnv
|
||||
Darwin: direnv
|
||||
install_url: github.com/direnv/direnv
|
||||
pkg_deps:
|
||||
- go
|
||||
version: "{{ direnv_version | default('latest') }}"
|
||||
# }}}
|
||||
- name: Configure direnv
|
||||
when:
|
||||
@@ -39,6 +44,20 @@
|
||||
ansible.builtin.set_fact:
|
||||
direnv_install: "{{ direnv_imethod }}={{ direnv.pkgname[os_family] }}"
|
||||
|
||||
- name: Set direnv build facts
|
||||
when:
|
||||
- direnv_imethod == 'source'
|
||||
block:
|
||||
- name: Set direnv source install facts
|
||||
ansible.builtin.set_fact:
|
||||
direnv_go_install:
|
||||
url: "{{ direnv.install_url }}@{{ direnv.version }}"
|
||||
bind: "{{ path_bin }}/direnv"
|
||||
|
||||
- name: Finalise direnv source install
|
||||
ansible.builtin.set_fact:
|
||||
direnv_install: "{{ direnv_imethod }}={{ direnv_go_install }}"
|
||||
|
||||
- name: Finalize direnv configuration
|
||||
ansible.builtin.set_fact:
|
||||
__configured: "{{ __configured | combine( { 'direnv': direnv_install } ) }}"
|
||||
|
||||
@@ -116,7 +116,7 @@
|
||||
loop: "{{ ghostty.pkg_deps }}"
|
||||
loop_control:
|
||||
loop_var: dep
|
||||
ansible.bulitin.include_tasks: pkgs/{{ dep }}.yml
|
||||
ansible.builtin.include_tasks: pkgs/{{ dep }}.yml
|
||||
|
||||
- name: Add ghostty system dependencies
|
||||
ansible.builtin.set_fact:
|
||||
|
||||
@@ -12,9 +12,8 @@
|
||||
methods:
|
||||
- system
|
||||
pkgname:
|
||||
RedHat: [nodejs]
|
||||
Debian: [nodejs]
|
||||
Alpine: [nodejs]
|
||||
RedHat:
|
||||
- nodejs
|
||||
FreeBSD:
|
||||
- node
|
||||
- npm
|
||||
@@ -32,12 +31,9 @@
|
||||
when:
|
||||
- nodejs_imethod == "system"
|
||||
block:
|
||||
- name: Set nodejs package name
|
||||
ansible.builtin.set_fact:
|
||||
nodejs_pkgname: "{{ nodejs.pkgname[os_family] }}"
|
||||
- name: Append nodejs to pkg_sys
|
||||
ansible.builtin.set_fact:
|
||||
pkg_sys: "{{ pkg_sys + [nodejs_pkgname] }}"
|
||||
pkg_sys: "{{ pkg_sys + nodejs.pkgname[os_family] }}"
|
||||
|
||||
- name: Finalize nodejs configuration
|
||||
ansible.builtin.set_fact:
|
||||
|
||||
@@ -1,5 +1,33 @@
|
||||
# vim: set filetype=yaml.ansible :
|
||||
---
|
||||
- name: Append pipx to pkg_sys
|
||||
- name: Set pipx default facts
|
||||
ansible.builtin.set_fact:
|
||||
pipx:
|
||||
methods:
|
||||
- system
|
||||
|
||||
- name: Configure pipx
|
||||
when:
|
||||
- "'pipx' not in __configured"
|
||||
block:
|
||||
- name: Set pipx install method
|
||||
when:
|
||||
- pipx_imethod is undefined
|
||||
ansible.builtin.set_fact:
|
||||
pipx_imethod: "{{ imethod if imethod in pipx.methods else pipx.methods[0] }}"
|
||||
|
||||
- name: Configure pipx system install
|
||||
when:
|
||||
- pipx_imethod == 'system'
|
||||
block:
|
||||
- name: Queue pipx system install
|
||||
ansible.builtin.set_fact:
|
||||
pkg_sys: "{{ pkg_sys + ['pipx'] }}"
|
||||
|
||||
- name: Finalise pipx system install
|
||||
ansible.builtin.set_fact:
|
||||
pipx_install: "{{ pipx_imethod }}=pipx"
|
||||
|
||||
- name: Finalise pipx configuration
|
||||
ansible.builtin.set_fact:
|
||||
__configured: "{{ __configured | combine( { 'pipx': pipx_install } ) }}"
|
||||
|
||||
@@ -4,7 +4,12 @@
|
||||
ansible.builtin.set_fact:
|
||||
zoxide:
|
||||
methods:
|
||||
- source
|
||||
- system
|
||||
cargo:
|
||||
name: zoxide
|
||||
pkg_deps:
|
||||
- cargo
|
||||
# }}}
|
||||
- name: Configure zoxide
|
||||
when:
|
||||
@@ -16,10 +21,22 @@
|
||||
ansible.builtin.set_fact:
|
||||
zoxide_imethod: "{{ imethod if imethod in zoxide.methods else zoxide.methods[0] }}"
|
||||
|
||||
- name: Configure zoxide system install
|
||||
when:
|
||||
- zoxide_imethod == 'system'
|
||||
block:
|
||||
- name: Append zoxide to pkg_sys
|
||||
ansible.builtin.set_fact:
|
||||
pkg_sys: "{{ pkg_sys + ['zoxide'] }}"
|
||||
|
||||
- name: Configure zoxide cargo install
|
||||
when:
|
||||
- zoxide_imethod == 'source'
|
||||
block:
|
||||
- name: Set zoxide cargo facts
|
||||
ansible.builtin.set_fact:
|
||||
zoxide_cargo_install: "{{ zoxide.cargo }}"
|
||||
|
||||
- name: Set zoxide_configured
|
||||
ansible.builtin.set_fact:
|
||||
__configured: "{{ __configured | combine( { 'zoxide': zoxide_imethod } ) }}"
|
||||
|
||||
Reference in New Issue
Block a user