diff --git a/defaults/main.yml b/defaults/main.yml index 1e9a1a6..15c3008 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -31,3 +31,5 @@ zammad_service: zammad.service zammad_rails_service: zammad-rails.service zammad_websocket_service: zammad-websocket.service zammad_worker_service: zammad-worker.service + +zammad_nodejs_version: 20 diff --git a/tasks/packages.yml b/tasks/packages.yml index 820c7be..152d290 100644 --- a/tasks/packages.yml +++ b/tasks/packages.yml @@ -29,10 +29,24 @@ - libyaml-dev - locales - moreutils - - nodejs - patch - pkg-config - rbenv - redis - sudo - zlib1g-dev + +- name: "Packages | Add nodejs repository key" + ansible.builtin.apt_key: + url: https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key + keyring: /etc/apt/trusted.gpg.d/nodesource.asc + +- name: "Packages | Add nodejs repository" + ansible.builtin.apt_repository: + repo: "deb [signed-by=/etc/apt/trusted.gpg.d/nodesource.asc] https://deb.nodesource.com/node_{{ zammad_nodejs_version }}.x nodistro main" + +- name: "Packages | Install nodejs" + ansible.builtin.apt: + pkg: + - nodejs + update_cache: true