From d136df1bacc6941334e80cc2a3e3b6f5d4a3912d Mon Sep 17 00:00:00 2001 From: JoFo <72133036+JoFo-IT@users.noreply.github.com> Date: Sun, 25 Jul 2021 00:25:12 +0200 Subject: [PATCH 1/2] Add DEFAULT_PRIVATE Fix: DEFAULT_PRIVATE #49 --> https://github.com/roles-ansible/ansible_role_gitea/issues/49#issue-952155695 --- templates/gitea.ini.j2 | 1 + 1 file changed, 1 insertion(+) diff --git a/templates/gitea.ini.j2 b/templates/gitea.ini.j2 index e07704f..b322dff 100644 --- a/templates/gitea.ini.j2 +++ b/templates/gitea.ini.j2 @@ -18,6 +18,7 @@ FORCE_PRIVATE = {{ gitea_force_private | ternary('true', 'false') }} MAX_CREATION_LIMIT = {{ gitea_user_repo_limit }} DISABLE_HTTP_GIT = {{ gitea_disable_http_git | ternary('true', 'false') }} DEFAULT_BRANCH = {{ gitea_default_branch }} +DEFAULT_PRIVATE = {{ gitea_default_private }} {{ gitea_repository_extra_config }} ; [repository.upload] From 9b5db4c896e99d9ebbed78d23473a962107a63b0 Mon Sep 17 00:00:00 2001 From: L3D Date: Sun, 25 Jul 2021 01:18:59 +0200 Subject: [PATCH 2/2] add DEFAULT_PRIVATE option and increment version --- README.md | 1 + defaults/main.yml | 1 + vars/main.yml | 2 +- 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 69488b7..7e1af2b 100644 --- a/README.md +++ b/README.md @@ -69,6 +69,7 @@ Either you define exactly which release you install. Or you use the option ``lat | `gitea_user_repo_limit` | `-1` | Limit how many repos a user can have *(`-1` for unlimited)* | | `gitea_disable_http_git` | `false` | Disable the ability to interact with repositories over the HTTP protocol. (true/false) | | `gitea_default_branch` | `main` | Default branch name of all repositories. | +| `gitea_default_private` | `last` | Default private when creating a new repository. [`last`, `private`, `public`] | | `gitea_repository_extra_config` | `''` | you can use this variable to pass additional config parameters in the `[repository]` section of the config. | | `gitea_repository_upload_extra_config` | you can use this variable to pass additional config parameters in the `[repository.upload]` section of the config. | diff --git a/defaults/main.yml b/defaults/main.yml index 9211ce1..89abc6e 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -29,6 +29,7 @@ gitea_force_private: false gitea_user_repo_limit: '-1' gitea_disable_http_git: false gitea_default_branch: 'main' +gitea_default_private: 'last' gitea_repository_extra_config: '' gitea_repository_upload_extra_config: '' diff --git a/vars/main.yml b/vars/main.yml index 199d5a3..fba7917 100644 --- a/vars/main.yml +++ b/vars/main.yml @@ -56,5 +56,5 @@ transfer_custom_footer: - 'files/gitea_footer/extra_links_footer.tmpl' - 'files/extra_links_footer.tmpl' -playbook_version_number: 23 # should be int +playbook_version_number: 24 # should be int playbook_version_path: 'do1jlr.gitea.version'