6.3. Contributing

Contributing to this project is more than welcome!

Issues can be opened on Codeberg:

https://codeberg.org/gnuhealth/ansible/issues

For discussions you can join the chat or mailing lists of GNU Health:

https://docs.gnuhealth.org/his/support.html

Feel free to also open Pull Requests or ask for membership to open another developing branch.

6.3.1. Maintenance

You can find the different BASH and Molecule tests in the tests folder. Best is to run the BASH tests locally before any commit:

$ bash tests/run_bash.sh

If a config template is out of date you have to update it:

  • Get a diff of changes to .j2 file:

$ diff roles/<rolename>/templates/<configfile>.stock <configfile>.j2
  • Get the new config file (see tests/config_stock/check_config_stock.sh)

  • Use it to overwrite .stock and .j2 files

  • Apply previous changes to .j2 file

Molecule tests are more and more supersized for laptops - thus a dedicated test server is set up to run them periodically and before merges.

Before any merge into the main branch the following has to be updated and checked as well:

  • VERSION in top level directory

  • CHANGELOG in top level directory

  • version variable in docs/source/conf.py

  • Roadmap in the documentation

  • Build version of the documentation

6.3.2. Modularity

If you want to add a new service there are multiple things you need to add:

  • A new role for the service in the roles folder. This should handle most of the installation and setup of the new application

  • A new playbook in the playbooks folder, that uses your new role and, if needed, also other existing roles (e.g. to setup a PostgreSQL server)

  • A new inventory in the inventories/dev/group_vars folder, which sets the parameters of your new role and other used roles to the wanted values

If you intent to add the new service to the repository you also need to:

  • Update the tests to contain the new service

  • Update the documentation: Add at least subsections to the roles and playbooks chapters