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

Merge pull request #55 from JensTimmerman/patch-1

gitea secrets aren't necessarily strings
This commit is contained in:
L3D 2021-09-25 20:56:56 +02:00 committed by GitHub
commit 5e3f20a8fa
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 7 deletions

View file

@ -4,35 +4,35 @@
ansible.builtin.shell: 'umask 077; /usr/local/bin/gitea generate secret SECRET_KEY > /etc/gitea/gitea_secret_key'
args:
creates: '/etc/gitea/gitea_secret_key'
when: gitea_secret_key | length == 0
when: gitea_secret_key | string | length == 0
- name: read gitea SECRET_KEY from file
become: true
ansible.builtin.slurp:
src: '/etc/gitea/gitea_secret_key'
register: remote_secret_key
when: gitea_secret_key | length == 0
when: gitea_secret_key | string | length == 0
- name: set fact gitea_secret_key
ansible.builtin.set_fact:
gitea_secret_key: "{{ remote_secret_key['content'] | b64decode }}"
when: gitea_secret_key | length == 0
when: gitea_secret_key | string | length == 0
- name: generate gitea INTERNAL_TOKEN if not provided
become: true
ansible.builtin.shell: 'umask 077; /usr/local/bin/gitea generate secret INTERNAL_TOKEN > /etc/gitea/gitea_internal_token'
args:
creates: '/etc/gitea/gitea_internal_token'
when: gitea_internal_token | length == 0
when: gitea_internal_token | string | length == 0
- name: read gitea INTERNAL_TOKEN from file
become: true
ansible.builtin.slurp:
src: '/etc/gitea/gitea_internal_token'
register: remote_internal_token
when: gitea_internal_token | length == 0
when: gitea_internal_token | string | length == 0
- name: set fact gitea_internal_token
ansible.builtin.set_fact:
gitea_internal_token: "{{ remote_internal_token['content'] | b64decode }}"
when: gitea_internal_token | length == 0
when: gitea_internal_token | string | length == 0

View file

@ -56,5 +56,5 @@ transfer_custom_footer:
- 'files/gitea_footer/extra_links_footer.tmpl'
- 'files/extra_links_footer.tmpl'
playbook_version_number: 27 # should be int
playbook_version_number: 28 # should be int
playbook_version_path: 'do1jlr.gitea.version'