more fixes, more config
This commit is contained in:
@@ -6,8 +6,8 @@
|
||||
- cargo
|
||||
- install
|
||||
- --root
|
||||
- /usr/local
|
||||
- "{{ pkgconfig_alacritty.install_prefix }}"
|
||||
- --git
|
||||
- https://github.com/alacritty/alacritty.git
|
||||
- "{{ pkgconfig_alacritty.git_repo }}"
|
||||
- --tag
|
||||
- "v{{ _alacritty.version }}"
|
||||
- "v{{ pkgconfig_alacritty.version }}"
|
||||
|
||||
@@ -6,31 +6,31 @@
|
||||
- name: set install path for non-system installs
|
||||
ansible.builtin.set_fact:
|
||||
nerdfonts_install_path: "{{ lookup('ansible.builtin.env', 'HOME') }}/.local/share/fonts"
|
||||
when: not _nerdfonts.nerdfonts_system_install
|
||||
when: not pkgconfig_nerdfonts.system_install
|
||||
|
||||
- name: set install path for system wide installs
|
||||
ansible.builtin.set_fact:
|
||||
nerdfonts_install_path: "/usr/local/share/fonts"
|
||||
when: _nerdfonts.nerdfonts_system_install
|
||||
when: pkgconfig_nerdfonts.system_install
|
||||
|
||||
- name: create nerdfonts directories
|
||||
ansible.builtin.file:
|
||||
path: "{{ nerdfonts_install_path }}/{{ font.name }}"
|
||||
path: "{{ nerdfonts_install_path }}/{{ font }}"
|
||||
state: directory
|
||||
become: "{{ _nerdfonts.nerdfonts_system_install }}"
|
||||
loop: "{{ nerdfonts }}"
|
||||
become: "{{ pkgconfig_nerdfonts.system_install }}"
|
||||
loop: "{{ pkgconfig_nerdfonts.install }}"
|
||||
loop_control:
|
||||
loop_var: font
|
||||
register: nerdfont_result
|
||||
|
||||
- name: Download and extract nerdfonts
|
||||
ansible.builtin.unarchive:
|
||||
creates: "{{ nerdfonts_install_path }}/{{ font.name }}/README.md"
|
||||
src: "https://github.com/ryanoasis/nerd-fonts/releases/latest/download/{{ font.name }}.tar.xz"
|
||||
dest: "{{ nerdfonts_install_path }}/{{ font.name }}"
|
||||
creates: "{{ nerdfonts_install_path }}/{{ font }}/README.md"
|
||||
src: "{{ pkgconfig_nerdfonts.base_url }}/{{ font }}.tar.xz"
|
||||
dest: "{{ nerdfonts_install_path }}/{{ font }}"
|
||||
remote_src: true
|
||||
when: nerdfont_result is changed
|
||||
become: nerdfonts_system_install
|
||||
loop: "{{ _nerdfonts.fonts }}"
|
||||
loop: "{{ pkgconfig_nerdfonts.install }}"
|
||||
loop_control:
|
||||
loop_var: font
|
||||
|
||||
@@ -1,3 +1,8 @@
|
||||
---
|
||||
- ansible.builtin.include_tasks:
|
||||
file: pkgs/go.yml
|
||||
when: pkgconfig_go not defined
|
||||
|
||||
- name: add to gopkgs
|
||||
set_fact:
|
||||
gopkgs: "{{ gopkgs + ['github.com/air-verse/air@latest'] }}"
|
||||
|
||||
@@ -3,8 +3,7 @@
|
||||
file: alacritty.yml
|
||||
name: _alacritty
|
||||
- ansible.builtin.set_fact:
|
||||
pkgconfig:
|
||||
alacritty: "{{ _alacritty | ansible.builtin.combine(pkgconfig.alacritty) }}"
|
||||
pkgconfig_alacritty: "{{ _alacritty | ansible.builtin.combine(pkgconfig.alacritty) }}"
|
||||
|
||||
- name: linux based installation
|
||||
when: ansible_system == 'Linux'
|
||||
@@ -12,23 +11,14 @@
|
||||
- name: install rust and cargo
|
||||
ansible.builtin.include_tasks:
|
||||
file: "pkgs/rust.yml"
|
||||
tags:
|
||||
- rust
|
||||
- dependency
|
||||
when: pkgconfig_rust not defined
|
||||
|
||||
- name: append to pkgs
|
||||
set_fact:
|
||||
syspkgs: "{{ syspkgs + pkgconfig.alacritty.build_deps[ansible_distribution] }}"
|
||||
syspkgs: "{{ syspkgs + pkgconfig_alacritty.build_deps[ansible_distribution] }}"
|
||||
srcpkgs: "{{ srcpkgs + [ 'alacritty' ] }}"
|
||||
tags:
|
||||
- syspkgs
|
||||
- srcpkgs
|
||||
|
||||
- name: append alacritty to caskpkgs
|
||||
set_fact:
|
||||
caskpkgs: "{{ caskpkgs + [ 'alacritty' ] }}"
|
||||
when: ansible_system == 'Darwin'
|
||||
tags:
|
||||
- MacOS
|
||||
- brew
|
||||
- package
|
||||
|
||||
@@ -1,3 +1,8 @@
|
||||
---
|
||||
- ansible.builtin.include_tasks:
|
||||
file: pkgs/nodejs.yml
|
||||
when: pkgconfig_nodejs not defined
|
||||
|
||||
- name: add to npmpkgs
|
||||
set_fact:
|
||||
npmpkgs: "{{ npmpkgs + ['@ansible/ansible-language-server'] }}"
|
||||
|
||||
@@ -3,8 +3,7 @@
|
||||
file: carapace.yml
|
||||
name: _carapace
|
||||
- ansible.builtin.set_fact:
|
||||
pkgconfig:
|
||||
carapace: "{{ _carapace | ansible.builtin.combine(pkgconfig.carapace) }}"
|
||||
pkgconfig_carapace: "{{ _carapace | ansible.builtin.combine(pkgconfig.carapace) }}"
|
||||
|
||||
- name: enable carapace yum repository
|
||||
ansible.builtin.yum_repository:
|
||||
@@ -27,4 +26,4 @@
|
||||
|
||||
- name: add carapace to syspkgs
|
||||
ansible.builtin.set_fact:
|
||||
syspkgs: "{{ syspkgs + pkgconfig.carapace.pkgs[ansible_system] }}"
|
||||
syspkgs: "{{ syspkgs + pkgconfig_carapace.pkgs[ansible_system] }}"
|
||||
|
||||
@@ -3,12 +3,13 @@
|
||||
- name: ensure hashicorp repo is active
|
||||
ansible.builtin.include_tasks:
|
||||
file: "pkgs/hashicorp_repo.yml"
|
||||
when: pkgconfig_hashicorp is not defined
|
||||
|
||||
- name: append to syspkgs
|
||||
set_fact:
|
||||
syspkgs: "{{ syspkgs + [ pkgconfig.hashicorp.consul[ansible_system] ] }}"
|
||||
syspkgs: "{{ syspkgs + [ pkgconfig_hashicorp.consul[ansible_system] ] }}"
|
||||
when: ansible_system == 'Linux'
|
||||
|
||||
- set_fact:
|
||||
tappkgs: "{{ tappkgs + [ pkgconfig.hashicorp.consul[ansible_system] ] }}"
|
||||
tappkgs: "{{ tappkgs + [ pkgconfig_hashicorp.consul[ansible_system] ] }}"
|
||||
when: ansible_system == 'Darwin'
|
||||
|
||||
@@ -4,17 +4,11 @@
|
||||
block:
|
||||
- ansible.builtin.include_tasks:
|
||||
file: "pkgs/terra_repo.yml"
|
||||
tags:
|
||||
- dependency
|
||||
- package
|
||||
- terra
|
||||
- syspkgs
|
||||
when: pkgconfig_terrarepo is not defined
|
||||
|
||||
- name: append to pkgs
|
||||
set_fact:
|
||||
syspkgs: "{{ syspkgs + [ 'ghostty' ] }}"
|
||||
tags:
|
||||
- syspkgs
|
||||
|
||||
- name: no ghostty for this system
|
||||
when:
|
||||
@@ -27,8 +21,3 @@
|
||||
when: ansible_distribution == 'MacOSX'
|
||||
set_fact:
|
||||
caskpkgs: "{{ caskpkgs + [ 'ghostty' ] }}"
|
||||
tags:
|
||||
- MacOS
|
||||
- brew
|
||||
- package
|
||||
- terminal
|
||||
|
||||
@@ -3,14 +3,12 @@
|
||||
file: git.yml
|
||||
name: _git
|
||||
- ansible.builtin.set_fact:
|
||||
pkgconfig:
|
||||
git: "{{ _git | ansible.builtin.combine(pkgconfig.git) }}"
|
||||
pkgconfig_git: "{{ _git | ansible.builtin.combine(pkgconfig.git) }}"
|
||||
- ansible.builtin.set_fact:
|
||||
pkgconfig:
|
||||
git:
|
||||
pkgconfig_git:
|
||||
pkgs: "{{ pkgconfig.git.pkgs[ansible_system] }}"
|
||||
|
||||
- name: append to pkgs
|
||||
set_fact:
|
||||
syspkgs: "{{ syspkgs + pkgconfig.git.pkgs }}"
|
||||
syspkgs: "{{ syspkgs + pkgconfig_git.pkgs }}"
|
||||
|
||||
|
||||
@@ -3,8 +3,7 @@
|
||||
file: go.yml
|
||||
name: _go
|
||||
- ansible.builtin.set_fact:
|
||||
pkgconfig:
|
||||
go: "{{ _go | ansible.builtin.combine(pkgconfig.go) }}"
|
||||
pkgconfig_go: "{{ _go | ansible.builtin.combine(pkgconfig.go) }}"
|
||||
|
||||
- name: append to pkgs
|
||||
set_fact:
|
||||
|
||||
@@ -1,3 +1,8 @@
|
||||
---
|
||||
- ansible.builtin.include_tasks:
|
||||
file: pkgs/go.yml
|
||||
when: pkgconfig_go is not defined
|
||||
|
||||
- name: add to gopkgs
|
||||
set_fact:
|
||||
gopkgs: "{{ gopkgs + ['golang.org/x/tools/gopls@latest'] }}"
|
||||
|
||||
@@ -3,8 +3,7 @@
|
||||
file: hashicorp_repo.yml
|
||||
name: _hashicorp
|
||||
- ansible.builtin.set_fact:
|
||||
pkgconfig:
|
||||
hashicorp: "{{ _hashicorp | ansible.builtin.combine(pkgonfig.hashicorp) }}"
|
||||
pkgconfig_hashicorp: "{{ _hashicorp | ansible.builtin.combine(pkgonfig.hashicorp) }}"
|
||||
|
||||
- name: RedHat repository
|
||||
when: ansible_os_family == 'RedHat'
|
||||
@@ -16,7 +15,7 @@
|
||||
- ansible_distribution_major_version|int >= 41
|
||||
ansible.builtin.command:
|
||||
creates: /etc/yum.repos.d/hashicorp.repo
|
||||
cmd: "dnf config-manager addrepo --from-repofile={{ pkgconfig.hashicorp.Linux.Fedora.repo }}"
|
||||
cmd: "dnf config-manager addrepo --from-repofile={{ pkgconfig_hashicorp.Linux.Fedora.repo }}"
|
||||
|
||||
- name: enable hashicorp repo for fedora <41
|
||||
become: true
|
||||
@@ -25,7 +24,7 @@
|
||||
- ansible_distribution_major_version|int < 41
|
||||
ansible.builtin.command:
|
||||
creates: /etc/yum.repos.d/hashicorp.repo
|
||||
cmd: "dnf config-manager --add-repo {{ pkgconfig.hashicorp.Linux.Fedora.repo }}"
|
||||
cmd: "dnf config-manager --add-repo {{ pkgconfig_hashicorp.Linux.Fedora.repo }}"
|
||||
|
||||
- name: enable hashicorp repo for RHEL like distribution
|
||||
become: true
|
||||
@@ -33,7 +32,7 @@
|
||||
- ansible_distribution != 'Fedora'
|
||||
ansible.builtin.command:
|
||||
creates: /etc/yum.repos.d/hashicorp.repo
|
||||
cmd: "dnf config-manager --add-repo {{ pkgconfig.hashicorp.Linux.RedHat.repo }}"
|
||||
cmd: "dnf config-manager --add-repo {{ pkgconfig_hashicorp.Linux.RedHat.repo }}"
|
||||
|
||||
- name: Debian based repository
|
||||
when: ansible_os_family == 'Debian'
|
||||
@@ -60,7 +59,7 @@
|
||||
|
||||
- name: enable hasicorp repo for debian
|
||||
ansible.builtin.apt_repository:
|
||||
repo: "{{ pkgconfig.hashicorp.Linux.Debian.repo }}"
|
||||
repo: "{{ pkgconfig_hashicorp.Linux.Debian.repo }}"
|
||||
state: present
|
||||
update_cache: false
|
||||
|
||||
|
||||
@@ -3,9 +3,8 @@
|
||||
file: kitty.yml
|
||||
name: _kitty
|
||||
- ansible.builtin.set_fact:
|
||||
pkgconfig:
|
||||
kitty: "{{ _kitty | ansible.builtin.combine(pkgconfig.kitty) }}"
|
||||
pkgconfig_kitty: "{{ _kitty | ansible.builtin.combine(pkgconfig.kitty) }}"
|
||||
|
||||
- name: add to syspkgs
|
||||
ansible.builtin.set_fact:
|
||||
syspkgs: "{{ syspkgs + pkgconfig.kitty.pkgs[ansible_system] }}"
|
||||
syspkgs: "{{ syspkgs + pkgconfig_kitty.pkgs[ansible_system] }}"
|
||||
|
||||
@@ -3,18 +3,17 @@
|
||||
file: neovide.yml
|
||||
name: _neovide
|
||||
- ansible.builtin.set_fact:
|
||||
pkgconfig:
|
||||
neovide: "{{ _neovide | ansible.builtin.combine(pkgconfig.neovide) }}"
|
||||
pkgconfig_neovide: "{{ _neovide | ansible.builtin.combine(pkgconfig.neovide) }}"
|
||||
- ansible.builtin.include_tasks:
|
||||
file: "pkgs/{{ pkgdep }}.yml"
|
||||
loop: "{{ pkgconfig.neovide.local_deps }}"
|
||||
loop: "{{ pkgconfig_neovide.local_deps }}"
|
||||
loop_control:
|
||||
loop_var: pkgdep
|
||||
|
||||
- name: append to pkgs
|
||||
when: ansible_system == 'Linux'
|
||||
set_fact:
|
||||
syspkgs: "{{ syspkgs + pkgconfig.neovide.pkgdeps[ansible_os_family] }}"
|
||||
syspkgs: "{{ syspkgs + pkgconfig_neovide.pkgdeps[ansible_os_family] }}"
|
||||
srcpkgs: "{{ srcpkgs + [ 'neovide' ] }}"
|
||||
|
||||
- name: append neovide to caskpkgs
|
||||
|
||||
@@ -3,15 +3,14 @@
|
||||
file: neovim.yml
|
||||
name: _neovim
|
||||
- ansible.builtin.set_fact:
|
||||
pkgconfig:
|
||||
neovim: "{{ _neovim | ansible.builtin.combine(pkgconfig.neovim) }}"
|
||||
pkgconfig_neovim: "{{ _neovim | ansible.builtin.combine(pkgconfig.neovim) }}"
|
||||
|
||||
- name: append neovim to srcpkgs
|
||||
when: not pkgconfig.neovim.use_syspkg
|
||||
when: not pkgconfig_neovim.use_syspkg
|
||||
set_fact:
|
||||
srcpkgs: "{{ srcpkgs + ['neovim'] }}"
|
||||
|
||||
- name: append neovim to syspkgs
|
||||
when: pkgconfig.neovim.use_syspkg
|
||||
when: pkgconfig_neovim.use_syspkg
|
||||
set_fact:
|
||||
syspkgs: "{{ syspkgs + ['neovim'] }}"
|
||||
|
||||
@@ -3,8 +3,7 @@
|
||||
file: nerdfonts.yml
|
||||
name: _nerdfonts
|
||||
- ansible.builtin.set_fact:
|
||||
pkgconfig:
|
||||
nerdfonts: "{{ _nerdfonts | ansible.builtin.combine(pkgconfig.nerdfons) }}"
|
||||
pkgconfig_nerdfonts: "{{ _nerdfonts | ansible.builtin.combine(pkgconfig.nerdfons) }}"
|
||||
|
||||
- name: append to srcpkgs
|
||||
when: ansible_system == 'Linux'
|
||||
@@ -14,7 +13,7 @@
|
||||
- name: append to caskpkgs
|
||||
when: ansible_system == 'Darwin'
|
||||
set_fact:
|
||||
caskpkgs: "{{ caskpkgs + [ 'font-' + font.brew + '-nerd-font' ] }}"
|
||||
loop: "{{ pkgconfig.nerdfonts.fonts }}"
|
||||
caskpkgs: "{{ caskpkgs + [ pkgconfig_nerdfonts[font].brew ] }}"
|
||||
loop: "{{ pkgconfig_nerdfonts.install }}"
|
||||
loop_control:
|
||||
loop_var: font
|
||||
|
||||
Reference in New Issue
Block a user