mirror of
https://github.com/kevinveenbirkenbach/computer-playbook.git
synced 2025-08-30 15:28:12 +02:00
Renamed Gitea variables
This commit is contained in:
@@ -4,26 +4,26 @@
|
||||
|
||||
- name: Patch Gitea DB host in app.ini
|
||||
command: >
|
||||
docker exec -i --user {{ gitea_user }} {{ gitea_container }}
|
||||
sed -ri "s|^(HOST\s*=\s*).*$|\1{{ database_host }}:{{ database_port }}|" {{ gitea_config }}
|
||||
docker exec -i --user {{ GITEA_USER }} {{ GITEA_CONTAINER }}
|
||||
sed -ri "s|^(HOST\s*=\s*).*$|\1{{ database_host }}:{{ database_port }}|" {{ GITEA_CONFIG }}
|
||||
notify: docker compose up
|
||||
|
||||
- name: Patch Gitea DB name in app.ini
|
||||
command: >
|
||||
docker exec -i --user {{ gitea_user }} {{ gitea_container }}
|
||||
sed -ri "s|^(NAME\s*=\s*).*$|\1{{ database_name }}|" {{ gitea_config }}
|
||||
docker exec -i --user {{ GITEA_USER }} {{ GITEA_CONTAINER }}
|
||||
sed -ri "s|^(NAME\s*=\s*).*$|\1{{ database_name }}|" {{ GITEA_CONFIG }}
|
||||
notify: docker compose up
|
||||
|
||||
- name: Patch Gitea DB user in app.ini
|
||||
command: >
|
||||
docker exec -i --user {{ gitea_user }} {{ gitea_container }}
|
||||
sed -ri "s|^(USER\s*=\s*).*$|\1{{ database_username }}|" {{ gitea_config }}
|
||||
docker exec -i --user {{ GITEA_USER }} {{ GITEA_CONTAINER }}
|
||||
sed -ri "s|^(USER\s*=\s*).*$|\1{{ database_username }}|" {{ GITEA_CONFIG }}
|
||||
notify: docker compose up
|
||||
|
||||
- name: Patch Gitea DB password in app.ini
|
||||
command: >
|
||||
docker exec -i --user {{ gitea_user }} {{ gitea_container }}
|
||||
sed -ri "s|^(PASSWD\s*=\s*).*$|\1{{ database_password }}|" {{ gitea_config }}
|
||||
docker exec -i --user {{ GITEA_USER }} {{ GITEA_CONTAINER }}
|
||||
sed -ri "s|^(PASSWD\s*=\s*).*$|\1{{ database_password }}|" {{ GITEA_CONFIG }}
|
||||
notify: docker compose up
|
||||
|
||||
- name: "Flush database patches"
|
||||
|
@@ -1,6 +1,6 @@
|
||||
- name: "Lookup existing LDAP auth source ID"
|
||||
shell: |
|
||||
docker exec -i --user {{ gitea_user }} {{ gitea_container }} \
|
||||
docker exec -i --user {{ GITEA_USER }} {{ GITEA_CONTAINER }} \
|
||||
gitea admin auth list \
|
||||
| awk -v name="LDAP ({{ PRIMARY_DOMAIN }})" '$0 ~ name {print $1; exit}'
|
||||
args:
|
||||
@@ -11,7 +11,7 @@
|
||||
|
||||
- name: "Delete existing LDAP auth source if present"
|
||||
shell: |
|
||||
docker exec -i --user {{ gitea_user }} {{ gitea_container }} \
|
||||
docker exec -i --user {{ GITEA_USER }} {{ GITEA_CONTAINER }} \
|
||||
gitea admin auth delete --id {{ ldap_source_id_raw.stdout }}
|
||||
args:
|
||||
chdir: "{{ docker_compose.directories.instance }}"
|
||||
|
@@ -1,7 +1,7 @@
|
||||
|
||||
- name: "Lookup existing OIDC auth source ID"
|
||||
shell: |
|
||||
docker exec -i --user {{ gitea_user }} {{ gitea_container }} \
|
||||
docker exec -i --user {{ GITEA_USER }} {{ GITEA_CONTAINER }} \
|
||||
gitea admin auth list \
|
||||
| awk -v name="{{ OIDC.BUTTON_TEXT }}" '$0 ~ name {print $1; exit}'
|
||||
args:
|
||||
@@ -12,7 +12,7 @@
|
||||
|
||||
- name: "Delete existing OIDC auth source if present"
|
||||
shell: |
|
||||
docker exec -i --user {{ gitea_user }} {{ gitea_container }} \
|
||||
docker exec -i --user {{ GITEA_USER }} {{ GITEA_CONTAINER }} \
|
||||
gitea admin auth delete --id {{ oidc_source_id_raw.stdout }}
|
||||
args:
|
||||
chdir: "{{ docker_compose.directories.instance }}"
|
||||
|
@@ -15,7 +15,7 @@
|
||||
|
||||
- name: "Run DB migrations inside Gitea container"
|
||||
shell: |
|
||||
docker exec -i --user {{ gitea_user }} {{ gitea_container }} \
|
||||
docker exec -i --user {{ GITEA_USER }} {{ GITEA_CONTAINER }} \
|
||||
/app/gitea/gitea migrate
|
||||
args:
|
||||
chdir: "{{ docker_compose.directories.instance }}"
|
||||
@@ -24,13 +24,13 @@
|
||||
|
||||
- name: "Create initial admin user"
|
||||
shell: |
|
||||
docker exec -i --user {{ gitea_user }} {{ gitea_container }} \
|
||||
docker exec -i --user {{ GITEA_USER }} {{ GITEA_CONTAINER }} \
|
||||
/app/gitea/gitea admin user create \
|
||||
--admin \
|
||||
--username "{{ users.administrator.username }}" \
|
||||
--password "{{ users.administrator.password }}" \
|
||||
--email "{{ users.administrator.email }}" \
|
||||
-c {{ gitea_config }}
|
||||
-c {{ GITEA_CONFIG }}
|
||||
args:
|
||||
chdir: "{{ docker_compose.directories.instance }}"
|
||||
register: create_admin
|
||||
|
@@ -1,8 +1,8 @@
|
||||
- name: "Add LDAP Authentication Source"
|
||||
shell: |
|
||||
docker exec -i --user {{ gitea_user }} {{ gitea_container }} \
|
||||
docker exec -i --user {{ GITEA_USER }} {{ GITEA_CONTAINER }} \
|
||||
gitea admin auth add-ldap \
|
||||
{{ gitea_ldap_auth_args | join(' ') }}
|
||||
{{ GITEA_LDAP_AUTH_ARGS | join(' ') }}
|
||||
args:
|
||||
chdir: "{{ docker_compose.directories.instance }}"
|
||||
register: ldap_manage
|
||||
@@ -10,7 +10,7 @@
|
||||
|
||||
- name: "Lookup existing LDAP auth source ID"
|
||||
shell: |
|
||||
docker exec -i --user {{ gitea_user }} {{ gitea_container }} \
|
||||
docker exec -i --user {{ GITEA_USER }} {{ GITEA_CONTAINER }} \
|
||||
gitea admin auth list \
|
||||
| tail -n +2 \
|
||||
| grep -F "LDAP ({{ PRIMARY_DOMAIN }})" \
|
||||
@@ -29,10 +29,10 @@
|
||||
|
||||
- name: "Update LDAP Authentication Source"
|
||||
shell: |
|
||||
docker exec -i --user {{ gitea_user }} {{ gitea_container }} \
|
||||
docker exec -i --user {{ GITEA_USER }} {{ GITEA_CONTAINER }} \
|
||||
gitea admin auth update-ldap \
|
||||
--id {{ ldap_source_id }} \
|
||||
{{ gitea_ldap_auth_args | join(' ') }}
|
||||
{{ GITEA_LDAP_AUTH_ARGS | join(' ') }}
|
||||
args:
|
||||
chdir: "{{ docker_compose.directories.instance }}"
|
||||
register: ldap_manage
|
||||
|
@@ -1,6 +1,6 @@
|
||||
- name: "Add Keycloak OIDC Provider"
|
||||
shell: |
|
||||
docker exec -i --user {{ gitea_user }} {{ gitea_container }} \
|
||||
docker exec -i --user {{ GITEA_USER }} {{ GITEA_CONTAINER }} \
|
||||
gitea admin auth add-oauth \
|
||||
--provider openidConnect \
|
||||
--name "{{ OIDC.BUTTON_TEXT }}" \
|
||||
@@ -15,7 +15,7 @@
|
||||
|
||||
- name: "Lookup existing Keycloak auth source ID"
|
||||
shell: |
|
||||
docker exec -i --user {{ gitea_user }} {{ gitea_container }} \
|
||||
docker exec -i --user {{ GITEA_USER }} {{ GITEA_CONTAINER }} \
|
||||
/app/gitea/gitea admin auth list \
|
||||
| tail -n +2 \
|
||||
| grep -F "{{ OIDC.BUTTON_TEXT }}" \
|
||||
@@ -34,7 +34,7 @@
|
||||
|
||||
- name: "Update Keycloak OIDC Provider"
|
||||
shell: |
|
||||
docker exec -i --user {{ gitea_user }} {{ gitea_container }} \
|
||||
docker exec -i --user {{ GITEA_USER }} {{ GITEA_CONTAINER }} \
|
||||
gitea admin auth update-oauth \
|
||||
--id {{ oidc_source_id }}\
|
||||
--provider openidConnect \
|
||||
|
Reference in New Issue
Block a user