This commit is contained in:
parent
efd0604c3a
commit
6dfb60165a
12 changed files with 44 additions and 67 deletions
|
@ -4,17 +4,8 @@
|
|||
ansible.builtin.apt:
|
||||
state: present
|
||||
pkg:
|
||||
- gpg
|
||||
- apt-transport-https
|
||||
- build-essential
|
||||
|
||||
- name: Import nodesource signing key
|
||||
ansible.builtin.shell:
|
||||
cmd: curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor
|
||||
-o /usr/share/keyrings/nodesource.gpg
|
||||
args:
|
||||
creates: /usr/share/keyrings/nodesource.gpg
|
||||
notify: Apt update
|
||||
- nodejs
|
||||
|
||||
- name: Ensure directories are present
|
||||
ansible.builtin.file:
|
||||
|
@ -30,20 +21,8 @@
|
|||
notify:
|
||||
- Restart thelounge
|
||||
|
||||
- name: Configure templates
|
||||
ansible.builtin.template:
|
||||
src: "{{ item.src }}"
|
||||
dest: "{{ item.dest }}"
|
||||
owner: "{{ item.owner | default( chat_user ) }}"
|
||||
group: "{{ item.group | default( chat_group ) }}"
|
||||
mode: "{{ item.mode | default('0640') }}"
|
||||
with_items:
|
||||
- { src: "nodesource.list", dest: "/etc/apt/sources.list.d/nodesource.list", owner: root, group: root }
|
||||
- { src: "nodejs-apt-pref", dest: "/etc/apt/preferences.d/nodejs", owner: root, group: root }
|
||||
|
||||
- name: Install nodejs
|
||||
ansible.builtin.apt:
|
||||
name: nodejs
|
||||
|
||||
- name: Install yarn
|
||||
ansible.builtin.shell:
|
||||
|
|
|
@ -1,5 +0,0 @@
|
|||
# {{ ansible_managed }}
|
||||
|
||||
Package: nodejs
|
||||
Pin: origin deb.nodesource.com
|
||||
Pin-Priority: 1000
|
|
@ -1,3 +0,0 @@
|
|||
# {{ ansible_managed }}
|
||||
|
||||
deb [arch=amd64 signed-by=/usr/share/keyrings/nodesource.gpg] https://deb.nodesource.com/node_{{ nodejs_version }} nodistro main
|
Loading…
Add table
Add a link
Reference in a new issue