1
1
Fork 0
mirror of https://github.com/roles-ansible/ansible_role_gitea.git synced 2024-08-16 11:39:50 +02:00

BREAKING Mail variables updated

Updated variables for sending mail. This changed between gitea 1.17 and 1.18.
This commit is contained in:
L3D 2023-01-26 01:57:07 +01:00
parent bab3431724
commit b81a2d8dff
Signed by: l3d
GPG key ID: CD08445BFF4313D1
3 changed files with 52 additions and 30 deletions

View file

@ -183,8 +183,9 @@ Either you define exactly which release you install. Or you use the option ``lat
| variable name | default value | description | | variable name | default value | description |
| ------------- | ------------- | ----------- | | ------------- | ------------- | ----------- |
| `gitea_secret_key` | `''` | Global secret key. Will be autogenerated if not defined. Should be unique. | | `gitea_secret_key` | `''` | Global secret key. Will be autogenerated if not defined. Should be unique. |
| `gitea_internal_token` | `''` | Internal API token. Will be autogenerated if not defined. Should be unique. |
| `gitea_disable_git_hooks` | `true` | Set to false to enable users with git hook privilege to create custom git hooks. Can be dangerous. | | `gitea_disable_git_hooks` | `true` | Set to false to enable users with git hook privilege to create custom git hooks. Can be dangerous. |
| `gitea_disable_webhooks` | `false` | Set to true to disable webhooks feature. |
| `gitea_internal_token` | `''` | Internal API token. Will be autogenerated if not defined. Should be unique. |
| `gitea_password_check_pwn` | `false` | Check [HaveIBeenPwned](https://haveibeenpwned.com/Passwords) to see if a password has been exposed. | | `gitea_password_check_pwn` | `false` | Check [HaveIBeenPwned](https://haveibeenpwned.com/Passwords) to see if a password has been exposed. |
| `gitea_security_extra_config` | `''` | you can use this variable to pass additional config parameters in the `[security]` section of the config. | | `gitea_security_extra_config` | `''` | you can use this variable to pass additional config parameters in the `[security]` section of the config. |
@ -206,15 +207,20 @@ Either you define exactly which release you install. Or you use the option ``lat
| variable name | default value | description | | variable name | default value | description |
| ------------- | ------------- | ----------- | | ------------- | ------------- | ----------- |
| `gitea_mailer_enabled` | `false` | Whether to enable the mailer. | | `gitea_mailer_enabled` | `false` | Whether to enable the mailer. |
| `gitea_mailer_host` | `localhost:25` | SMTP server hostname and port | | `gitea_mailer_protocol` | `dummy` |Mail server protocol. One of “smtp”, “smtps”, “smtp+starttls”, “smtp+unix”, “sendmail”, “dummy”.|
| `gitea_mailer_skip_verify` | `false` | Skip SMTP TLS certificate verification (true/false) | | `gitea_mailer_smtp_addr` | | Mail server address. e.g. smtp.gmail.com. For smtp+unix, this should be a path to a unix socket instead. |
| `gitea_mailer_tls_enabled` | `true` | Forcibly use TLS to connect even if not on a default SMTPS port. | | `gitea_mailer_smtp_port` | | Mail server port |
| `gitea_mailer_from` | `noreply@{{ gitea_http_domain }}` | Mail from address, RFC 5322. This can be just an email address, or the “Name” <email@example.com> format. | | `gitea_mailer_use_client_cert` | `false` | Use client certificate for TLS/SSL. |
| `gitea_mailer_user` | `''` | Username of mailing user *(usually the senders e-mail address)*. | | `gitea_mailer_client_cert_file` | | Client certificate file. |
| `gitea_mailer_password` | `''` | SMTP server password | | `gitea_mailer_client_key_file` | | Client key file. |
| `gitea_subject_prefix` | `''` | Prefix to be placed before e-mail subject lines | | `gitea_mailer_force_trust_server_cert` | `false` | completely ignores server certificate validation errors. This option is unsafe. Consider adding the certificate to the system trust store instead. |
| `gitea_mailer_type` | `smtp` | `[smtp, sendmail, dummy]` | | `gitea_mailer_user` | | Username of mailing user (usually the senders e-mail address). |
| `gitea_mailer_extra_config` | `''` | you can use this variable to pass additional config parameters in the `[mailer]` section of the config. | | `gitea_mailer_password ` | |Password of mailing user. Use `your password` for quoting if you use special characters in the password. |
| `gitea_mailer_enable_helo` | `true` |Enable HELO operation. |
| `gitea_mailer_from` | `noreply@{{ gitea_http_domain }}` | Mail from address, RFC 5322. |
| `gitea_subject_prefix` | |Prefix to be placed before e-mail subject lines. |
| `gitea_mailer_send_as_plaintext` | `false` | Send mails only in plain text, without HTML alternative. |
| `gitea_mailer_extra_config` | | you can use this variable to pass additional config parameters in the `[mailer]` section of the config. |
### Session ([session](https://docs.gitea.io/en-us/config-cheat-sheet/#session-session)) ### Session ([session](https://docs.gitea.io/en-us/config-cheat-sheet/#session-session))
| variable name | default value | description | | variable name | default value | description |

View file

@ -135,8 +135,9 @@ gitea_queue_issue_indexer_extra_config: ''
# Security (security) # Security (security)
# -> https://docs.gitea.io/en-us/config-cheat-sheet/#security-security # -> https://docs.gitea.io/en-us/config-cheat-sheet/#security-security
gitea_secret_key: '' gitea_secret_key: ''
gitea_internal_token: ''
gitea_disable_git_hooks: true gitea_disable_git_hooks: true
gitea_disable_webhooks: false
gitea_internal_token: ''
gitea_password_check_pwn: false gitea_password_check_pwn: false
gitea_security_extra_config: '' gitea_security_extra_config: ''
@ -156,14 +157,19 @@ gitea_service_extra_config: ''
# Mailer [mailer] # Mailer [mailer]
# -> https://docs.gitea.io/en-us/config-cheat-sheet/#mailer-mailer # -> https://docs.gitea.io/en-us/config-cheat-sheet/#mailer-mailer
gitea_mailer_enabled: false gitea_mailer_enabled: false
gitea_mailer_host: 'localhost:25' gitea_mailer_protocol: 'dummy'
gitea_mailer_skip_verify: false gitea_mailer_smtp_addr: ''
gitea_mailer_tls_enabled: true gitea_mailer_smtp_port: ''
gitea_mailer_from: "noreply@{{ gitea_http_domain }}" gitea_mailer_use_client_cert: false
gitea_mailer_client_cert_file: ''
gitea_mailer_client_key_file: ''
gitea_mailer_force_trust_server_cert: false
gitea_mailer_user: '' gitea_mailer_user: ''
gitea_mailer_password: '' gitea_mailer_password: ''
gitea_mailer_enable_helo: true
gitea_mailer_from: "noreply@{{ gitea_http_domain }}"
gitea_subject_prefix: '' gitea_subject_prefix: ''
gitea_mailer_type: smtp gitea_mailer_send_as_plaintext: false
gitea_mailer_extra_config: '' gitea_mailer_extra_config: ''
# Session (session) # Session (session)

View file

@ -147,10 +147,11 @@ DATADIR = {{ gitea_home }}/indexers/issues.queue
[security] [security]
INSTALL_LOCK = true INSTALL_LOCK = true
SECRET_KEY = {{ gitea_secret_key }} SECRET_KEY = {{ gitea_secret_key }}
INTERNAL_TOKEN = {{ gitea_internal_token }}
DISABLE_GIT_HOOKS = {{ gitea_disable_git_hooks | ternary('true', 'false') }} DISABLE_GIT_HOOKS = {{ gitea_disable_git_hooks | ternary('true', 'false') }}
DISABLE_WEBHOOKS = { gitea_disable_webhooks | ternary('true', 'false') }
INTERNAL_TOKEN = {{ gitea_internal_token }}
PASSWORD_CHECK_PWN = {{ gitea_password_check_pwn | ternary('true', 'false') }} PASSWORD_CHECK_PWN = {{ gitea_password_check_pwn | ternary('true', 'false') }}
{{ gitea_security_extra_config }} {% if gitea_security_extra_config != '' %}{{ gitea_security_extra_config }}{% else %};{% endif %}
; ;
; ;
; -> https://docs.gitea.io/en-us/config-cheat-sheet/#service-service ; -> https://docs.gitea.io/en-us/config-cheat-sheet/#service-service
@ -164,28 +165,37 @@ SHOW_REGISTRATION_BUTTON = {{ gitea_show_registration_button | ternary(
ALLOW_ONLY_EXTERNAL_REGISTRATION = {{ gitea_only_allow_external_registration | ternary('true', 'false') }} ALLOW_ONLY_EXTERNAL_REGISTRATION = {{ gitea_only_allow_external_registration | ternary('true', 'false') }}
ENABLE_NOTIFY_MAIL = {{ gitea_enable_notify_mail | ternary('true', 'false') }} ENABLE_NOTIFY_MAIL = {{ gitea_enable_notify_mail | ternary('true', 'false') }}
AUTO_WATCH_NEW_REPOS = {{ gitea_auto_watch_new_repos | ternary('true', 'false') }} AUTO_WATCH_NEW_REPOS = {{ gitea_auto_watch_new_repos | ternary('true', 'false') }}
{{ gitea_service_extra_config }} {% if gitea_service_extra_config != '' %}{{ gitea_service_extra_config }}{% else %};{% endif %}
; ;
; ;
; -> https://docs.gitea.io/en-us/config-cheat-sheet/#mailer-mailer ; -> https://docs.gitea.io/en-us/config-cheat-sheet/#mailer-mailer
[mailer] [mailer]
ENABLED = {{ gitea_mailer_enabled | ternary('true', 'false') }} ENABLED = {{ gitea_mailer_enabled | ternary('true', 'false') }}
HOST = {{ gitea_mailer_host }} {%- if gitea_mailer_enabled | bool %}
SKIP_VERIFY = {{ gitea_mailer_skip_verify | ternary('true', 'false') }} PROTOCOL = {{ gitea_mailer_protocol }}
IS_TLS_ENABLED = {{ gitea_mailer_tls_enabled | ternary('true', 'false') }} SMTP_ADDR = {{ gitea_mailer_smtp_addr }}
FROM = {{ gitea_mailer_from }} SMTP_PORT = {{ gitea_mailer_smtp_port }}
USE_CLIENT_CERT = {{ gitea_mailer_use_client_cert | ternary('true', 'false') }}
{%- if gitea_mailer_use_client_cert | bool %}
CLIENT_CERT_FILE = {{ gitea_mailer_client_cert_file }}
CLIENT_KEY_FILE = {{ gitea_mailer_client_key_file }}
{%- endif %}
FORCE_TRUST_SERVER_CERT = {{ gitea_mailer_force_trust_server_cert | ternary('true', 'false') }}
USER = {{ gitea_mailer_user }} USER = {{ gitea_mailer_user }}
PASSWD = `{{ gitea_mailer_password }}` PASSWD = `{{ gitea_mailer_password }}`
ENABLE_HELO = {{ gitea_mailer_enable_helo | ternary('true', 'false') }}
FROM = {{ gitea_mailer_from }}
SUBJECT_PREFIX = {{ gitea_subject_prefix }} SUBJECT_PREFIX = {{ gitea_subject_prefix }}
MAILER_TYPE = {{ gitea_mailer_type }} SEND_AS_PLAIN_TEXT = {{ gitea_mailer_send_as_plaintext | ternary('true', 'false') }}
{{ gitea_mailer_extra_config }} {% if gitea_mailer_extra_config != '' %}{{ gitea_mailer_extra_config }}{% else %};{% endif %}
{%- endif %}
; ;
; ;
; -> https://docs.gitea.io/en-us/config-cheat-sheet/#session-session ; -> https://docs.gitea.io/en-us/config-cheat-sheet/#session-session
[session] [session]
PROVIDER = {{ gitea_session_provider }} PROVIDER = {{ gitea_session_provider }}
PROVIDER_CONFIG = {{ gitea_home }}/data/sessions PROVIDER_CONFIG = {{ gitea_home }}/data/sessions
{{ gitea_session_extra_config }} {% if gitea_session_extra_config != '' %}{{ gitea_session_extra_config }}{% else %};{% endif %}
; ;
; ;
; -> https://docs.gitea.io/en-us/config-cheat-sheet/#picture-picture ; -> https://docs.gitea.io/en-us/config-cheat-sheet/#picture-picture