ziion-tools/ansible/roles/common/tasks/install-node.yml

41 lines
727 B
YAML
Raw Permalink Normal View History

2022-10-28 01:46:29 +00:00
- name: Install curl
become_user: root
become: true
apt:
state: present
update_cache: yes
cache_valid_time: 604800
pkg:
- curl
- name: Remove nodejs
become_user: root
become: true
apt:
state: absent
update_cache: yes
cache_valid_time: 604800
pkg:
- nodejs
- name: add nodejs apt repository
become_user: root
become: true
ansible.builtin.shell: "curl -fsSL https://deb.nodesource.com/setup_lts.x | sudo -E bash - "
- name: Install nodejs
become_user: root
become: true
apt:
state: present
update_cache: yes
cache_valid_time: 604800
pkg:
- nodejs
- name:
become_user: root
become: true
ansible.builtin.shell: "corepack enable"