From 754d3a3c2f48a600fae325351fd01bbc127154c4 Mon Sep 17 00:00:00 2001 From: nevart Date: Tue, 21 May 2024 18:14:57 +0000 Subject: [PATCH 1/3] schleuder-web: bundle: install dev and test groups as well Otherwise, further bundle invocations might error out due to the Gemfile relying on group-specific gems, which is not compatible with the current Gemfile.lock, which is tracked in git upstream and which is not group-aware. --- tasks/schleuder_web.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/tasks/schleuder_web.yml b/tasks/schleuder_web.yml index 4e14feb..aaeedbc 100644 --- a/tasks/schleuder_web.yml +++ b/tasks/schleuder_web.yml @@ -129,7 +129,6 @@ when: __schleuder_repo_clone.changed # noqa: no-handler with_items: - "path {{ schleuder_schleuder_web_home }}/.gem" - - "without 'development test'" - name: Install bundle (when repo changed) ansible.builtin.command: "/usr/local/bin/bundle install" From 4f5fa2ed818bfaf1de8d0f3b8952716e7668a84a Mon Sep 17 00:00:00 2001 From: nevart Date: Tue, 21 May 2024 18:19:04 +0000 Subject: [PATCH 2/3] schleuder-web: ensure correct permissions Otherwise, bundle invocations might fail due to permission errors. --- tasks/schleuder_web.yml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/tasks/schleuder_web.yml b/tasks/schleuder_web.yml index aaeedbc..d7a84d8 100644 --- a/tasks/schleuder_web.yml +++ b/tasks/schleuder_web.yml @@ -116,6 +116,13 @@ ansible_ssh_pipelining: True when: __schleuder_repo_clone.changed # noqa: no-handler +- name: Ensure correct permissions + ansible.builtin.file: + group: "{{ schleuder_schleuder_web_user }}" + path: "{{ schleuder_schleuder_web_path }}" + recurse: true + owner: "{{ schleuder_schleuder_web_user }}" + - name: Set bundle global config options ansible.builtin.command: "/usr/local/bin/bundle config set --global {{ item }}" changed_when: false From 19fe80a81654447887cfd630b3f256636663c84b Mon Sep 17 00:00:00 2001 From: nevart Date: Tue, 21 May 2024 18:27:09 +0000 Subject: [PATCH 3/3] schleuder-web: bundle: ensure to install gems Before, due to the 'when' condition, gems have not been installed correctly which would have lead to errors further on, if bundle was invoked. --- tasks/schleuder_web.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/tasks/schleuder_web.yml b/tasks/schleuder_web.yml index d7a84d8..8a18c59 100644 --- a/tasks/schleuder_web.yml +++ b/tasks/schleuder_web.yml @@ -137,7 +137,7 @@ with_items: - "path {{ schleuder_schleuder_web_home }}/.gem" -- name: Install bundle (when repo changed) +- name: Install bundle ansible.builtin.command: "/usr/local/bin/bundle install" changed_when: false check_mode: no @@ -147,7 +147,6 @@ become_user: "{{ schleuder_schleuder_web_user }}" vars: ansible_ssh_pipelining: True - when: __schleuder_repo_clone.changed # noqa: no-handler - name: Check if schleuder-web systemd unit already exists ansible.builtin.stat: