Files
computer-playbook/roles/web-app-openproject/tasks/main.yml
Kevin Veen-Birkenbach ca52dcda43 Refactor OpenProject role:
- Add CPU, memory and PID limits to all services in config/main.yml to prevent OOM
- Replace old LDAP admin bootstrap with new 02_admin.yml using OPENPROJECT_ADMINISTRATOR_* vars
- Standardize variable names (uppercase convention)
- Fix HTTPS/HSTS port check (443 instead of 433)
- Allow docker_restart_policy override in base.yml.j2
- Cleanup redundant LDAP admin runner in 01_ldap.yml
See: https://chatgpt.com/share/68d40c6e-ab9c-800f-a4a0-d9338d8c1b32
2025-09-24 17:22:47 +02:00

45 lines
1.3 KiB
YAML

---
- name: "load docker, db and proxy for {{ application_id }}"
include_role:
name: sys-stk-full-stateful
- name: "Create {{ OPENPROJECT_PLUGINS_FOLDER }}"
file:
path: "{{ OPENPROJECT_PLUGINS_FOLDER }}"
state: directory
mode: '0755'
- name: "Transfering Gemfile.plugins to {{ OPENPROJECT_PLUGINS_FOLDER }}"
copy:
src: Gemfile.plugins
dest: "{{ OPENPROJECT_PLUGINS_FOLDER }}Gemfile.plugins"
notify:
- docker compose up
- docker compose build
- name: "create {{ OPENPROJECT_DUMMY_VOLUME }}"
file:
path: "{{ OPENPROJECT_DUMMY_VOLUME }}"
state: directory
mode: "0755"
- name: flush docker service
meta: flush_handlers
- name: Set settings in OpenProject
shell: >
docker compose exec web bash -c "cd /app &&
RAILS_ENV={{ ENVIRONMENT | lower }} bundle exec rails runner \"Setting[:{{ item.key }}] = '{{ item.value }}'\""
args:
chdir: "{{ docker_compose.directories.instance }}"
loop: "{{ OPENPROJECT_RAILS_SETTINGS | dict2items }}"
async: "{{ ASYNC_TIME if ASYNC_ENABLED | bool else omit }}"
poll: "{{ ASYNC_POLL if ASYNC_ENABLED | bool else omit }}"
no_log: "{{ MASK_CREDENTIALS_IN_LOGS | bool }}"
- name: Setup LDAP
include_tasks: 01_ldap.yml
when: OPENPROJECT_LDAP_ENABLED | bool
- name: Create OpenProject Administrator
include_tasks: 02_admin.yml