fix: standardize command import paths to lowercase for consistency
This commit is contained in:
+13
-1
@@ -4,12 +4,23 @@
|
||||
become: yes # This enables sudo privileges
|
||||
vars:
|
||||
app_dir: /opt/kekbot
|
||||
node_version: "20.x" # Latest LTS version
|
||||
node_version: "22.x" # Latest LTS version
|
||||
|
||||
tasks:
|
||||
- name: Check if Node.js, npm, and git are installed
|
||||
command: "which {{ item }}"
|
||||
register: check_commands
|
||||
with_items:
|
||||
- node
|
||||
- npm
|
||||
- git
|
||||
ignore_errors: yes
|
||||
changed_when: false
|
||||
|
||||
- name: Install Node.js repository
|
||||
shell: |
|
||||
curl -fsSL https://deb.nodesource.com/setup_{{ node_version }} | bash -
|
||||
when: check_commands.results | select('failed') | list | length > 0
|
||||
|
||||
- name: Install Node.js, npm, and git
|
||||
apt:
|
||||
@@ -19,6 +30,7 @@
|
||||
- git
|
||||
state: present
|
||||
update_cache: yes
|
||||
when: check_commands.results | select('failed') | list | length > 0
|
||||
|
||||
- name: Create application directory
|
||||
file:
|
||||
|
||||
Reference in New Issue
Block a user