diff --git a/roles/gitea/defaults/main.yml b/roles/gitea/defaults/main.yml index c724580..24c2e85 100644 --- a/roles/gitea/defaults/main.yml +++ b/roles/gitea/defaults/main.yml @@ -1,11 +1,11 @@ --- # Version to install -gitea_version: 1.11.4 +gitea_version: 1.11.5 # URL to the binary gitea_bin_url: https://dl.gitea.io/gitea/{{ gitea_version }}/gitea-{{ gitea_version }}-linux-amd64 # sha256 of the binary -gitea_bin_sha256: 4408c781069c36cbb1b5923ae924e67ceee661ba9c9bd6c73cd7408c9cd62af6 +gitea_bin_sha256: d8d43c13e71596c79b541e85e29defe065b4f70ac5155e6d0212bcfc669e1b9c # Handle updates. If set to false, ansible will only install # Gitea and then won't touch an existing installation gitea_manage_upgrade: True diff --git a/roles/gitea/tasks/conf.yml b/roles/gitea/tasks/conf.yml index 0c14afb..724367d 100644 --- a/roles/gitea/tasks/conf.yml +++ b/roles/gitea/tasks/conf.yml @@ -1,5 +1,25 @@ --- +- name: Create random tokens + shell: "{{ gitea_root_dir }}/bin/gitea generate secret {{ item }} > {{ gitea_root_dir }}/meta/ansible_{{ item }}" + args: + creates: "{{ gitea_root_dir }}/meta/ansible_{{ item }}" + with_items: + - INTERNAL_TOKEN + - LFS_JWT_SECRET + - SECRET_KEY + tags: gitea + +- name: Read random tokens + command: cat {{ gitea_root_dir }}/meta/ansible_{{ item }} + with_items: + - INTERNAL_TOKEN + - LFS_JWT_SECRET + - SECRET_KEY + changed_when: False + register: gitea_tokens + tags: gitea + - name: Set sclo-git212 as default git command template: src=git.sh.j2 dest=/etc/profile.d/git.sh mode=755 tags: gitea diff --git a/roles/gitea/tasks/facts.yml b/roles/gitea/tasks/facts.yml index fec02d5..8395427 100644 --- a/roles/gitea/tasks/facts.yml +++ b/roles/gitea/tasks/facts.yml @@ -25,22 +25,3 @@ when: gitea_db_pass is not defined tags: gitea -- name: Create random tokens - shell: "{{ gitea_root_dir }}/bin/gitea generate secret {{ item }} > {{ gitea_root_dir }}/meta/ansible_{{ item }}" - args: - creates: "{{ gitea_root_dir }}/meta/ansible_{{ item }}" - with_items: - - INTERNAL_TOKEN - - LFS_JWT_SECRET - - SECRET_KEY - tags: gitea - -- name: Read random tokens - command: cat {{ gitea_root_dir }}/meta/ansible_{{ item }} - with_items: - - INTERNAL_TOKEN - - LFS_JWT_SECRET - - SECRET_KEY - changed_when: False - register: gitea_tokens - tags: gitea