node, fix lint issues: fix indentation, do not update cache or use the latest file, add a changed_chen to shell.
This commit is contained in:
@@ -7,41 +7,41 @@
|
|||||||
- name: Workstation | Software | NodeJS
|
- name: Workstation | Software | NodeJS
|
||||||
block:
|
block:
|
||||||
|
|
||||||
- name: Workstation | Software | NodeJS | apt
|
- name: Workstation | Software | NodeJS | apt
|
||||||
block:
|
block:
|
||||||
|
|
||||||
- name: Workstation | Software | NodeJS | apt | Facts
|
- name: Workstation | Software | NodeJS | apt | Facts
|
||||||
ansible.builtin.set_fact:
|
ansible.builtin.set_fact:
|
||||||
node_version: node_24.x
|
node_version: node_24.x
|
||||||
|
|
||||||
- name: Workstation | Software | NodeJS | apt | Old | Remove
|
- name: Workstation | Software | NodeJS | apt | Old | Remove
|
||||||
|
ansible.builtin.package:
|
||||||
|
name: npm
|
||||||
|
state: absent
|
||||||
|
|
||||||
|
- name: Workstation | Software | NodeJS | apt | extrepo | Install
|
||||||
|
ansible.builtin.package:
|
||||||
|
name: extrepo
|
||||||
|
state: present
|
||||||
|
|
||||||
|
- name: Workstation | Software | NodeJS | apt | extrepo | Enable
|
||||||
|
ansible.builtin.shell: "extrepo enable {{ node_version }}"
|
||||||
|
register: shell_check
|
||||||
|
changed_when: shell_check.rc == 0
|
||||||
|
|
||||||
|
- name: Workstation | Software | NodeJS | apt | Install
|
||||||
|
ansible.builtin.package:
|
||||||
|
name: nodejs
|
||||||
|
state: present
|
||||||
|
|
||||||
|
when: ansible_pkg_mgr == "apt"
|
||||||
|
|
||||||
|
- name: Workstation | Software | NodeJS | All Others | Install
|
||||||
ansible.builtin.package:
|
ansible.builtin.package:
|
||||||
name: npm
|
name:
|
||||||
state: absent
|
- nodejs
|
||||||
|
- npm
|
||||||
- name: Workstation | Software | NodeJS | apt | extrepo | Install
|
|
||||||
ansible.builtin.package:
|
|
||||||
name: extrepo
|
|
||||||
state: present
|
state: present
|
||||||
update_cache: true
|
when: ansible_pkg_mgr != "apt"
|
||||||
|
|
||||||
- name: Workstation | Software | NodeJS | apt | extrepo | Enable
|
|
||||||
ansible.builtin.shell: "extrepo enable {{ node_version }}"
|
|
||||||
|
|
||||||
- name: Workstation | Software | NodeJS | apt | Install
|
|
||||||
ansible.builtin.package:
|
|
||||||
name: nodejs
|
|
||||||
state: latest
|
|
||||||
update_cache: true
|
|
||||||
|
|
||||||
when: ansible_pkg_mgr == "apt"
|
|
||||||
|
|
||||||
- name: Workstation | Software | NodeJS | All Others | Install
|
|
||||||
ansible.builtin.package:
|
|
||||||
name:
|
|
||||||
- nodejs
|
|
||||||
- npm
|
|
||||||
state: present
|
|
||||||
when: ansible_pkg_mgr != "apt"
|
|
||||||
|
|
||||||
when: coding
|
when: coding
|
||||||
|
|||||||
Reference in New Issue
Block a user