add ability to install npm, go and pipxpkgs
This commit is contained in:
@@ -31,9 +31,11 @@
|
|||||||
- ansible.builtin.apt:
|
- ansible.builtin.apt:
|
||||||
name: "{{ syspkgs }}"
|
name: "{{ syspkgs }}"
|
||||||
state: "{{ install_state }}"
|
state: "{{ install_state }}"
|
||||||
when: ansible_os_family == 'Darwin'
|
when: ansible_os_family == 'Debian'
|
||||||
become: true
|
become: true
|
||||||
when: ansible_system == 'Linux'
|
when:
|
||||||
|
- ansible_system == 'Linux'
|
||||||
|
- syspkgs|length > 0
|
||||||
tags:
|
tags:
|
||||||
- Linux
|
- Linux
|
||||||
- RedHat
|
- RedHat
|
||||||
@@ -45,10 +47,12 @@
|
|||||||
- community.general.homebrew:
|
- community.general.homebrew:
|
||||||
name: "{{ syspkgs | unique }}"
|
name: "{{ syspkgs | unique }}"
|
||||||
state: "{{ install_state }}"
|
state: "{{ install_state }}"
|
||||||
|
when: syspkgs|length > 0
|
||||||
|
|
||||||
- community.general.homebrew_cask:
|
- community.general.homebrew_cask:
|
||||||
name: "{{ caskpkgs | unique }}"
|
name: "{{ caskpkgs | unique }}"
|
||||||
state: "{{ install_state }}"
|
state: "{{ install_state }}"
|
||||||
|
when: caskpkgs|length > 0
|
||||||
tags:
|
tags:
|
||||||
- packages
|
- packages
|
||||||
- Darwin
|
- Darwin
|
||||||
@@ -66,3 +70,57 @@
|
|||||||
tags:
|
tags:
|
||||||
- packages
|
- packages
|
||||||
- source
|
- source
|
||||||
|
|
||||||
|
- name: Install cargo packages
|
||||||
|
community.general.cargo:
|
||||||
|
name: "{{ cargopkgs }}"
|
||||||
|
state: latest
|
||||||
|
locked: true
|
||||||
|
when: cargopkgs|length > 0
|
||||||
|
tags:
|
||||||
|
- packages
|
||||||
|
- rust
|
||||||
|
|
||||||
|
- name: Install local npm packages
|
||||||
|
when: packages.npm is defined
|
||||||
|
community.general.npm:
|
||||||
|
global: true
|
||||||
|
name: "{{ npmpkg }}"
|
||||||
|
state: latest
|
||||||
|
loop: "{{ npmpkgs }}"
|
||||||
|
loop_control:
|
||||||
|
loop_var: npmpkg
|
||||||
|
when: npmpkgs|length > 0
|
||||||
|
tags:
|
||||||
|
- npm
|
||||||
|
- packages
|
||||||
|
|
||||||
|
- name: Install local go packages
|
||||||
|
become: true
|
||||||
|
environment:
|
||||||
|
GOROOT: /usr/local/go
|
||||||
|
PATH: /usr/local/go/bin:$PATH
|
||||||
|
ansible.builtin.command:
|
||||||
|
cmd: "go install {{ gopkg }}"
|
||||||
|
loop: "{{ gopkgs }}"
|
||||||
|
loop_control:
|
||||||
|
loop_var: gopkg
|
||||||
|
when: gopkgs|length > 0
|
||||||
|
tags:
|
||||||
|
- go
|
||||||
|
- packages
|
||||||
|
|
||||||
|
- name: Install python pip packages for user
|
||||||
|
ansible.builtin.pip:
|
||||||
|
name: "{{ pipxpkg }}"
|
||||||
|
state: latest
|
||||||
|
loop: "{{ pipx_packages }}"
|
||||||
|
loop_control:
|
||||||
|
loop_var: pipxpkg
|
||||||
|
when: pipxpkgs|length > 0
|
||||||
|
tags:
|
||||||
|
- packages
|
||||||
|
- python
|
||||||
|
- pip
|
||||||
|
- pipx
|
||||||
|
|
||||||
|
|||||||
@@ -5,6 +5,9 @@ syspkgs: []
|
|||||||
srcpkgs: []
|
srcpkgs: []
|
||||||
caskpkgs: []
|
caskpkgs: []
|
||||||
cargopkgs: []
|
cargopkgs: []
|
||||||
|
npmpkgs: []
|
||||||
|
gopkgs: []
|
||||||
|
pipxpkgs: []
|
||||||
assume_missing_is_syspkg: false
|
assume_missing_is_syspkg: false
|
||||||
install_state: present
|
install_state: present
|
||||||
full_upgrade: false
|
full_upgrade: false
|
||||||
|
|||||||
Reference in New Issue
Block a user