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

76 commits

Author SHA1 Message Date
pat-s
12f3c96af0
change systemd file location 2023-05-06 17:39:33 +02:00
pat-s
7e8b35642c
add gitea_gpg_keyserver_option 2023-05-06 17:29:49 +02:00
Stuart Mumford
6f47cad1cb Don't become for gpg verify 2023-04-23 16:01:03 +00:00
Jeffrey van Pelt
1ecf6d21da
Also change gpg key tasks 2023-03-20 17:35:48 +01:00
Jeffrey van Pelt
4a4f3db890
Update all tasks that download stuff to not become, this fixes some environments with http_proxies 2023-03-20 17:31:27 +01:00
L3D
1ab7e7d87f
Explain forgejo installation 2023-01-27 01:43:17 +01:00
L3D
975be7e627
Adding support for forgejo installation 2023-01-27 01:35:16 +01:00
L3D
768f1fd4ad
prepare to use forgejo fork 2023-01-26 22:35:10 +01:00
L3D
8928b243b1
solve issue with gitea gpg key and download
Change gitea gpg behaviour and change download filename
2023-01-26 14:55:13 +01:00
L3D
ff02fd69de
update gitea linting 2022-09-29 23:09:19 +02:00
Nikita Iryupin
fc9ce6073e Fix ansible-lint error 2022-08-23 10:00:10 +02:00
Nikita Iryupin
dce1b80da1 Added gitea_user_home, gitea_executable_path and gitea_configuration_path for gitea role 2022-08-22 13:33:20 +02:00
L3D
7603c93fb5
gitea_version variable is already defined
the gitea_version variable is always defined. But it can have values like 'latest'
2022-06-21 17:38:03 +02:00
L3D
db0da06c08
Fixing linting errors and increment version
Linting errors:
- Use FQCN for builtin actions.
  (fail -> ansible.builtin.fail)
- line too long (175 > 170 characters)
- trailing spaces

increment version for simple version check
2022-06-21 17:25:34 +02:00
N07070
520dbaa3c2 Add check to run task in check mod & a error message. 2022-06-21 12:14:38 +02:00
mar1ad
843da0ca2b Allow for user gitea to be added to a list of secondary groups via 'gitea_groups' 2022-06-08 15:43:29 +02:00
mar1ad
9b6de1fcdd Fix newest ansible-lint issues
* schema: 'AIX' was expected (schema[meta])

This was unclear but specifying platform version "all" as a list entry, solved it

* schema: 2.11 is not of type 'string' (schema[meta])
* schema: Additional properties are not allowed ('github_branch' was unexpected) (schema[meta])
* unnamed-task: All tasks should be named
2022-06-08 11:20:53 +02:00
L3D
129674be94
starting gitea if backup failed
Resolving https://github.com/roles-ansible/ansible_role_gitea/issues/78
2022-05-04 20:42:23 +02:00
Jens Timmerman
fba0abac30
alternative fix for #74
specify full gitea path
2022-05-03 12:15:24 +02:00
L3D
c179060741
resolve linting errors 2022-03-27 05:19:36 +02:00
L3D
2f95efdf9c
Fix Typo directorys/directories
RESOLVE https://github.com/roles-ansible/ansible_role_gitea/issues/69
2022-02-14 11:08:49 +01:00
L3D
9f55d0eefd
use variable gitea_user and remove trailing spaces
since it is possible to run gitea with an other user defined in the ``{{ gitea_user }}`` variable, I built it in this command.
2022-01-23 18:03:07 +01:00
jogrie
7b0180b1f0
fixed backup failure 2022-01-23 14:08:46 +01:00
L3D
06eab17b71
update linting rules 2022-01-16 18:00:52 +01:00
L3D
3509f6bd66
user gitea is now part of gitea group 2021-10-18 14:24:07 +02:00
Jens Timmerman
ad24ff74f2
gitea secrets aren't necessarily strings
fixes errors like 	fatal: [gitea]: FAILED! => {"msg": "The conditional check 'gitea_secret_key | length == 0' failed. The error was: Unexpected templating type error occurred on ({% if gitea_secret_key | length == 0 %} True {% else %} False {% endif %}): object of type 'AnsibleVaultEncryptedUnicode' has no len()
when using an encrypted string in vault for secrets
2021-09-24 11:50:31 +02:00
L3D
aabcf8beb8
Fixing yamllinting errors 2021-07-19 00:55:37 +02:00
Robert Pufky
39e76e2359 Add 'latest' version to automatically download the latest gitea release.
* Versioning logic moved into separate file; versioning is determined in that
  file and appropriate facts are set.
* Removed 'gitea_dl_url' from defaults/main.yml. This is now a generated fact
  from tasks/set_version.yml.
* Remote gitea version is only checked if 'latest' is set, otherwise no logic
  change.
* 'gitea_version' used in tasks is now 'gitea_version_target'. This is the
  target install version after versioning logic is applied. No change to end
  user usage of 'gitea_version' in defaults/main.yml.
* Updated documentation with usage and removal of 'gitea_dl_url'.
2021-07-16 10:16:54 -07:00
L3D
b898edfd48
allow optional public files 2021-06-03 22:51:28 +02:00
L3D
265bca3eeb
Add custom footer support 2021-06-03 21:06:04 +02:00
L3D
e27ef27706
implement custom logos 2021-06-03 17:59:14 +02:00
L3D
094c0038d4
update ansible version requirement 2021-05-10 22:49:14 +02:00
L3D
4d3289a796
import gpg key with the same user
import gpg key with the same user that will verify the gpg key.

RESOLVE #29
2021-05-06 15:16:31 +02:00
L3D
2ca88c2711
add message to warn the user
+ Added a message that will warn the user that fail2ban is not installed.
+ Increased the version integer for the simple versionscheck.
2021-04-12 16:56:48 +02:00
firesoft-de
391447a345
removed trailing spaces 2021-04-12 16:01:24 +02:00
firesoft-de
664c894e17
Fixed missing quotes 2021-04-12 12:39:11 +02:00
firesoft-de
18bb3f9c44
Added condition to only configure fail2ban if it is installed 2021-04-12 12:30:52 +02:00
firesoft-de
552747dda9
Added package_facts to determine if fail2ban is installed 2021-04-12 12:29:42 +02:00
firesoft-de
4555638297 Fix login shell 2021-04-05 22:02:31 +02:00
L3D
d9ff631e62
add gitea_filename variable 2021-03-22 21:47:28 +01:00
L3D
0e0a319773
Add new ansible naming scheme 2021-03-22 21:28:51 +01:00
L3D
d3c26ac0f8
use new ansible name scheme at more tasks 2021-03-22 21:21:25 +01:00
L3D
6096767d26
simplify directory handling and start using new ansible name scheme 2021-03-22 21:08:40 +01:00
L3D
791ae23361
add optional versionscheck
a simple version check that can prevent you from accidentally running an older version of this role.
2021-03-22 02:22:22 +01:00
L3D
1a8164b5ac
resolve linting error 2021-03-21 02:29:29 +01:00
L3D
6ec2f8ed04
change secret mechanism and continue with README clenaup 2021-03-21 02:22:36 +01:00
L3D
1127d83778
make the backup on update optional
Documentation and introduction of the variable `gitea_backup_on_upgrade: false`
2021-02-13 05:41:32 +01:00
L3D
0ffd14ccf0
create backup direcotry
create a backup folder and move the gitea backup to backup.yml
2021-02-13 05:32:27 +01:00
Finwë
56375819a7
Improve ARM Support (#74)
* Gitea user should be a system user

* Improve installation system

* Download archive instead of binary
* Add checksum validation
* Add GPG check
* Add backup process before upgrading

* Improve ARM support

* Improve support for Vault Encrypted JWT tokens

* Fix spacing in gitea configuration template

When Gitea rewrite the configuration file (e.g.: the JWT token is not
set or doesn't fit their criteria), it'll align space on a per-section
basis in the .ini file.
If the template is not properly spaced, at the next Ansible run, you'll
have an enormous diff, hidding what the real changes are.

* add proper redhat/debian deps for molecule testing

* Gitea group should be a system group

* fix linting for CI

* Update CI and meta information for up-to-date tests and distros

* molecule: fix typo for redhat packages

* fix typo

* bump gitea version to 1.13.1

* Use Ubuntu keyservers to play nicely with everyone

* Update minimum required ansible version to 2.9.8

This is required for Ubuntu Focal, which comes with systemd >= 245
The Get Facts modules doesn't work well with it before the bugfix
introduced in 2.9.8

* Replace yes by True to please the linting

* Truthy values needs to be lower-case

* bump gitea version to 1.13.2

* perform gitea dump as gitea user

* need to set become to yes

* autogenerate JWT_SECRETS (#77)

* autogenerate JWT_SECRETS

Based on https://docs.gitea.io/en-us/command-line/#generate we will now autogenerate JWT_SECRETS if they are not defined.
In my opinion a much better idea than writing a value in the default config.

The check if the variables for the secrets are now 43 characters long i took out. Gitea generates itself suitable secrets, if the user given ones do not fit.

* drop ansible.builtin. syntax

* Update file permissions for "{{ gitea_home }}" (#75)

The file permissions for {{ gitea_home }} especially in conjunction with the recurse: true flag are on closer inspection very open to all and also have a +x set on files.

This should be done better. And I have done here now.

By the way: To improve the -x on normal files in his gitea installation this shell command was useful for me
```
find . -type f -exec chmod a-x {} \+;
find . -type f -exec chmod u=rwX {} \+;
```

* Bump cryptography from 3.2 to 3.3.2 (#79)

Bumps [cryptography](https://github.com/pyca/cryptography) from 3.2 to 3.3.2.
- [Release notes](https://github.com/pyca/cryptography/releases)
- [Changelog](https://github.com/pyca/cryptography/blob/master/CHANGELOG.rst)
- [Commits](https://github.com/pyca/cryptography/compare/3.2...3.3.2)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Gitea user should be a system user

* Improve installation system

* Download archive instead of binary
* Add checksum validation
* Add GPG check
* Add backup process before upgrading

* Improve ARM support

* Fix spacing in gitea configuration template

When Gitea rewrite the configuration file (e.g.: the JWT token is not
set or doesn't fit their criteria), it'll align space on a per-section
basis in the .ini file.
If the template is not properly spaced, at the next Ansible run, you'll
have an enormous diff, hidding what the real changes are.

* add proper redhat/debian deps for molecule testing

* Gitea group should be a system group

* fix linting for CI

* Update CI and meta information for up-to-date tests and distros

* molecule: fix typo for redhat packages

* fix typo

* bump gitea version to 1.13.1

* Use Ubuntu keyservers to play nicely with everyone

* Update minimum required ansible version to 2.9.8

This is required for Ubuntu Focal, which comes with systemd >= 245
The Get Facts modules doesn't work well with it before the bugfix
introduced in 2.9.8

* Replace yes by True to please the linting

* Truthy values needs to be lower-case

* bump gitea version to 1.13.2

* perform gitea dump as gitea user

* need to set become to yes

* check-variables.yml doesn't exists anymore

Co-authored-by: L3D <l3d@c3woc.de>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-02-12 17:56:31 +00:00
L3D
7d91337447
Update file permissions for "{{ gitea_home }}" (#75)
The file permissions for {{ gitea_home }} especially in conjunction with the recurse: true flag are on closer inspection very open to all and also have a +x set on files.

This should be done better. And I have done here now.

By the way: To improve the -x on normal files in his gitea installation this shell command was useful for me
```
find . -type f -exec chmod a-x {} \+;
find . -type f -exec chmod u=rwX {} \+;
```
2021-02-10 19:05:04 +00:00