diff --git a/playbooks/roles/edxapp/defaults/main.yml b/playbooks/roles/edxapp/defaults/main.yml index 3a821611e..18dbaa9d7 100644 --- a/playbooks/roles/edxapp/defaults/main.yml +++ b/playbooks/roles/edxapp/defaults/main.yml @@ -1123,6 +1123,10 @@ edxapp_npm_bin: "{{ edxapp_npm_dir }}/bin" edxapp_settings: '{{ EDXAPP_SETTINGS }}' EDXAPP_NODE_VERSION: "20" EDXAPP_NPM_VERSION: "10.7.0" + +NPM_ALIASES: + "@edx/brand": "npm:@edx/brand-edx.org@^2.1.3" + # This is where node installs modules, not node itself edxapp_node_bin: "{{ edxapp_code_dir }}/node_modules/.bin" edxapp_user: edxapp diff --git a/playbooks/roles/edxapp/tasks/deploy.yml b/playbooks/roles/edxapp/tasks/deploy.yml index 1bf875c0d..dcafa267c 100644 --- a/playbooks/roles/edxapp/tasks/deploy.yml +++ b/playbooks/roles/edxapp/tasks/deploy.yml @@ -299,6 +299,19 @@ - install - install:app-requirements +# Installing npm aliases +- name: Install NPM aliases + shell: > + npm install {{ item.key }}@{{ item.value }} --no-save + args: + chdir: "{{ edxapp_code_dir }}" + environment: "{{ edxapp_environment | combine(git_ssh_environment_mixin) }}" + become_user: "{{ edxapp_user }}" + with_dict: "{{ NPM_ALIASES }}" + tags: + - install + - install:app-requirements + # The next few tasks set up the python code sandbox # need to disable this profile, otherwise the pip inside the sandbox venv has no permissions