--- - 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 - name: Deploy gitea configuration template: src=app.ini.j2 dest={{ gitea_root_dir }}/etc/app.ini owner=root group=gitea mode=0660 notify: restart gitea tags: gitea - name: Set optimal permissions command: "{{ gitea_root_dir }}/perms.sh" changed_when: False tags: gitea