diff --git a/handlers/main.yml b/handlers/main.yml index 52083b6..55f0729 100644 --- a/handlers/main.yml +++ b/handlers/main.yml @@ -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: diff --git a/tasks/main.yml b/tasks/main.yml index 5f7c706..9f40831 100644 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -99,11 +99,26 @@ - name: Install cargo packages when: - pkg_cargo|length > 0 - loop: "{{ pkg_cargo | unique }}" - loop_control: - loop_var: pkg - ansible.builtin.include_tasks: - file: cargo.yml + 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 + ansible.builtin.include_tasks: + file: cargo.yml - name: Install go packages when: diff --git a/tasks/pkgs/alacritty.yml b/tasks/pkgs/alacritty.yml index 6f6c474..08da8f1 100644 --- a/tasks/pkgs/alacritty.yml +++ b/tasks/pkgs/alacritty.yml @@ -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] }}" diff --git a/tasks/pkgs/broot.yml b/tasks/pkgs/broot.yml index 2f85702..6a937b7 100644 --- a/tasks/pkgs/broot.yml +++ b/tasks/pkgs/broot.yml @@ -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] }}" diff --git a/tasks/pkgs/choose.yml b/tasks/pkgs/choose.yml index 3f06dd4..10cc80f 100644 --- a/tasks/pkgs/choose.yml +++ b/tasks/pkgs/choose.yml @@ -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] }}" diff --git a/tasks/pkgs/dotenv-linter.yml b/tasks/pkgs/dotenv-linter.yml index 1c95644..0e64545 100644 --- a/tasks/pkgs/dotenv-linter.yml +++ b/tasks/pkgs/dotenv-linter.yml @@ -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'] }}" diff --git a/tasks/pkgs/dust.yml b/tasks/pkgs/dust.yml index 85267ee..56f3912 100644 --- a/tasks/pkgs/dust.yml +++ b/tasks/pkgs/dust.yml @@ -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'] }}" diff --git a/tasks/pkgs/eza.yml b/tasks/pkgs/eza.yml index f3f68fc..8d8c7bd 100644 --- a/tasks/pkgs/eza.yml +++ b/tasks/pkgs/eza.yml @@ -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'] }}" diff --git a/tasks/pkgs/gping.yml b/tasks/pkgs/gping.yml index 912b33d..6111cb3 100644 --- a/tasks/pkgs/gping.yml +++ b/tasks/pkgs/gping.yml @@ -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'] }}" diff --git a/tasks/pkgs/htmx-lsp.yml b/tasks/pkgs/htmx-lsp.yml index 1331894..3e6b1fb 100644 --- a/tasks/pkgs/htmx-lsp.yml +++ b/tasks/pkgs/htmx-lsp.yml @@ -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'] }}" diff --git a/tasks/pkgs/jinja-lsp.yml b/tasks/pkgs/jinja-lsp.yml index 39401de..8aca974 100644 --- a/tasks/pkgs/jinja-lsp.yml +++ b/tasks/pkgs/jinja-lsp.yml @@ -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'] }}" diff --git a/tasks/pkgs/mcfly.yml b/tasks/pkgs/mcfly.yml index ddbe09d..d7b10a0 100644 --- a/tasks/pkgs/mcfly.yml +++ b/tasks/pkgs/mcfly.yml @@ -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'] }}" diff --git a/tasks/pkgs/neovide.yml b/tasks/pkgs/neovide.yml index 3294faf..b6d6ee2 100644 --- a/tasks/pkgs/neovide.yml +++ b/tasks/pkgs/neovide.yml @@ -15,11 +15,11 @@ - name: Append neovide build_deps to pkg_sys ansible.builtin.set_fact: 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] }}" diff --git a/tasks/pkgs/nodejs.yml b/tasks/pkgs/nodejs.yml index 84aff7e..67b67df 100644 --- a/tasks/pkgs/nodejs.yml +++ b/tasks/pkgs/nodejs.yml @@ -1,17 +1,17 @@ # vim: set filetype=yaml.ansible : --- -- name: Add nodejs - when: - - nodejs_configured is undefined - block: - - name: Load nodejs config - ansible.builtin.include_tasks: - file: config/nodejs.yml +# - 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 - ansible.builtin.set_fact: - pkg_sys: "{{ pkg_sys + nodejs.pkgs }}" +- name: Append nodejs to pkg_sys + ansible.builtin.set_fact: + pkg_sys: "{{ pkg_sys + nodejs.pkgs }}" - - name: Set nodejs_configured - ansible.builtin.set_fact: - nodejs_configured: true +- name: Set nodejs_configured + ansible.builtin.set_fact: + nodejs_configured: true diff --git a/tasks/pkgs/rust.yml b/tasks/pkgs/rust.yml index 14a237f..2ded82e 100644 --- a/tasks/pkgs/rust.yml +++ b/tasks/pkgs/rust.yml @@ -1,17 +1,10 @@ # vim: set filetype=yaml.ansible : --- -- name: Add rust - when: - - rust_configured is undefined - block: - - name: Load rust config - ansible.builtin.include_tasks: - file: config/rust.yml +- 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 }}" diff --git a/tasks/pkgs/sd.yml b/tasks/pkgs/sd.yml index 4cee505..be92a39 100644 --- a/tasks/pkgs/sd.yml +++ b/tasks/pkgs/sd.yml @@ -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'] }}" diff --git a/tasks/pkgs/starship.yml b/tasks/pkgs/starship.yml index 0c42b3a..cd46b9e 100644 --- a/tasks/pkgs/starship.yml +++ b/tasks/pkgs/starship.yml @@ -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}] }}" diff --git a/tasks/pkgs/tldr.yml b/tasks/pkgs/tldr.yml index 39f3d62..ec39647 100644 --- a/tasks/pkgs/tldr.yml +++ b/tasks/pkgs/tldr.yml @@ -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'] }}" diff --git a/tasks/pkgs/xh.yml b/tasks/pkgs/xh.yml index 8bc7033..77dfe7c 100644 --- a/tasks/pkgs/xh.yml +++ b/tasks/pkgs/xh.yml @@ -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] }}" diff --git a/tasks/pkgs/yazi.yml b/tasks/pkgs/yazi.yml index 8f8dd46..aa316db 100644 --- a/tasks/pkgs/yazi.yml +++ b/tasks/pkgs/yazi.yml @@ -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'] }}"