Browse Source

unfinished stuff

Thomas Buck 5 months ago
parent
commit
3a70dd1dbc
5 changed files with 29 additions and 3 deletions
  1. 3
    2
      README.md
  2. 8
    0
      TODO.md
  3. 2
    0
      roles/gitea/defaults/main.yml
  4. 11
    0
      roles/gitea/tasks/gitea.yml
  5. 5
    1
      roles/ldap/DESIGN.md

+ 3
- 2
README.md View File

7
 Ubuntu is no longer supported, simply because I just use Debian.
7
 Ubuntu is no longer supported, simply because I just use Debian.
8
 
8
 
9
 I also added the ability for full-fledged user-management using OpenLDAP and FusionDirectory.
9
 I also added the ability for full-fledged user-management using OpenLDAP and FusionDirectory.
10
+It automatically creates E-Mail inboxes for LDAP users, as well as allowing login using LDAP credentials on most roles / services.
10
 This is optional, however.
11
 This is optional, however.
11
 You can also use statically configured credentials, which is enough for single-user setups.
12
 You can also use statically configured credentials, which is enough for single-user setups.
12
 
13
 
83
 
84
 
84
 Download this repository somewhere on your machine, either through `Clone or Download > Download ZIP` above, `wget`, or `git` as below.
85
 Download this repository somewhere on your machine, either through `Clone or Download > Download ZIP` above, `wget`, or `git` as below.
85
 Also install the dependencies for password generation as well as ansible itself.
86
 Also install the dependencies for password generation as well as ansible itself.
86
-    
87
+
87
     git clone https://github.com/xythobuz/sovereign.git
88
     git clone https://github.com/xythobuz/sovereign.git
88
     cd sovereign
89
     cd sovereign
89
     sudo pip install -r ./requirements.txt
90
     sudo pip install -r ./requirements.txt
111
 To run the whole thing:
112
 To run the whole thing:
112
 
113
 
113
     ansible-playbook -i ./hosts --ask-sudo-pass --key-file KEY site.yml
114
     ansible-playbook -i ./hosts --ask-sudo-pass --key-file KEY site.yml
114
-    
115
+
115
 If you chose to make a passwordless sudo deploy user, you can omit the `--ask-sudo-pass` argument.
116
 If you chose to make a passwordless sudo deploy user, you can omit the `--ask-sudo-pass` argument.
116
 If you don't need to specify an ssh key to connect to the host, leave out `--key-file KEY` part, otherwise replace `KEY` with the path to the key you want to use.
117
 If you don't need to specify an ssh key to connect to the host, leave out `--key-file KEY` part, otherwise replace `KEY` with the path to the key you want to use.
117
 Append eg. `-l testing` to only run for the hosts in the testing group.
118
 Append eg. `-l testing` to only run for the hosts in the testing group.

+ 8
- 0
TODO.md View File

1
+# TODOs
2
+
3
+* Add apache2 access and error logs for installed servers to logrotate
4
+
5
+* Crawlers create large archives in gitea for repos.
6
+  These can be deleted in the gitea admin interface.
7
+  Add automated task to delete these (if required)?
8
+  https://github.com/go-gitea/gitea/issues/5292#issuecomment-769264637

+ 2
- 0
roles/gitea/defaults/main.yml View File

7
 gitea_admin_username: "{{ main_user_name }}"
7
 gitea_admin_username: "{{ main_user_name }}"
8
 gitea_admin_password: "{{ lookup('password', secret + '/' + 'gitea_admin_password length=32') }}"
8
 gitea_admin_password: "{{ lookup('password', secret + '/' + 'gitea_admin_password length=32') }}"
9
 
9
 
10
+gitea_enable_ldap: false
11
+
10
 gitea_db_username: giteauser
12
 gitea_db_username: giteauser
11
 gitea_db_password: "{{ lookup('password', secret + '/' + 'gitea_db_password length=32') }}"
13
 gitea_db_password: "{{ lookup('password', secret + '/' + 'gitea_db_password length=32') }}"
12
 gitea_db_database: gitea
14
 gitea_db_database: gitea

+ 11
- 0
roles/gitea/tasks/gitea.yml View File

90
     chdir: /data/gitea
90
     chdir: /data/gitea
91
   ignore_errors: True
91
   ignore_errors: True
92
 
92
 
93
+# check if ldap already enabled
94
+#gitea admin auth list
95
+
96
+# remove ldap auth if it exists
97
+#gitea admin auth delete
98
+
99
+# add ldap auth, if configured
100
+#gitea admin auth add-ldap --name customldap --security-protocol unencrypted --host localhost --port 389 --bind-dn "uid=admin,ou=people,dc=shagohod,dc=de" --bind-password "xS3Lbd.PuHdmEjAYxQn.JRmaXbuo_2-h" --user-search-base "ou=people,dc=shagohod,dc=de" --user-filter "uid=%s,ou=people,dc=shagohod,dc=de" --email-attribute mail
101
+
102
+# --admin-filter --username-attribute
103
+
93
 - name: Add fail2ban script for gitea
104
 - name: Add fail2ban script for gitea
94
   copy:
105
   copy:
95
     src=etc_fail2ban_filter.d_gitea.conf
106
     src=etc_fail2ban_filter.d_gitea.conf

+ 5
- 1
roles/ldap/DESIGN.md View File

21
     Password: {{ slapd_admin_password }}
21
     Password: {{ slapd_admin_password }}
22
     Base DN: dc=DOMAIN,dc=TLD
22
     Base DN: dc=DOMAIN,dc=TLD
23
 
23
 
24
-Dokuwiki, Jitsi and Kanboard can be configured to use LDAP automatically.
24
+For LimeSurvey, use these settings:
25
+
26
+
27
+
28
+Dokuwiki, Gitea, Jitsi and Kanboard can be configured to use LDAP automatically.
25
 See their defaults.
29
 See their defaults.
26
 
30
 
27
 ## ToDo
31
 ## ToDo

Loading…
Cancel
Save