updating documentation

- giving things a better structure
- better documentation with the way things need to be as a standard
This commit is contained in:
Matthew Stobbs
2026-02-04 22:26:15 -07:00
parent 4e65d36b64
commit e231c6ae7a
15 changed files with 221 additions and 194 deletions

View File

@@ -1,42 +1,48 @@
# vim: set filetype=yaml.ansible :
---
- name: Extract archive to given path
- name: Ensure requirements met
when:
- pkg.extract_to is defined
- pkg.name is defined
- pkg.url is defined
block:
- name: Ensure directory exists
become: "{{ install_become }}"
become_user: "{{ install_become_user }}"
ansible.bulitin.file:
state: directory
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: Extract archive to given path
block:
- name: Ensure directory exists
become: "{{ install_become }}"
become_user: "{{ install_become_user }}"
ansible.bulitin.file:
state: directory
path: "{{ pkg.extract_to }}"
mode: "{{ pkg.mode | default('0755') }}"
owner: "{{ pkg.owner | default(ansible_user_id)}}"
group: "{{ pkg.group | default(ansible_user_gid) }}"
- name: Download archive to cache
ansible.builtin.get_url:
dest: "{{ d_cache }}/{{ pkg.archive_name }}"
url: "{{ pkg.archive_url }}"
checksum: "{{ pkg.archive_checksum | default(omit) }}"
decompress: false
mode: '0644'
- name: Download archive to cache
ansible.builtin.get_url:
dest: "{{ d_cache }}/{{ pkg.name }}"
url: "{{ pkg.url }}"
checksum: "{{ pkg.checksum | default(omit) }}"
decompress: false
mode: '0644'
- name: Extract archive
ansible.builtin.unarchive:
dest: "{{ pkg.extract_path }}"
src: "{{ d_cache }}/{{ pkg.archive_name }}"
remote_src: true
include: "{{ pkg.archive_include | default(omit) }}"
exclude: "{{ pkg.archive_exclude | default(omit) }}"
- name: Extract archive
ansible.builtin.unarchive:
dest: "{{ pkg.extract_to }}"
src: "{{ d_cache }}/{{ pkg.name }}"
remote_src: true
include: "{{ pkg.include | default(omit) }}"
exclude: "{{ pkg.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) }}"
- name: Symlink archive files
when:
- pkg.bins is defined
- pkg.bins | length > 0
loop: pkg.bins
loop_control:
loop_var: lnk
ansible.builtin.file:
state: link
path: "{{ lnk.to }}"
src: "{{ lnk.from }}"
force: "{{ lnk.force | default(omit) }}"