more fixs being done
This commit is contained in:
26
tasks/appimage.yml
Normal file
26
tasks/appimage.yml
Normal file
@@ -0,0 +1,26 @@
|
||||
# vim: set filetype=yaml.ansible :
|
||||
---
|
||||
- name: Install appimage
|
||||
become: "{{ archive_become }}"
|
||||
block:
|
||||
- name: Ensure appimage path exists
|
||||
ansible.builtin.file:
|
||||
path: "{{ path.appimage }}/{{ pkg.link_name }}"
|
||||
mode: '0755'
|
||||
state: directory
|
||||
|
||||
- name: Fetch appimage
|
||||
become: "{{ archive_become }}"
|
||||
ansible.builtin.get_url:
|
||||
mode: '0755'
|
||||
decompress: false
|
||||
backup: true
|
||||
url: "{{ pkg.url }}"
|
||||
dest: "{{ path.appimage }}/{{ pkg.link_name }}/{{ pkg.file }}"
|
||||
|
||||
- name: Link appimage to bin
|
||||
become: "{{ archive_become }}"
|
||||
ansible.builtin.file:
|
||||
state: link
|
||||
src: "{{ path.appimage }}/{{ pkg.link_name }}/{{ pkg.file }}"
|
||||
path: "{{ path.bindir }}/{{ pkg.link_name }}"
|
||||
@@ -1,31 +0,0 @@
|
||||
# vim: set filetype=yaml.ansible :
|
||||
---
|
||||
- name: Install bitwarden appimage
|
||||
become: "{{ bw_become }}"
|
||||
become_user: "{% if bw_become %}{{ bw_owner }}{% else %}~{% endif %}"
|
||||
when:
|
||||
- bw_instmtd == 'appimage'
|
||||
block:
|
||||
- name: Ensure install path exists
|
||||
ansible.builtin.file:
|
||||
state: directory
|
||||
mode: '0755'
|
||||
path: "{{ apimage_pfx }}/bitwarden"
|
||||
owner: "{{ bw_owner }}"
|
||||
group: "{{ bw_group }}"
|
||||
|
||||
- name: Fetch bitwarden appimage
|
||||
ansible.builtin.get_url:
|
||||
mode: '0755'
|
||||
decompress: false
|
||||
backup: true
|
||||
url: "{{ bw.appimg.url }}"
|
||||
dest: "{{ appimage_pfx }}/{{ bw.appimg.name }}"
|
||||
owner: "{{ bw_owner }}"
|
||||
group: "{{ bw_group }}"
|
||||
|
||||
- name: Link bitwarden appimage
|
||||
ansible.builtin.file:
|
||||
state: link
|
||||
src: "{{ appimage_pfx }}/{{ bw.appimg.name }}"
|
||||
path: "{{ bw.bindir }}/bitwarden"
|
||||
@@ -2,11 +2,21 @@
|
||||
---
|
||||
- name: Set bitwarden install method
|
||||
ansible.builtin.set_fact:
|
||||
bw:
|
||||
bitwarden:
|
||||
method: "{{ pkgconfig.bitwarden.method[ansible_distribution] | default('appimage') }}"
|
||||
|
||||
- name: Set bitwarden config
|
||||
ansible.builtin.set_fact:
|
||||
bw:
|
||||
pkg: "{{ pkgconfig.bitwarden[bw.method] }}"
|
||||
method: "{{ bw.method }}"
|
||||
bitwarden:
|
||||
pkg: "{{ pkgconfig.bitwarden[bitwarden.method] }}"
|
||||
method: "{{ bitwarden.method }}"
|
||||
|
||||
- name: Set bitwarden config for appimage install
|
||||
when:
|
||||
- bitwarden.method == 'appimage'
|
||||
ansible.builtin.set_fact:
|
||||
bitwarden:
|
||||
method: appimage
|
||||
file: "{{ pkgconfig.bitwarden.appimage.name }}"
|
||||
link_name: "{{ pkgconfig.bitwarden.appimage.link_name }}"
|
||||
url: "{{ pkgconfig.bitwarden.appimage.url }}"
|
||||
|
||||
4
tasks/config/fd.yml
Normal file
4
tasks/config/fd.yml
Normal file
@@ -0,0 +1,4 @@
|
||||
- name: Set fd config
|
||||
ansible.builtin.set_fact:
|
||||
fd:
|
||||
pkgs: "{{ pkgconfig.fd.pkgs[ansible_os_famly] }}"
|
||||
@@ -1,8 +1,24 @@
|
||||
# vim: set filetype=yaml.ansible :
|
||||
---
|
||||
version: v1.0.1
|
||||
optimize: ReleaseFast
|
||||
build: false
|
||||
dobecome: true
|
||||
owner: root
|
||||
group: root
|
||||
- name: Set ghostty install method
|
||||
ansible.builtin.set_fact:
|
||||
ghostty:
|
||||
method: "{{ pkgconfig.ghostty.method[ansible_distribution] | default(pkgconfig.ghostty.method.default) }}"
|
||||
|
||||
- name: Set ghostty config
|
||||
ansible.builtin.set_fact:
|
||||
ghostty:
|
||||
arch: "{{ pkgconfig.ghostty.archmap[ansible_architecture] }}"
|
||||
deps: "{{ pkgconfig.ghostty.build_deps[ansible_os_family] }}"
|
||||
vers: "{{ pkgconfig.ghostty.version }}"
|
||||
pkg: "{{ pkgconfig.ghosty[ghostty.method] }}"
|
||||
|
||||
- name: Set ghostty config for appimage install
|
||||
when:
|
||||
- ghostty.method == 'appimage'
|
||||
ansible.builtin.set_fact:
|
||||
ghostty:
|
||||
method: appimage
|
||||
file: "Ghostty-{{ ghostty.vers }}-{{ ghostty.arch }}.AppImage"
|
||||
link_name: "{{ pkgconfig.ghostty.appimage.link_name }}"
|
||||
url: "{{ pkgconfig.ghostty.appimage.base_url }}/v{{ ghostty.vers }}/Ghostty-{{ ghostty.vers }}-{{ ghostty.arch }}.AppImage"
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
- name: Set kitty config
|
||||
ansible.buitlin.set_fact:
|
||||
ansible.builtin.set_fact:
|
||||
kitty:
|
||||
pkgs: "{{ pkgconfig.kitty.pkgs[ansible_system] }}"
|
||||
|
||||
@@ -1,10 +1,20 @@
|
||||
# vim: set filetype=yaml.ansible :
|
||||
---
|
||||
version: v0.10.3
|
||||
install_prefix: "{{ default_install_prefix }}"
|
||||
install_dir: /opt/nvim
|
||||
install_method: appimage
|
||||
build_type: Release
|
||||
dobecome: true
|
||||
owner: root
|
||||
group: root
|
||||
- name: Set neovim install method
|
||||
ansible.builtin.set_fact:
|
||||
neovim:
|
||||
method: "{{ pkgconfig.neovim.method[ansible_distribution] | default(pkgconfig.neovim.method.default) }}"
|
||||
|
||||
- name: Set neovim config
|
||||
ansible.builtin.set_fact:
|
||||
neovim:
|
||||
vers: "v{{ pkgconfig.neovim.version }}"
|
||||
|
||||
- name: Set neovim config for appimage install
|
||||
when:
|
||||
- neovim.method == 'appimage'
|
||||
ansible.builtin.set_fact:
|
||||
neovim:
|
||||
file: "nvim-linux-{{ ansible_architecture }}.appimage"
|
||||
link_name: nvim
|
||||
url: "{{ pkgconfig.neovim.appimage.base_url }}/{{ neovim.vers }}/nvim-linux-{{ ansible_architecture }}.appimage"
|
||||
|
||||
@@ -51,13 +51,22 @@
|
||||
|
||||
- name: Install archive_pkgs
|
||||
when:
|
||||
- archive_pkgs|length > 0
|
||||
loop: "{{ archive_pkgs }}"
|
||||
- pkg_archive|length > 0
|
||||
loop: "{{ pkg_archive }}"
|
||||
loop_control:
|
||||
loop_var: pkg
|
||||
ansible.builtin.include_tasks:
|
||||
file: "archive/{{ pkg }}.yml"
|
||||
|
||||
- name: Install appimages
|
||||
when:
|
||||
- pkg_appimage|length > 0
|
||||
loop: "{{ pkg_appimage }}"
|
||||
loop_control:
|
||||
loop_var: pkg
|
||||
ansible.builtin.include_tasks:
|
||||
file: appimage.yml
|
||||
|
||||
- name: Build and install source packages
|
||||
when:
|
||||
- src_pkgs|length > 0
|
||||
|
||||
@@ -2,18 +2,18 @@
|
||||
---
|
||||
- name: Append to flatpkgs
|
||||
when:
|
||||
- bw.method == 'flatpak'
|
||||
- bitwarden.method == 'flatpak'
|
||||
ansible.builtin.set_fact:
|
||||
pkg_flatpak: "{{ pkg_flatpak + [bw.pkg] }}"
|
||||
pkg_flatpak: "{{ pkg_flatpak + [bitwarden.pkg] }}"
|
||||
|
||||
- name: Append to srcpkgs
|
||||
when:
|
||||
- bw.method == 'appimage'
|
||||
- bitwarden.method == 'appimage'
|
||||
ansible.builtin.set_fact:
|
||||
pkg_appimage: "{{ pkg_appimage + [bw.pkg] }}"
|
||||
pkg_appimage: "{{ pkg_appimage + [bitwarden.pkg] }}"
|
||||
|
||||
- name: Append to caskpkgs
|
||||
when:
|
||||
- bw.method == 'brew'
|
||||
- bitwarden.method == 'brew'
|
||||
ansible.builtin.set_fact:
|
||||
pkg_cask: "{{ pkg_cask + [bw.pkg.name] }}"
|
||||
pkg_cask: "{{ pkg_cask + [bitwarden.pkg.name] }}"
|
||||
|
||||
@@ -2,4 +2,4 @@
|
||||
---
|
||||
- name: Append to pkg_sys
|
||||
ansible.builtin.set_fact:
|
||||
pkg_sys: "{{ pkg_sys + pkgconfig.fd.pkg[ansible_os_family] }}"
|
||||
pkg_sys: "{{ pkg_sys + fd.pkgs }}"
|
||||
|
||||
@@ -1,32 +1,35 @@
|
||||
# vim: set filetype=yaml.ansible :
|
||||
---
|
||||
- ansible.builtin.include_vars:
|
||||
file: ghostty.yml
|
||||
name: _ghostty
|
||||
- ansible.builtin.set_fact:
|
||||
pkgconfig_ghostty: "{{ _ghostty | ansible.builtin.combine(pkgconfig.ghostty) }}"
|
||||
|
||||
- name: ensure dependencies
|
||||
- name: Source pkg installation
|
||||
when:
|
||||
- ghostty.method == 'src' or
|
||||
block:
|
||||
- ansible.builtin.include_tasks:
|
||||
file: "pkgs/terra_repo.yml"
|
||||
when: terrarepo is undefined
|
||||
|
||||
- name: append to pkgs
|
||||
- name: Build ghostty from source
|
||||
ansible.builtin.set_fact:
|
||||
syspkgs: "{{ syspkgs + [ 'ghostty' ] }}"
|
||||
when: ansible_distribution == 'Fedora' or
|
||||
not pkgconfig_ghostty.build
|
||||
pkg_sys: "{{ pkg_sys + ghostty.deps }}"
|
||||
pkg_src: "{{ pkg_src + ['ghostty'] }}"
|
||||
|
||||
- name: build ghostty from source
|
||||
- name: Appimage installation
|
||||
when:
|
||||
- ghostty.method == 'appimage'
|
||||
- ansible_distribution != 'MacOSX'
|
||||
ansible.builtin.set_fact:
|
||||
pkg_appimage: "{{ pkg_appimage + ghostty_vars.appimage }}"
|
||||
|
||||
- name: Sys pkg installation
|
||||
when:
|
||||
- ghostty.method == 'sys'
|
||||
block:
|
||||
- ansible.builtin.set_fact:
|
||||
syspkgs: "{{ syspkgs + pkgconfig_ghostty.deps[ansible_os_family] }}"
|
||||
srcpkgs: "{{ srcpkgs + ['ghostty'] }}"
|
||||
when: (ansible_distribution != 'Fedora' and ansible_system == 'Linux') or
|
||||
pkgconfig_ghostty.build
|
||||
|
||||
- name: append ghostty to caskpkgs
|
||||
- name: Append to pkgs
|
||||
when:
|
||||
- ansible_distribution == 'Fedora'
|
||||
notify:
|
||||
- Depend terra repo
|
||||
ansible.builtin.set_fact:
|
||||
caskpkgs: "{{ caskpkgs + [ 'ghostty' ] }}"
|
||||
when: ansible_distribution == 'MacOSX'
|
||||
pkg_sys: "{{ pkg_sys + ['ghostty'] }}"
|
||||
|
||||
- name: Cask pkg installation
|
||||
when:
|
||||
- ghostty.method == 'brew'
|
||||
ansible.builtin.set_fact:
|
||||
pkg_cask: "{{ pkg_cask + ['ghostty'] }}"
|
||||
|
||||
@@ -1,22 +1,24 @@
|
||||
# vim: set filetype=yaml.ansible :
|
||||
---
|
||||
- name: enable terra repo for fedora
|
||||
when: ansible_distribution == 'Fedora'
|
||||
- name: Enable terra repo for fedora
|
||||
when:
|
||||
- ansible_distribution == 'Fedora'
|
||||
block:
|
||||
- name: enable terra repo for fedora >=41
|
||||
- name: Enable terra repo for fedora >=41
|
||||
become: true
|
||||
when: ansible_distribution_major_version|int >= 41
|
||||
ansible.builtin.command:
|
||||
creates: /etc/yum.repos.d/terra.repo
|
||||
cmd: "dnf config-manager addrepo --from-repofile={{ pkgconfig.terrarepo.repo }}"
|
||||
|
||||
- name: enable terra repo for fedora < 41
|
||||
- name: Enable terra repo for fedora < 41
|
||||
become: true
|
||||
when: ansible_distribution_major_version|int < 41
|
||||
ansible.builtin.command:
|
||||
creates: /etc/yum.repos.d/terra.repo
|
||||
cmd: "dnf config-manager --add-repo {{ pkgconfig.terrarepo.repo }}"
|
||||
|
||||
- ansible.builtin.dnf:
|
||||
- name: Install terra release package
|
||||
ansible.builtin.dnf:
|
||||
name: terra-release
|
||||
state: present
|
||||
|
||||
@@ -3,6 +3,7 @@ bitwarden:
|
||||
name: com.bitwarden.desktop
|
||||
remote: flathub
|
||||
appimage:
|
||||
link_name: bitwarden
|
||||
name: bitwarden.appimage
|
||||
url: https://vault.bitwarden.com/download/?app=desktop&platform=linux&variant=appimage
|
||||
snap:
|
||||
@@ -10,8 +11,6 @@ bitwarden:
|
||||
brew:
|
||||
name: bitwarden
|
||||
method:
|
||||
RedHat: appimage
|
||||
Debian: appimage
|
||||
Fedora: flatpak
|
||||
Ubuntu: snap
|
||||
MacOSX: brew
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
fd:
|
||||
pkg:
|
||||
pkgs:
|
||||
Darwin:
|
||||
- fd
|
||||
RedHat:
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
ghostty:
|
||||
version: 1.1.2+1
|
||||
optimize: ReleaseFast
|
||||
build_deps:
|
||||
Debian:
|
||||
- libgtk-4-dev
|
||||
@@ -6,4 +8,13 @@ ghostty:
|
||||
RedHat:
|
||||
- gtk4-devel
|
||||
- libadwaita-devel
|
||||
git_repo: https://github.com/ghostty-org/ghostty
|
||||
archmap:
|
||||
arm64: aarch64
|
||||
x86_64: x86_64
|
||||
appimage:
|
||||
base_url: https://github.com/psadi/ghostty-appimage/releases/download/
|
||||
link_name: ghostty
|
||||
method:
|
||||
default: appimage
|
||||
Fedora: sys
|
||||
MacOSX: brew
|
||||
|
||||
@@ -1,3 +1,11 @@
|
||||
neovim:
|
||||
version: 0.10.4
|
||||
git_repo: https://github.com/neovim/neovim
|
||||
appimage_url_pfx: https://github.com/neovim/neovim/releases/download
|
||||
appimage:
|
||||
base_url: https://github.com/neovim/neovim/releases/download
|
||||
link_name: nvim
|
||||
method:
|
||||
default: appimage
|
||||
Fedora: sys
|
||||
Ubuntu: sys
|
||||
MacOSX: sys
|
||||
|
||||
Reference in New Issue
Block a user