You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

23 lines
779 B

  1. ---
  2. - name: Add APT key for NodeSource Node.js repository
  3. apt_key:
  4. url: https://deb.nodesource.com/gpgkey/nodesource.gpg.key
  5. - name: Add NodeSource Node.js APT repository
  6. apt_repository:
  7. repo: deb https://deb.nodesource.com/node_14.x buster main
  8. - name: Install Node.js
  9. apt:
  10. name: nodejs
  11. - name: Install npm packages defined in package.json
  12. become_user: "{{ app_username }}"
  13. community.general.npm:
  14. path: "{{ app_dir }}"
  15. # --no-bin-links option is needed to prevent npm from creating symlinks in the .bin
  16. # directory, which doesn't work inside Vagrant on Windows
  17. no_bin_links: true
  18. # npm ci needs to be run, for a clean install, instead of npm install.
  19. # otherwise node_modules is never created/updated (Ansible bug?)
  20. ci: true