Install cargo only if pkg_cargo needs it
This commit is contained in:
@@ -19,13 +19,13 @@
|
|||||||
- name: Ensure go is present
|
- name: Ensure go is present
|
||||||
vars:
|
vars:
|
||||||
pkg: go
|
pkg: go
|
||||||
listen: "Depend go"
|
listen: Depend go
|
||||||
ansible.builtin.include_tasks:
|
ansible.builtin.include_tasks:
|
||||||
file: addpkg.yml
|
file: addpkg.yml
|
||||||
|
|
||||||
- name: Ensure go path exists
|
- name: Ensure go path exists
|
||||||
become: "{{ ext_become }}"
|
become: "{{ ext_become }}"
|
||||||
listen: "Depend go"
|
listen: Depend go
|
||||||
ansible.builtin.file:
|
ansible.builtin.file:
|
||||||
state: directory
|
state: directory
|
||||||
mode: '0755'
|
mode: '0755'
|
||||||
@@ -46,47 +46,47 @@
|
|||||||
- name: Ensure pipx is installed
|
- name: Ensure pipx is installed
|
||||||
vars:
|
vars:
|
||||||
pkg: pipx
|
pkg: pipx
|
||||||
listen: "Depend pipx"
|
listen: Depend pipx
|
||||||
ansible.builtin.include_tasks:
|
ansible.builtin.include_tasks:
|
||||||
file: addpkg.yml
|
file: addpkg.yml
|
||||||
|
|
||||||
- name: Ensure pipx path exists
|
- name: Ensure pipx path exists
|
||||||
become: "{{ ext_become }}"
|
become: "{{ ext_become }}"
|
||||||
listen: "Depend pipx"
|
listen: Depend pip"
|
||||||
ansible.builtin.file:
|
ansible.builtin.file:
|
||||||
state: directory
|
state: directory
|
||||||
mode: '0755'
|
mode: '0755'
|
||||||
path: "{{ path.pipx }}"
|
path: "{{ path.pipx }}"
|
||||||
|
|
||||||
- name: Ensure rust and cargo are installed
|
# - name: Ensure rust and cargo are installed
|
||||||
vars:
|
# vars:
|
||||||
pkg: rust
|
# pkg: rust
|
||||||
listen: "Depend cargo"
|
# listen: Depend cargo
|
||||||
ansible.builtin.include_tasks:
|
# ansible.builtin.include_tasks:
|
||||||
file: addpkg.yml
|
# file: addpkg.yml
|
||||||
|
#
|
||||||
- name: Ensure cargo path exists
|
# - name: Ensure cargo path exists
|
||||||
become: "{{ ext_become }}"
|
# become: "{{ ext_become }}"
|
||||||
listen: "Depend cargo"
|
# listen: Depend cargo
|
||||||
ansible.builtin.file:
|
# ansible.builtin.file:
|
||||||
state: directory
|
# state: directory
|
||||||
mode: '0755'
|
# mode: '0755'
|
||||||
path: "{{ path.cargo }}"
|
# path: "{{ path.cargo }}"
|
||||||
|
#
|
||||||
- name: Depend rust
|
# - name: Depend rust
|
||||||
vars:
|
# vars:
|
||||||
pkg: rust
|
# pkg: rust
|
||||||
listen: "Depend rust"
|
# listen: "Depend rust"
|
||||||
ansible.builtin.include_tasks:
|
# ansible.builtin.include_tasks:
|
||||||
file: addpkg.yml
|
# file: addpkg.yml
|
||||||
|
#
|
||||||
- name: Ensure cargo path exists
|
# - name: Ensure cargo path exists
|
||||||
become: "{{ ext_become }}"
|
# become: "{{ ext_become }}"
|
||||||
listen: "Depend rust"
|
# listen: "Depend rust"
|
||||||
ansible.builtin.file:
|
# ansible.builtin.file:
|
||||||
state: directory
|
# state: directory
|
||||||
mode: '0755'
|
# mode: '0755'
|
||||||
path: "{{ path.cargo }}"
|
# path: "{{ path.cargo }}"
|
||||||
|
|
||||||
- name: Depend zig
|
- name: Depend zig
|
||||||
vars:
|
vars:
|
||||||
|
|||||||
@@ -99,11 +99,26 @@
|
|||||||
- name: Install cargo packages
|
- name: Install cargo packages
|
||||||
when:
|
when:
|
||||||
- pkg_cargo|length > 0
|
- pkg_cargo|length > 0
|
||||||
loop: "{{ pkg_cargo | unique }}"
|
block:
|
||||||
loop_control:
|
- name: Ensure rust and cargo are installed
|
||||||
loop_var: pkg
|
vars:
|
||||||
ansible.builtin.include_tasks:
|
pkg: rust
|
||||||
file: cargo.yml
|
ansible.builtin.include_tasks:
|
||||||
|
file: addpkg.yml
|
||||||
|
|
||||||
|
- name: Ensure cargo path exists
|
||||||
|
become: "{{ ext_become }}"
|
||||||
|
ansible.builtin.file:
|
||||||
|
state: directory
|
||||||
|
mode: '0755'
|
||||||
|
path: "{{ path.cargo }}"
|
||||||
|
|
||||||
|
- name: Install cargo packages
|
||||||
|
loop: "{{ pkg_cargo | unique }}"
|
||||||
|
loop_control:
|
||||||
|
loop_var: pkg
|
||||||
|
ansible.builtin.include_tasks:
|
||||||
|
file: cargo.yml
|
||||||
|
|
||||||
- name: Install go packages
|
- name: Install go packages
|
||||||
when:
|
when:
|
||||||
|
|||||||
@@ -11,9 +11,9 @@
|
|||||||
- name: Append alacritty to pkg_cargo
|
- name: Append alacritty to pkg_cargo
|
||||||
when:
|
when:
|
||||||
- alacritty.method == 'cargo'
|
- alacritty.method == 'cargo'
|
||||||
notify:
|
# notify:
|
||||||
- Depend cargo
|
# - Depend cargo
|
||||||
changed_when: true
|
# changed_when: true
|
||||||
ansible.builtin.set_fact:
|
ansible.builtin.set_fact:
|
||||||
pkg_sys: "{{ pkg_sys + alacritty.build_deps }}"
|
pkg_sys: "{{ pkg_sys + alacritty.build_deps }}"
|
||||||
pkg_cargo: "{{ pkg_cargo + [alacritty.cargo] }}"
|
pkg_cargo: "{{ pkg_cargo + [alacritty.cargo] }}"
|
||||||
|
|||||||
@@ -11,9 +11,9 @@
|
|||||||
- name: Append broot to pkg_sys and pkg_cargo
|
- name: Append broot to pkg_sys and pkg_cargo
|
||||||
when:
|
when:
|
||||||
- ansible_system == 'Linux'
|
- ansible_system == 'Linux'
|
||||||
notify:
|
# notify:
|
||||||
- Depend cargo
|
# - Depend cargo
|
||||||
changed_when: true
|
# changed_when: true
|
||||||
ansible.builtin.set_fact:
|
ansible.builtin.set_fact:
|
||||||
pkg_sys: "{{ pkg_sys + broot.deps }}"
|
pkg_sys: "{{ pkg_sys + broot.deps }}"
|
||||||
pkg_cargo: "{{ pkg_cargo + [broot] }}"
|
pkg_cargo: "{{ pkg_cargo + [broot] }}"
|
||||||
|
|||||||
@@ -11,9 +11,9 @@
|
|||||||
- name: Append choose to pkg_cargo
|
- name: Append choose to pkg_cargo
|
||||||
when:
|
when:
|
||||||
- ansible_system == 'Linux'
|
- ansible_system == 'Linux'
|
||||||
notify:
|
# notify:
|
||||||
- Depend cargo
|
# - Depend cargo
|
||||||
changed_when: true
|
# changed_when: true
|
||||||
ansible.builtin.set_fact:
|
ansible.builtin.set_fact:
|
||||||
pkg_cargo: "{{ pkg_cargo + [choose] }}"
|
pkg_cargo: "{{ pkg_cargo + [choose] }}"
|
||||||
|
|
||||||
|
|||||||
@@ -5,9 +5,9 @@
|
|||||||
- dotenv_linter_configured is undefined
|
- dotenv_linter_configured is undefined
|
||||||
block:
|
block:
|
||||||
- name: Append dotenv-linter to pkg_cargo
|
- name: Append dotenv-linter to pkg_cargo
|
||||||
notify:
|
# notify:
|
||||||
- Depend cargo
|
# - Depend cargo
|
||||||
changed_when: true
|
# changed_when: true
|
||||||
ansible.builtin.set_fact:
|
ansible.builtin.set_fact:
|
||||||
pkg_cargo: "{{ pkg_cargo + ['dotenv-linter'] }}"
|
pkg_cargo: "{{ pkg_cargo + ['dotenv-linter'] }}"
|
||||||
|
|
||||||
|
|||||||
@@ -7,9 +7,9 @@
|
|||||||
- name: Append du-dust to pkg_cargo
|
- name: Append du-dust to pkg_cargo
|
||||||
when:
|
when:
|
||||||
- ansible_system == 'Linux'
|
- ansible_system == 'Linux'
|
||||||
notify:
|
# notify:
|
||||||
- Depend cargo
|
# - Depend cargo
|
||||||
changed_when: true
|
# changed_when: true
|
||||||
ansible.builtin.set_fact:
|
ansible.builtin.set_fact:
|
||||||
pkg_cargo: "{{ pkg_cargo + ['du-dust'] }}"
|
pkg_cargo: "{{ pkg_cargo + ['du-dust'] }}"
|
||||||
|
|
||||||
|
|||||||
@@ -5,9 +5,9 @@
|
|||||||
- eza_configured is undefined
|
- eza_configured is undefined
|
||||||
block:
|
block:
|
||||||
- name: Append eza to pkg_cargo
|
- name: Append eza to pkg_cargo
|
||||||
notify:
|
# notify:
|
||||||
- Depend cargo
|
# - Depend cargo
|
||||||
changed_when: true
|
# changed_when: true
|
||||||
ansible.builtin.set_fact:
|
ansible.builtin.set_fact:
|
||||||
pkg_cargo: "{{ pkg_cargo + ['eza'] }}"
|
pkg_cargo: "{{ pkg_cargo + ['eza'] }}"
|
||||||
|
|
||||||
|
|||||||
@@ -13,9 +13,9 @@
|
|||||||
- name: Append gping to pkg_cargo
|
- name: Append gping to pkg_cargo
|
||||||
when:
|
when:
|
||||||
- ansible_system == 'Linux'
|
- ansible_system == 'Linux'
|
||||||
notify:
|
# notify:
|
||||||
- Depend cargo
|
# - Depend cargo
|
||||||
changed_when: true
|
# changed_when: true
|
||||||
ansible.builtin.set_fact:
|
ansible.builtin.set_fact:
|
||||||
pkg_cargo: "{{ pkg_cargo + ['gping'] }}"
|
pkg_cargo: "{{ pkg_cargo + ['gping'] }}"
|
||||||
|
|
||||||
|
|||||||
@@ -5,8 +5,8 @@
|
|||||||
- htmx_lsp_configured is undefined
|
- htmx_lsp_configured is undefined
|
||||||
block:
|
block:
|
||||||
- name: Append htmx-lsp to pkg_cargo
|
- name: Append htmx-lsp to pkg_cargo
|
||||||
notify: Depend cargo
|
# notify: Depend cargo
|
||||||
changed_when: true
|
# changed_when: true
|
||||||
ansible.builtin.set_fact:
|
ansible.builtin.set_fact:
|
||||||
pkg_cargo: "{{ pkg_cargo + ['htmx-lsp'] }}"
|
pkg_cargo: "{{ pkg_cargo + ['htmx-lsp'] }}"
|
||||||
|
|
||||||
|
|||||||
@@ -5,9 +5,9 @@
|
|||||||
- jinja_lsp_configured is undefined
|
- jinja_lsp_configured is undefined
|
||||||
block:
|
block:
|
||||||
- name: Append jinja-lsp to pkg_cargo
|
- name: Append jinja-lsp to pkg_cargo
|
||||||
notify:
|
# notify:
|
||||||
- Depend cargo
|
# - Depend cargo
|
||||||
changed_when: true
|
# changed_when: true
|
||||||
ansible.builtin.set_fact:
|
ansible.builtin.set_fact:
|
||||||
pkg_cargo: "{{ pkg_cargo + ['jinja-lsp'] }}"
|
pkg_cargo: "{{ pkg_cargo + ['jinja-lsp'] }}"
|
||||||
|
|
||||||
|
|||||||
@@ -13,8 +13,8 @@
|
|||||||
- name: Append mcfly to pkg_cargo
|
- name: Append mcfly to pkg_cargo
|
||||||
when:
|
when:
|
||||||
- ansible_system == 'Linux'
|
- ansible_system == 'Linux'
|
||||||
notify: Depend cargo
|
# notify: Depend cargo
|
||||||
changed_when: true
|
# changed_when: true
|
||||||
ansible.builtin.set_fact:
|
ansible.builtin.set_fact:
|
||||||
pkg_cargo: "{{ pkg_cargo + ['mcfly'] }}"
|
pkg_cargo: "{{ pkg_cargo + ['mcfly'] }}"
|
||||||
|
|
||||||
|
|||||||
@@ -15,11 +15,11 @@
|
|||||||
- name: Append neovide build_deps to pkg_sys
|
- name: Append neovide build_deps to pkg_sys
|
||||||
ansible.builtin.set_fact:
|
ansible.builtin.set_fact:
|
||||||
pkg_sys: "{{ pkg_sys + neovide.deps }}"
|
pkg_sys: "{{ pkg_sys + neovide.deps }}"
|
||||||
|
|
||||||
- name: Append neovide to pkg_cargo
|
- name: Append neovide to pkg_cargo
|
||||||
notify:
|
# notify:
|
||||||
- Depend cargo
|
# - Depend cargo
|
||||||
changed_when: true
|
# changed_when: true
|
||||||
ansible.builtin.set_fact:
|
ansible.builtin.set_fact:
|
||||||
pkg_cargo: "{{ pkg_cargo + [neovide] }}"
|
pkg_cargo: "{{ pkg_cargo + [neovide] }}"
|
||||||
|
|
||||||
|
|||||||
@@ -1,17 +1,17 @@
|
|||||||
# vim: set filetype=yaml.ansible :
|
# vim: set filetype=yaml.ansible :
|
||||||
---
|
---
|
||||||
- name: Add nodejs
|
# - name: Add nodejs
|
||||||
when:
|
# when:
|
||||||
- nodejs_configured is undefined
|
# - nodejs_configured is undefined
|
||||||
block:
|
# block:
|
||||||
- name: Load nodejs config
|
- name: Load nodejs config
|
||||||
ansible.builtin.include_tasks:
|
ansible.builtin.include_tasks:
|
||||||
file: config/nodejs.yml
|
file: config/nodejs.yml
|
||||||
|
|
||||||
- name: Append nodejs to pkg_sys
|
- name: Append nodejs to pkg_sys
|
||||||
ansible.builtin.set_fact:
|
ansible.builtin.set_fact:
|
||||||
pkg_sys: "{{ pkg_sys + nodejs.pkgs }}"
|
pkg_sys: "{{ pkg_sys + nodejs.pkgs }}"
|
||||||
|
|
||||||
- name: Set nodejs_configured
|
- name: Set nodejs_configured
|
||||||
ansible.builtin.set_fact:
|
ansible.builtin.set_fact:
|
||||||
nodejs_configured: true
|
nodejs_configured: true
|
||||||
|
|||||||
@@ -1,17 +1,10 @@
|
|||||||
# vim: set filetype=yaml.ansible :
|
# vim: set filetype=yaml.ansible :
|
||||||
---
|
---
|
||||||
- name: Add rust
|
- name: Load rust config
|
||||||
when:
|
ansible.builtin.include_tasks:
|
||||||
- rust_configured is undefined
|
file: config/rust.yml
|
||||||
block:
|
|
||||||
- name: Load rust config
|
|
||||||
ansible.builtin.include_tasks:
|
|
||||||
file: config/rust.yml
|
|
||||||
|
|
||||||
- name: Append rust to pkgs
|
- name: Install rust and cargo
|
||||||
ansible.builtin.set_fact:
|
become: true
|
||||||
pkg_sys: "{{ pkg_sys + rust.pkgs }}"
|
ansible.builtin.package:
|
||||||
|
name: "{{ rust.pkgs }}"
|
||||||
- name: Set rust_configured
|
|
||||||
ansible.builtin.set_fact:
|
|
||||||
rust_configured: true
|
|
||||||
|
|||||||
@@ -13,9 +13,9 @@
|
|||||||
- name: Append sd to pkg_cargo
|
- name: Append sd to pkg_cargo
|
||||||
when:
|
when:
|
||||||
- ansible_system == 'Linux'
|
- ansible_system == 'Linux'
|
||||||
notify:
|
# notify:
|
||||||
- Depend cargo
|
# - Depend cargo
|
||||||
changed_when: true
|
# changed_when: true
|
||||||
ansible.builtin.set_fact:
|
ansible.builtin.set_fact:
|
||||||
pkg_cargo: "{{ pkg_cargo + ['sd'] }}"
|
pkg_cargo: "{{ pkg_cargo + ['sd'] }}"
|
||||||
|
|
||||||
|
|||||||
@@ -5,9 +5,9 @@
|
|||||||
- starship_configured is undefined
|
- starship_configured is undefined
|
||||||
block:
|
block:
|
||||||
- name: Append starship to pkg_cargo
|
- name: Append starship to pkg_cargo
|
||||||
notify:
|
# notify:
|
||||||
- Depend cargo
|
# - Depend cargo
|
||||||
changed_when: true
|
# changed_when: true
|
||||||
ansible.builtin.set_fact:
|
ansible.builtin.set_fact:
|
||||||
pkg_cargo: "{{ pkg_cargo + [{'name': 'starship', 'locked': true}] }}"
|
pkg_cargo: "{{ pkg_cargo + [{'name': 'starship', 'locked': true}] }}"
|
||||||
|
|
||||||
|
|||||||
@@ -13,8 +13,8 @@
|
|||||||
- name: Append tldr to pkg_cargo
|
- name: Append tldr to pkg_cargo
|
||||||
when:
|
when:
|
||||||
- ansible_system == 'Linux'
|
- ansible_system == 'Linux'
|
||||||
notify: Depend cargo
|
# notify: Depend cargo
|
||||||
changed_when: true
|
# changed_when: true
|
||||||
ansible.builtin.set_fact:
|
ansible.builtin.set_fact:
|
||||||
pkg_cargo: "{{ pkg_cargo + ['tlrc'] }}"
|
pkg_cargo: "{{ pkg_cargo + ['tlrc'] }}"
|
||||||
|
|
||||||
|
|||||||
@@ -17,8 +17,8 @@
|
|||||||
- name: Add xh to cargopkgs
|
- name: Add xh to cargopkgs
|
||||||
when:
|
when:
|
||||||
- ansible_system == 'Linux'
|
- ansible_system == 'Linux'
|
||||||
notify: Depend cargo
|
# notify: Depend cargo
|
||||||
changed_when: true
|
# changed_when: true
|
||||||
ansible.builtin.set_fact:
|
ansible.builtin.set_fact:
|
||||||
pkg_cargo: "{{ pkg_cargo + [xh] }}"
|
pkg_cargo: "{{ pkg_cargo + [xh] }}"
|
||||||
|
|
||||||
|
|||||||
@@ -5,8 +5,8 @@
|
|||||||
- yazi_fm_configured is undefined
|
- yazi_fm_configured is undefined
|
||||||
block:
|
block:
|
||||||
- name: Append yazi-fm to pkg_cargo
|
- name: Append yazi-fm to pkg_cargo
|
||||||
notify: Depend cargo
|
# notify: Depend cargo
|
||||||
changed_when: true
|
# changed_when: true
|
||||||
ansible.builtin.set_fact:
|
ansible.builtin.set_fact:
|
||||||
pkg_cargo: "{{ pkg_cargo + ['yazi-fm', 'yazi-cli'] }}"
|
pkg_cargo: "{{ pkg_cargo + ['yazi-fm', 'yazi-cli'] }}"
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user