working on helpers

This commit is contained in:
Matthew Stobbs
2026-02-05 17:18:02 -07:00
parent e231c6ae7a
commit e91e7e9698
12 changed files with 170 additions and 147 deletions

View File

@@ -8,7 +8,7 @@
- name: Set ansible install method
when:
- ansible_install_method is undefined
ansible.bulitin.set_fact:
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

View File

@@ -2,7 +2,7 @@
---
- name: Configure go for install
when:
- __go_configured is undefined
- "'go' not in __configured"
block:
- name: Configure go install method
when:
@@ -14,23 +14,15 @@
when:
- go_install_method == 'system'
block:
- name: Set go pkgname for linux
when:
- ansible_system == 'Linux'
- name: Set go pkgname
ansible.builtin.set_fact:
go_pkgname: "{{ go_pkgname[ansible_os_family] }}"
- name: Set go pkgname for FreeBSD
when:
- ansible_os_family == 'FreeBSD'
ansible.bulitin.set_fact:
go_pkgname: "{{ go_pkgname[ansible_os_family][go_bsd_version] | default(go_pkgname[ansible_os_family]['default']) }}"
- name: Set go pkgname for Darwin/MacOS
when:
- ansible_os_family == 'Darwin'
ansible.builtin.set_fact:
go_pkgname: "{{ go_pkgname[ansible_os_family] }}"
go_pkgname: "{{ go_pkgname[go_bsd_version] | default(go_pkgname['default']) }}"
- name: Configure go archive installation
when:
@@ -39,10 +31,7 @@
- name: Configure go
ansible.builtin.set_fact:
go_system: "{{ ansible_system | lower }}"
- name: Set go architecture
ansible.builtin.set_fact:
go_arch: "{{ go_archmap[ansible_architecture] }}"
go_arch: "{{ go_archive_archmap[ansible_architecture] }}"
- name: Set archive name
ansible.builtin.set_fact:
@@ -50,7 +39,7 @@
- name: Set go archive url and path
ansible.builtin.set_fact:
go_archive_url: "https://go.dev/dl/{{ go_archive_file }}"
go_archive_url: "{{ go_archive_url_base }}/{{ go_archive_file }}"
go_extract_path: "{{ path_archive }}/go{{ go_archive_version }}"
- name: Finalize go archive install
@@ -58,15 +47,14 @@
go_archive_install:
extract_to: "{{ go_extract_path }}"
url: "{{ go_archive_url }}"
name: "{{ go_archive }}"
name: "{{ go_archive_file }}"
checksum: "{{ go_archive_sums[go_archive_version][ansible_system][go_arch] }}"
bins:
- from: "{{ go_archive_path }}/go"
links:
- from: "{{ go_extract_path }}/go"
to: "{{ path_go }}"
force: true
- from: "{{ path_go }}/bin/go"
to: "{{ path_bin }}/go"
force: true
__add_to_path: "{{ __add_to_path + [path_go ~ '/bin'] }}"
__var_to_env: "{{ __var_to_env | combine( { 'GOROOT': path_go } ) }}"
- name: Queue go install
block:
@@ -84,13 +72,6 @@
ansible.builtin.set_fact:
pkg_archive: "{{ pkg_archive + [go_archive_install] }}"
- name: Set symbolic link to archive path
ansible.bulitin.file:
state: link
force: true
path: "{{ path_go }}"
src: "{{ go_extract_path }}/go"
- name: Complete go archive install configuration
ansible.builtin.set_fact:
__go_configured: true
__configured: "{{ __configured | combine( { 'go': true } ) }}"

View File

@@ -7,13 +7,13 @@
- name: Set Hyprland install method
when:
- hyprland_install_method is undefined
ansible.bulitin.set_fact:
ansible.builtin.set_fact:
hyprland_install_method: "{% if install_method in hyprland_install_methods %}{{ install_method }}{% else %}{{ hyprland_install_methods[0] }}{% endif %}"
- name: Set Hyprland source install configuration
when:
- hyprland_install_method == 'source'
ansible.bulitin.set_fact:
ansible.builtin.set_fact:
hyprland_version: "{{ hyprland_version | default('v0.53.3') }}"
hyprland_git_repo: "{{ hyprland_git_repo | default('https://github.com/hyprwm/Hyprland') }}"
hyprland_build_deps: