https://github.com/coopdevs/somoffice_role
An Ansible role to deploy SomOffice
https://github.com/coopdevs/somoffice_role
ansible-role
Last synced: 11 months ago
JSON representation
An Ansible role to deploy SomOffice
- Host: GitHub
- URL: https://github.com/coopdevs/somoffice_role
- Owner: coopdevs
- License: agpl-3.0
- Created: 2023-02-27T08:59:13.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2023-09-07T12:00:43.000Z (almost 3 years ago)
- Last Synced: 2025-07-10T09:18:26.012Z (12 months ago)
- Topics: ansible-role
- Language: Jinja
- Homepage: https://galaxy.ansible.com/coopdevs/somoffice_role
- Size: 36.1 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
Awesome Lists containing this project
README
SomOffice role
=========
A role to deploy [SomOffice](https://git.coopdevs.org/coopdevs/comunitats-energetiques/somoffice/).
This role will:
- Ensure you have all the dependencies installed in your machine.
- Download the repository to a temp local directory.
- Install the app's dependencies.
- Render the `.env` file.
- Build the app.
- Ensure you have all the dependencies installed in the development environment.
- Deploy the app using capistrano strategy.
- Delete local temporary files.
Requirements
------------
Hard dependencies are declared in `somoffice_role_hard_deps` var (see `vars/main.yml`).
They are checked by main task prior to role execution.
Dependencies
-------------
- [ansistrano.deploy](https://github.com/ansistrano/deploy)
Role Variables
--------------
```yaml
somoffice_role_backoffice_version: "main"
somoffice_role_backoffice_repo: "https://git.coopdevs.org/coopdevs/comunitats-energetiques/somoffice/back-office"
somoffice_role_local_path: "./build/backoffice"
somoffice_remote_base_path: "/opt/somoffice"
# .env file variables
somoffice_role_env_host: "https://example.coop"
somoffice_role_env_keycloak: "https://example.coop/auth"
somoffice_role_env_kc_realm: "somoffice"
somoffice_role_env_kc_client: "client id"
```
Example Playbook
----------------
You can test this role creating a local development environment with `devenv` command. This will call [`devenv`](https://github.com/coopdevs/devenv) with the [`.devenv`](.devenv) file as configuration. `devenv` will create a LXC virtual environment.
```bash
devenv
```
Then, you can run the playbook & inventory residing in the `tests` directory:
```bash
ansible-playbook tests/test.yml --extra-vars="@defaults/main.yml" --extra-vars="@vars/main.yml" -i tests/inventory
```
License
-------
GPLv3
Author Information
------------------
[Coopdevs](https://coopdevs.org)