diff --git a/CHANGELOG.md b/CHANGELOG.md index a4e3b80..7699078 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,14 @@ All changes that impact users of this module are documented in this file, in the [Common Changelog](https://common-changelog.org) format with some additional specifications defined in the CONTRIBUTING file. This codebase adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## Unreleased [minor] + +> Development of this release was supported by [Reset Tech](https://www.reset.tech). + +### Changed + +- Make nginx role usable outside this collection + ## 3.0.1 - 2026-02-05 _Full changeset and discussions: [#63](https://github.com/OpenTermsArchive/deployment/pull/63)._ diff --git a/playbooks/deploy.yml b/playbooks/deploy.yml index f32b6fa..e984f44 100644 --- a/playbooks/deploy.yml +++ b/playbooks/deploy.yml @@ -237,6 +237,3 @@ vars: ota_nginx_app_id: "{{ ota_app_collection_id }}" ota_nginx_endpoints: "{{ ota_app_endpoints }}" - ota_nginx_config_template: ./templates/nginx.conf.j2 - ota_nginx_reverse_proxy_config_template: ./templates/nginx-reverse-proxy-conf.j2 - ota_nginx_server_config_template: ./templates/nginx-server.conf.j2 diff --git a/roles/nginx/configure/defaults/main.yml b/roles/nginx/configure/defaults/main.yml new file mode 100644 index 0000000..6366b60 --- /dev/null +++ b/roles/nginx/configure/defaults/main.yml @@ -0,0 +1,4 @@ +--- +ota_nginx_config_template: nginx.conf.j2 +ota_nginx_reverse_proxy_config_template: nginx-reverse-proxy-conf.j2 +ota_nginx_server_config_template: nginx-server.conf.j2 diff --git a/roles/nginx/configure/tasks/main.yml b/roles/nginx/configure/tasks/main.yml index 8c8b368..ba2589b 100644 --- a/roles/nginx/configure/tasks/main.yml +++ b/roles/nginx/configure/tasks/main.yml @@ -14,7 +14,7 @@ - name: Add global OTA config ansible.builtin.template: - src: ./templates/nginx-global.conf.j2 + src: nginx-global.conf.j2 dest: /etc/nginx/conf.d/ota-global.conf owner: root group: root diff --git a/playbooks/templates/nginx-global.conf.j2 b/roles/nginx/configure/templates/nginx-global.conf.j2 similarity index 100% rename from playbooks/templates/nginx-global.conf.j2 rename to roles/nginx/configure/templates/nginx-global.conf.j2 diff --git a/playbooks/templates/nginx-reverse-proxy-conf.j2 b/roles/nginx/configure/templates/nginx-reverse-proxy-conf.j2 similarity index 100% rename from playbooks/templates/nginx-reverse-proxy-conf.j2 rename to roles/nginx/configure/templates/nginx-reverse-proxy-conf.j2 diff --git a/playbooks/templates/nginx-server.conf.j2 b/roles/nginx/configure/templates/nginx-server.conf.j2 similarity index 100% rename from playbooks/templates/nginx-server.conf.j2 rename to roles/nginx/configure/templates/nginx-server.conf.j2 diff --git a/playbooks/templates/nginx.conf.j2 b/roles/nginx/configure/templates/nginx.conf.j2 similarity index 100% rename from playbooks/templates/nginx.conf.j2 rename to roles/nginx/configure/templates/nginx.conf.j2