{"id":19974591,"url":"https://github.com/elan-ev/opencast_nginx","last_synced_at":"2026-02-17T12:31:06.406Z","repository":{"id":39588179,"uuid":"381841325","full_name":"elan-ev/opencast_nginx","owner":"elan-ev","description":"Ansible role to install and prepares Nginx for Opencast","archived":false,"fork":false,"pushed_at":"2025-03-21T14:43:21.000Z","size":47,"stargazers_count":0,"open_issues_count":0,"forks_count":2,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-10-19T19:55:49.772Z","etag":null,"topics":["ansible","ansible-role","opencast"],"latest_commit_sha":null,"homepage":"","language":"Jinja","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/elan-ev.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-06-30T21:53:15.000Z","updated_at":"2025-03-21T14:39:43.000Z","dependencies_parsed_at":"2022-09-17T13:21:33.785Z","dependency_job_id":null,"html_url":"https://github.com/elan-ev/opencast_nginx","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/elan-ev/opencast_nginx","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/elan-ev%2Fopencast_nginx","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/elan-ev%2Fopencast_nginx/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/elan-ev%2Fopencast_nginx/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/elan-ev%2Fopencast_nginx/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/elan-ev","download_url":"https://codeload.github.com/elan-ev/opencast_nginx/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/elan-ev%2Fopencast_nginx/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29543903,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-17T12:21:34.159Z","status":"ssl_error","status_checked_at":"2026-02-17T12:21:02.057Z","response_time":100,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ansible","ansible-role","opencast"],"created_at":"2024-11-13T03:15:31.982Z","updated_at":"2026-02-17T12:31:06.396Z","avatar_url":"https://github.com/elan-ev.png","language":"Jinja","funding_links":[],"categories":[],"sub_categories":[],"readme":"Ansible: Opencast Nginx Role\n============================\n\n[![lint](https://github.com/elan-ev/opencast_nginx/actions/workflows/lint.yml/badge.svg?branch=main)](https://github.com/elan-ev/opencast_nginx/actions/workflows/lint.yml?branch=main)\n[![molecule](https://github.com/elan-ev/opencast_nginx/actions/workflows/molecule.yml/badge.svg?branch=main)](https://github.com/elan-ev/opencast_nginx/actions/workflows/molecule.yml?branch=main)\n\nThis Ansible role installs and prepares Nginx as reverse proxy for Opencast.\nIf no certificate is present, this role deploys a dummy certificate which allows Nginx to start up.\n\nDependencies\n------------\n\nThis role uses the [community.crypto.openssl_dhparam](https://docs.ansible.com/ansible/latest/collections/community/crypto/openssl_dhparam_module.html) module\nto generate Diffie-Hellman parameters. You therefor need to have the [community.crypto collection](https://galaxy.ansible.com/community/crypto) installed.\n\nRole Variables\n--------------\n\n- `opencast_nginx_storage_downloads_path`\n    - Path to Opencast's downloads directory (default: `/srv/opencast/downloads/`)\n- `opencast_nginx_cors_urls`\n    - List of URLs to add CORS exceptions for (default: `[]`)\n\n\nAdditional Configuration\n------------------------\n\nWhile this deploys dummy TSL certificates which allow Nginx to start up,\nmake sure to deploy proper certificates for production.\nTo do that, copy your certificates to:\n\n- `/etc/nginx/ssl/{{ inventory_hostname }}.key`\n- `/etc/nginx/ssl/{{ inventory_hostname }}.crt`\n\nIf you want to use Let's Encrypt to generate certificates, you can also include the role\n[`elan.opencast_certbot`](https://galaxy.ansible.com/elan/opencast_certbot)\nwhich will automatically generate TLS certificates for you.\n\nYou can also add some custom configuration in the file `/etc/nginx/conf.d/extra.conf`.\nThe file is included after Opencast's main `location` block.\nThe role will not modify this file if it exists.\n\nAdditionally you can define other virtual hosts in `/etc/nginx/sites-enabled/` directory.\nThey will be loaded as well.\n\n\u003e ℹ️ You may want to disable Nginx default vhost on Debian based systems by removing the\n  `/etc/nginx/sites-enabled/default` symlink.\n\n\nExample Playbook\n----------------\n\nExample of how to configure and use the role:\n\n```yaml\n- hosts: servers\n  become: true\n  roles:\n    - role: elan.opencast_nginx\n```\n\nThis will leave you with an invalid dummy certificate.\nYou will need to replace it with a valid one before booting up Opencast.\nThe role will _not_ replace an existing certificate so you can safely use a `file` task to deploy it afterwards:\n\n```yaml\n- hosts: servers\n  become: true\n  tasks:\n    - include_role:\n        name: elan.opencast_nginx\n\n    - name: install tls certificate\n      copy:\n        src: tls-{{ item }}.pem\n        dest: /etc/nginx/ssl/{{ inventory_hostname }}.{{ item }}\n        owner: root\n        group: root\n        mode: '0400'\n      notify: Reload nginx\n      loop:\n        - key\n        - crt\n```\n\nDevelopment Environment\n----------------\n\nFor linting and role development you can use the tools defined in [development requirements](.dev_requirements.txt).\nYou can quickly install them in a python virtual environment like this:\n\n```sh\n# Create a virtual environment\npython -m venv venv\n# Activate the virtual environment\n. venv/bin/activate\n# Install the dependencies\npip install -r .dev_requirements.txt\n```\n\nE.g. you can then install the ansible requirements or run the linter (`yamllint -c .yamllint . \u0026\u0026 ansible-lint`).\n\nFor development and testing you can use [molecule](https://molecule.readthedocs.io/en/latest/).\nWith podman as driver you can install it like this – preferably in a virtual environment:\n\n```bash\npip install -r .dev_requirements.txt\n```\n\nThen you can *create* the test instances, apply the ansible config (*converge*) and *destroy* the test instances with these commands:\n\n```bash\nmolecule create\nmolecule converge\nmolecule destroy\n```\n\nIf you want to inspect a running test instance use `molecule login --host \u003cinstance_name\u003e`, where you replace `\u003cinstance_name\u003e` with the desired value.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Felan-ev%2Fopencast_nginx","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Felan-ev%2Fopencast_nginx","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Felan-ev%2Fopencast_nginx/lists"}