diff --git a/README.md b/README.md index 0cb20d5..ed2ee58 100644 --- a/README.md +++ b/README.md @@ -162,6 +162,10 @@ As this will only deploy config files, fail2ban already has to be installed or o * `gitea_repo_exclude_vendored`: Exclude vendored files from the index. Default: `true` * `gitea_repo_indexer_max_file_size`: Maximum size of files to be indexed (in bytes). Default: `1048576` (1 MB) +### backup on upgrade +* `gitea_backup_on_upgrade`: Optionally a backup can be created with every update of gitea. Default: `false` +* `gitea_backup_location`: Where to store the gitea backup if one is created with this role. Default: `{{ gitea_home }}/backups/` + ## 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 7f2baba..b8ec61b 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -87,4 +87,5 @@ gitea_repo_indexer_max_file_size: 1048576 gitea_extra_config: "" +gitea_backup_on_upgrade: false gitea_backup_location: "{{ gitea_home }}/backups/" diff --git a/tasks/main.yml b/tasks/main.yml index f687d9f..dfb5a58 100644 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -19,6 +19,7 @@ - name: backup gitea before update include_tasks: backup.yml + when: gitea_backup_on_upgrade|bool - name: install or update gitea include_tasks: install.yml