- the make helper now has distinct build stages - configure: is now defined in pkg.targets.configure - build: is now defined in pkg.targets.build - install: is now defined in pkg.targets.install - added pre-install: which is a list of targets that are looped over before install - added post-instal: which is a list of targets that are looped over after install - removed major package level variables from vars/main.yml - moving those variables into actual package level variables as defaults - if the values are defined they will be used instead of defaults
48 lines
1.3 KiB
YAML
48 lines
1.3 KiB
YAML
# vim: set filetype=yaml.ansible :
|
|
#
|
|
## Package: cargo
|
|
## Description: the Rust package manager
|
|
## Version: system
|
|
## Methods: system
|
|
## Helpers: -
|
|
---
|
|
- name: Set default cargo values
|
|
ansible.builtin.set_fact:
|
|
cargo:
|
|
install_methods:
|
|
- system
|
|
pkgname:
|
|
RedHat: cargo
|
|
Debian: cargo
|
|
Alpine: cargo
|
|
FreeBSD: cargo
|
|
- name: Configure cargo
|
|
when:
|
|
- "'cargo' not in __configured"
|
|
block:
|
|
- name: Set cargo install method
|
|
when:
|
|
- cargo_install_method is undefined
|
|
ansible.builtin.set_fact:
|
|
cargo_install_method: "{{ install_method if install_method in cargo.install_methods else cargo.install_methods[0] }}"
|
|
|
|
- name: Add dependencies
|
|
when:
|
|
- cargo_pkgdeps is defined
|
|
loop: "{{ cargo_pkgdeps }}"
|
|
loop_control:
|
|
loop_var: dep
|
|
ansible.builtin.include_tasks: "pkgs/{{ dep }}.yml"
|
|
|
|
- name: Append cargo to install list
|
|
when:
|
|
- cargo_install_method == "system"
|
|
block:
|
|
- name: Queue cargo install
|
|
ansible.builtin.set_fact:
|
|
pkg_sys: "{{ pkg_sys + [cargo.pkgname[os_family]] }}"
|
|
|
|
- name: Finalize cargo configuration
|
|
ansible.builtin.set_fact:
|
|
__configured: "{{ __configured | combine ( { 'cargo': cargo_install_method } ) }}"
|