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