fixing documentation

This commit is contained in:
Matthew Stobbs
2026-02-02 21:09:51 -07:00
parent 81a1dd7469
commit ac7ad62d40
6 changed files with 210 additions and 150 deletions

View File

@@ -7,23 +7,36 @@
become_user: "{{ install_become_user }}"
ansible.bulitin.file:
state: directory
path: "{{ extract_path }}"
mode: "{{ install_prefix_mode }}"
owner: "{{ install_prefix_owner }}"
group: "{{ install_prefix_group }}"
path: "{{ pkg.extract_path }}"
mode: "{{ pkg.install_prefix_mode | default('0755') }}"
owner: "{{ pkg.install_prefix_owner | default(ansible_user_id)}}"
group: "{{ pkg.install_prefix_group | default(ansible_user_gid) }}"
- name: Download archive to cache
ansible.builtin.get_url:
dest: "{{ d_cache }}/{{ archive_name }}"
url: "{{ archive_url }}"
checksum: "{{ archive_checksum }}"
dest: "{{ d_cache }}/{{ pkg.archive_name }}"
url: "{{ pkg.archive_url }}"
checksum: "{{ pkg.archive_checksum | default(omit) }}"
decompress: false
mode: '0644'
- name: Extract go archive
- name: Extract archive
ansible.builtin.unarchive:
dest: "{{ extract_path }}"
src: "{{ d_cache }}/{{ archive_name }}"
dest: "{{ pkg.extract_path }}"
src: "{{ d_cache }}/{{ pkg.archive_name }}"
remote_src: true
include: "{{ archive_include | default(omit) }}"
exclude: "{{ archive_exclude | default(omit) }}"
include: "{{ pkg.archive_include | default(omit) }}"
exclude: "{{ pkg.archive_exclude | default(omit) }}"
- name: Symlink archive files
when:
- pkg.link_bin is defined
- pkg.link_bin | length > 0
loop: pkg.link_bin
loop_control:
loop_var: lnk
ansible.builtin.file:
state: link
path: "{{ lnk.to }}"
src: "{{ lnk.from }}"
force: "{{ lnk.force | default(omit) }}"

View File

@@ -161,7 +161,7 @@
loop_control:
loop_var: pkg
ansible.builtin.include_tasks:
file: "archive/{{ pkg }}.yml"
file: "helpers/archive.yml"
- name: Install cargo packages
when:

View File

@@ -10,6 +10,28 @@
ansible.builtin.set_fact:
go_install_method: "{% if install_method in go_install_methods %}{{ install_method }}{% else %}{{ go_install_methods[0] }}{% endif %}"
- name: Configure go system installation
when:
- go_install_method == 'system'
block:
- name: Set go pkgname for linux
when:
- ansible_system == 'Linux'
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] }}"
- name: Configure go archive installation
when:
- go_install_method == 'archive'
@@ -32,12 +54,19 @@
go_extract_path: "{{ path_archive }}/go{{ go_archive_version }}"
- name: Finalize go archive install
ansible.builtin.set_fact
ansible.builtin.set_fact:
go_archive_install:
extract_path: "{{ go_extract_path }}"
archive_url: "{{ go_archive_url }}"
archive_name: "{{ go_archive }}"
archive_checksum: "{{ go_archive_sums[go_archive_version][ansible_system][go_arch] }}"
link_bin:
- from: "{{ go_archive_path }}/go"
to: "{{ path_go }}"
force: true
- from: "{{ path_go }}/bin/go"
to: "{{ path_bin }}/go"
force: true
- name: Queue go install
block:
@@ -45,7 +74,7 @@
when:
- go_install_method == 'system'
ansible.builtin.set_fact:
pkg_sys: "{{ pkg_sys + ['go'] }}"
pkg_sys: "{{ pkg_sys + [go_pkgname] }}"
- name: Install via archive
when: