Closed mamedin closed 1 year ago
Related to npm and bootstrap issue, for Ubuntu we are running the following tasks as workaround in deployment/upgrade playbooks:
- name: "Additional tasks when using bootstrap5"
block:
- name: "Define default AtoM source directory"
set_fact:
__atom_site_src_directory: "{{ atom_path }}"
- name: "Redefine AtoM source directory when using atom_revision_directory"
set_fact:
__atom_site_src_directory: "{{ atom_path }}/{{ atom_revision_directory_latest_symlink_dir }}"
when:
- atom_revision_directory|bool
- name: "Add nodejs apt key"
become: "yes"
apt_key:
url: https://deb.nodesource.com/gpgkey/nodesource.gpg.key
state: present
- name: "Add nodejs 14.x ppa for apt repo"
become: "yes"
apt_repository:
repo: "deb https://deb.nodesource.com/node_14.x focal main"
update_cache: "yes"
- name: "Install nodejs"
become: "yes"
apt:
update_cache: "yes"
name: "nodejs"
state: "latest"
- name: "Run post tasks in AtoM site directory"
become: "yes"
command: "{{ item }}"
args:
chdir: "{{ __atom_site_src_directory }}"
with_items:
- sudo mkdir -p /var/www/.npm /var/www/.config
- sudo chown -R {{ atom_user }}:{{ atom_group }} /var/www/.npm /var/www/.config
- sudo npm install -g npm@latest
- sudo -u {{ atom_user }} npm cache clean --force
- sudo -u {{ atom_user }} CYPRESS_INSTALL_BINARY=0 npm install
- sudo -u {{ atom_user }} npm run build
- sudo -u {{ atom_user }} php symfony cc
- service php7.4-fpm restart
- service memcached restart
- systemctl reset-failed
- service atom-worker-* restart
#End block
when:
- atom_use_bootstrap5_theme is defined
- atom_use_bootstrap5_theme|bool
- ansible_distribution_version is version_compare('20.04', '>=')
tags:
- atom-site
- bootstrap5
Items to be added to the role for AtoM 2.7 support: