From c96f2c48b51ac42e523fa114bae13e30975b4336 Mon Sep 17 00:00:00 2001 From: Timotej Lazar Date: Thu, 20 Jun 2024 19:43:35 +0200 Subject: [PATCH] forgejo: enable auto registration for oauth2 --- roles/forgejo/tasks/main.yml | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/roles/forgejo/tasks/main.yml b/roles/forgejo/tasks/main.yml index 6c89616..07ae86e 100644 --- a/roles/forgejo/tasks/main.yml +++ b/roles/forgejo/tasks/main.yml @@ -26,25 +26,26 @@ value: '{{ item.value }}' loop: - { option: APP_NAME, value: 'FRI git' } - - { section: security, option: INSTALL_LOCK, value: true } - - { section: cron.update_checker, option: ENABLED, value: false } + - { section: oauth2_client, option: ENABLE_AUTO_REGISTRATION, value: true } + - { section: oauth2_client, option: USERNAME, value: email } + - { section: service, option: ALLOW_ONLY_EXTERNAL_REGISTRATION, value: true } + - { section: service, option: DEFAULT_USER_VISIBILITY, value: private } + - { section: service.explore, option: DEFAULT_USERS_PAGE, value: private } - { section: database, option: SQLITE_JOURNAL_MODE, value: WAL } - - { section: lfs, option: PATH, value: /var/lib/forgejo/data/lfs } - { section: log, option: ROOT_PATH, value: /var/lib/forgejo/log } - { section: server, option: PROTOCOL, value: http+unix } - { section: server, option: HTTP_ADDR, value: socket } - { section: server, option: UNIX_SOCKET_PERMISSION, value: 660 } - - { section: server, option: ROOT_URL, value: 'https://{{ dns_name }}/' } - { section: server, option: LFS_START_SERVER, value: true } - - { section: service, option: ALLOW_ONLY_EXTERNAL_REGISTRATION, value: true } - - { section: service, option: DEFAULT_USER_VISIBILITY, value: private } - - { section: service.explore, option: DEFAULT_USERS_PAGE, value: private } + - { section: lfs, option: PATH, value: /var/lib/forgejo/data/lfs } - { section: repository, option: DEFAULT_BRANCH, value: master } - { section: repository, option: ENABLE_PUSH_CREATE_ORG, value: true } - { section: repository, option: ENABLE_PUSH_CREATE_USER, value: true } - { section: ui, option: AMBIGUOUS_UNICODE_DETECTION, value: false } - { section: other, option: SHOW_FOOTER_VERSION, value: false } - { section: other, option: SHOW_FOOTER_TEMPLATE_LOAD_TIME, value: false } + - { section: cron.update_checker, option: ENABLED, value: false } + - { section: security, option: INSTALL_LOCK, value: true } notify: restart forgejo - name: Enable forgejo service