add ability to install npm, go and pipxpkgs
This commit is contained in:
@@ -31,9 +31,11 @@
|
||||
- ansible.builtin.apt:
|
||||
name: "{{ syspkgs }}"
|
||||
state: "{{ install_state }}"
|
||||
when: ansible_os_family == 'Darwin'
|
||||
when: ansible_os_family == 'Debian'
|
||||
become: true
|
||||
when: ansible_system == 'Linux'
|
||||
when:
|
||||
- ansible_system == 'Linux'
|
||||
- syspkgs|length > 0
|
||||
tags:
|
||||
- Linux
|
||||
- RedHat
|
||||
@@ -45,10 +47,12 @@
|
||||
- community.general.homebrew:
|
||||
name: "{{ syspkgs | unique }}"
|
||||
state: "{{ install_state }}"
|
||||
when: syspkgs|length > 0
|
||||
|
||||
- community.general.homebrew_cask:
|
||||
name: "{{ caskpkgs | unique }}"
|
||||
state: "{{ install_state }}"
|
||||
when: caskpkgs|length > 0
|
||||
tags:
|
||||
- packages
|
||||
- Darwin
|
||||
@@ -66,3 +70,57 @@
|
||||
tags:
|
||||
- packages
|
||||
- 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: []
|
||||
caskpkgs: []
|
||||
cargopkgs: []
|
||||
npmpkgs: []
|
||||
gopkgs: []
|
||||
pipxpkgs: []
|
||||
assume_missing_is_syspkg: false
|
||||
install_state: present
|
||||
full_upgrade: false
|
||||
|
||||
Reference in New Issue
Block a user