diff --git a/README.md b/README.md index 98dd876..74c5933 100644 --- a/README.md +++ b/README.md @@ -127,6 +127,11 @@ As this will only deploy config files, fail2ban already has to be installed or o * `gitea_oauth2_enabled`: Enable the Oauth2 provider (true/false) * `gitea_oauth2_jwt_secret`: JWT secret +### Metrics endpoint configuration + +* `gitea_metrics_enabled`: Enable the metrics endpoint +* `gitea_metrics_token`: Bearer token for the Prometheus scrape job + ## Contributing Don't hesitate to create a pull request, and when in doubt you can reach me on Twitter [@thomas_maurice](https://twitter.com/thomas_maurice). diff --git a/defaults/main.yml b/defaults/main.yml index c28fa99..8a3d013 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -61,3 +61,6 @@ gitea_fail2ban_jail_action: iptables-allports gitea_oauth2_enabled: true gitea_oauth2_jwt_secret: ChangeMe + +gitea_metrics_enabled: false +gitea_metrics_token: ~ diff --git a/templates/gitea.ini.j2 b/templates/gitea.ini.j2 index 78fb423..a57d626 100644 --- a/templates/gitea.ini.j2 +++ b/templates/gitea.ini.j2 @@ -181,3 +181,7 @@ REDIRECT_MACARON_LOG = false ENABLE = {{ gitea_oauth2_enabled }} JWT_SECRET = {{ gitea_oauth2_jwt_secret }} +[metrics] +ENABLED = {{ gitea_metrics_enabled }} +TOKEN = {{ gitea_metrics_token }} +