mirror of
https://github.com/roles-ansible/ansible_role_gitea.git
synced 2024-08-16 11:39:50 +02:00
Merge pull request #120 from roles-ansible/cln
cleanup variable name and values
This commit is contained in:
commit
20d8a17f84
5 changed files with 40 additions and 22 deletions
10
README.md
10
README.md
|
@ -221,6 +221,16 @@ Either you define exactly which release you install. Or you use the option ``lat
|
||||||
| `gitea_only_allow_external_registration` | `false` | Set to true to force registration only using third-party services (true/false) |
|
| `gitea_only_allow_external_registration` | `false` | Set to true to force registration only using third-party services (true/false) |
|
||||||
| `gitea_enable_notify_mail` | `false` | Enable this to send e-mail to watchers of a repository when something happens, like creating issues (true/false) |
|
| `gitea_enable_notify_mail` | `false` | Enable this to send e-mail to watchers of a repository when something happens, like creating issues (true/false) |
|
||||||
| `gitea_auto_watch_new_repos` | `true` | Enable this to let all organisation users watch new repos when they are created (true/false) |
|
| `gitea_auto_watch_new_repos` | `true` | Enable this to let all organisation users watch new repos when they are created (true/false) |
|
||||||
|
| `gitea_autowatch_on_change` | `true` | Enable this to make users watch a repository after their first commit to it (true/false) |
|
||||||
|
| `gitea_register_manual_confirm` | `false` | Enable this to manually confirm new registrations. Requires REGISTER_EMAIL_CONFIRM to be disabled. |
|
||||||
|
| `gitea_default_allow_create_organization` | `true` | Allow new users to create organizations by default (true/false) |
|
||||||
|
| `gitea_email_domain_allowlist` | | If non-empty, comma separated list of domain names that can only be used to register on this instance, wildcard is supported. |
|
||||||
|
| `gitea_default_user_visibility` | `public` | Set default visibility mode for users, either "public", "limited" or "private". |
|
||||||
|
| `gitea_default_org_visibility` | `public` | Set default visibility mode for organisations, either "public", "limited" or "private". |
|
||||||
|
| `gitea_allow_only_internal_registration` | `false` | Set to true to force registration only via Gitea. |
|
||||||
|
| `gitea_allow_only_external_registration` | `false` | Set to true to force registration only using third-party services. |
|
||||||
|
| `gitea_show_milestones_dashboard_page` | `true` | Enable this to show the milestones dashboard page - a view of all the user's milestones |
|
||||||
|
| `gitea_default_user_is_restricted` | `false` | Give new users restricted permissions by default (true/false) |
|
||||||
| `gitea_service_extra_config` | | you can use this variable to pass additional config parameters in the `[service]` section of the config. |
|
| `gitea_service_extra_config` | | you can use this variable to pass additional config parameters in the `[service]` section of the config. |
|
||||||
|
|
||||||
### Mailer ([mailer](https://docs.gitea.io/en-us/config-cheat-sheet/#mailer-mailer))
|
### Mailer ([mailer](https://docs.gitea.io/en-us/config-cheat-sheet/#mailer-mailer))
|
||||||
|
|
|
@ -156,25 +156,24 @@ gitea_security_extra_config: ''
|
||||||
# -> https://docs.gitea.io/en-us/config-cheat-sheet/#service-service
|
# -> https://docs.gitea.io/en-us/config-cheat-sheet/#service-service
|
||||||
gitea_disable_registration: false
|
gitea_disable_registration: false
|
||||||
gitea_register_email_confirm: false
|
gitea_register_email_confirm: false
|
||||||
|
gitea_register_manual_confirm: false
|
||||||
gitea_require_signin: true
|
gitea_require_signin: true
|
||||||
gitea_default_keep_mail_private: true
|
gitea_default_keep_mail_private: true
|
||||||
gitea_enable_captcha: true
|
gitea_enable_captcha: true
|
||||||
gitea_show_registration_button: true
|
gitea_show_registration_button: true
|
||||||
gitea_only_allow_external_registration: false
|
gitea_only_allow_external_registration: false
|
||||||
gitea_enable_notify_mail: false
|
gitea_enable_notify_mail: false
|
||||||
gitea_service_extra_config: ''
|
gitea_auto_watch_new_repos: true
|
||||||
gitea_auto_watch_new_repos: false
|
gitea_autowatch_on_change: false
|
||||||
gitea_autowatch_on_change: true
|
|
||||||
# make sure, that register_email_confirm is false when register_manual_confirm is set to true
|
|
||||||
gitea_register_manual_confirm: true
|
|
||||||
gitea_default_allow_create_organization: false
|
gitea_default_allow_create_organization: false
|
||||||
gitea_default_user_is_restricted: true
|
gitea_default_user_is_restricted: false
|
||||||
gitea_email_domain_allowlist: ""
|
gitea_email_domain_allowlist: ""
|
||||||
gitea_default_user_visibility: limited
|
gitea_default_user_visibility: public
|
||||||
gitea_default_org_visibility: limited
|
gitea_default_org_visibility: public
|
||||||
gitea_allow_only_internal_registration: true
|
gitea_allow_only_internal_registration: false
|
||||||
gitea_show_mailstones_dashboard: true
|
gitea_allow_only_external_registration: false
|
||||||
# gitea_email_domain_allowlist: ""
|
gitea_show_milestones_dashboard_page: true
|
||||||
|
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
|
||||||
|
|
|
@ -1,4 +1,12 @@
|
||||||
---
|
---
|
||||||
|
- name: Make sure gitea_register_email_confirm is false when gitea_register_manual_confirm is true
|
||||||
|
ansible.builtin.fail:
|
||||||
|
msg: |
|
||||||
|
To manually confirm registrations,
|
||||||
|
gitea_register_email_confirm needs to be false
|
||||||
|
and gitea_register_manual_confirm should be true.
|
||||||
|
when: gitea_register_manual_confirm | bool and gitea_register_email_confirm | bool
|
||||||
|
|
||||||
- name: "Configure gitea"
|
- name: "Configure gitea"
|
||||||
become: true
|
become: true
|
||||||
ansible.builtin.template:
|
ansible.builtin.template:
|
||||||
|
|
|
@ -175,17 +175,18 @@ DEFAULT_KEEP_EMAIL_PRIVATE = {{ gitea_default_keep_mail_private | ternary('true'
|
||||||
SHOW_REGISTRATION_BUTTON = {{ gitea_show_registration_button | ternary('true', 'false') }}
|
SHOW_REGISTRATION_BUTTON = {{ gitea_show_registration_button | 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') }}
|
||||||
ALLOW_ONLY_EXTERNAL_REGISTRATION = {{ gitea_only_allow_external_registration | ternary('true', 'false') }}
|
ALLOW_ONLY_EXTERNAL_REGISTRATION = {{ gitea_only_allow_external_registration | ternary('true', 'false') }}
|
||||||
AUTO_WATCH_ON_CHANGES = {{ gitea_autowatch_on_change }}
|
AUTO_WATCH_ON_CHANGES = {{ gitea_autowatch_on_change | ternary('true', 'false') }}
|
||||||
SHOW_MILESTONES_DASHBOARD_PAGE = {{ gitea_show_mailstones_dashboard }}
|
SHOW_MILESTONES_DASHBOARD_PAGE = {{ gitea_show_milestones_dashboard_page | ternary('true', 'false') }}
|
||||||
REGISTER_MANUAL_CONFIRM = {{ gitea_register_manual_confirm }}
|
REGISTER_MANUAL_CONFIRM = {{ gitea_register_manual_confirm | ternary('true', 'false') }}
|
||||||
DEFAULT_ALLOW_CREATE_ORGANIZATION = {{ gitea_default_allow_create_organization }}
|
DEFAULT_ALLOW_CREATE_ORGANIZATION = {{ gitea_default_allow_create_organization | ternary('true', 'false') }}
|
||||||
DEFAULT_USER_IS_RESTRICTED = {{ gitea_default_user_is_restricted }}
|
DEFAULT_USER_IS_RESTRICTED = {{ gitea_default_user_is_restricted | ternary('true', 'false') }}
|
||||||
{% if gitea_email_domain_allowlist is defined and gitea_email_domain_allowlist|length %}
|
{% if gitea_email_domain_allowlist is defined and gitea_email_domain_allowlist | length %}
|
||||||
EMAIL_DOMAIN_ALLOWLIST = {{ gitea_email_domain_allowlist }}
|
EMAIL_DOMAIN_ALLOWLIST = {{ gitea_email_domain_allowlist }}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
DEFAULT_USER_VISIBILITY = {{ gitea_default_user_visibility }}
|
DEFAULT_USER_VISIBILITY = {{ gitea_default_user_visibility | ternary('true', 'false') }}
|
||||||
DEFAULT_ORG_VISIBILITY = {{ gitea_default_org_visibility }}
|
DEFAULT_ORG_VISIBILITY = {{ gitea_default_org_visibility | ternary('true', 'false') }}
|
||||||
ALLOW_ONLY_INTERNAL_REGISTRATION = {{ gitea_allow_only_internal_registration }}
|
ALLOW_ONLY_INTERNAL_REGISTRATION = {{ gitea_allow_only_internal_registration | ternary('true', 'false') }}
|
||||||
|
ALLOW_ONLY_EXTERNAL_REGISTRATION = {{ gitea_allow_only_external_registration | ternary('true', 'false') }}
|
||||||
{{ gitea_service_extra_config }}
|
{{ gitea_service_extra_config }}
|
||||||
;
|
;
|
||||||
;
|
;
|
||||||
|
|
|
@ -62,5 +62,5 @@ transfer_custom_footer:
|
||||||
- 'files/gitea_footer/extra_links_footer.tmpl'
|
- 'files/gitea_footer/extra_links_footer.tmpl'
|
||||||
- 'files/extra_links_footer.tmpl'
|
- 'files/extra_links_footer.tmpl'
|
||||||
|
|
||||||
playbook_version_number: 49 # should be int
|
playbook_version_number: 50 # should be int
|
||||||
playbook_version_path: 'do1jlr.gitea.version'
|
playbook_version_path: 'do1jlr.gitea.version'
|
||||||
|
|
Loading…
Reference in a new issue