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:
commit
5e3f20a8fa
2 changed files with 7 additions and 7 deletions
|
@ -4,35 +4,35 @@
|
||||||
ansible.builtin.shell: 'umask 077; /usr/local/bin/gitea generate secret SECRET_KEY > /etc/gitea/gitea_secret_key'
|
ansible.builtin.shell: 'umask 077; /usr/local/bin/gitea generate secret SECRET_KEY > /etc/gitea/gitea_secret_key'
|
||||||
args:
|
args:
|
||||||
creates: '/etc/gitea/gitea_secret_key'
|
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
|
- name: read gitea SECRET_KEY from file
|
||||||
become: true
|
become: true
|
||||||
ansible.builtin.slurp:
|
ansible.builtin.slurp:
|
||||||
src: '/etc/gitea/gitea_secret_key'
|
src: '/etc/gitea/gitea_secret_key'
|
||||||
register: remote_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
|
- name: set fact gitea_secret_key
|
||||||
ansible.builtin.set_fact:
|
ansible.builtin.set_fact:
|
||||||
gitea_secret_key: "{{ remote_secret_key['content'] | b64decode }}"
|
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
|
- name: generate gitea INTERNAL_TOKEN if not provided
|
||||||
become: true
|
become: true
|
||||||
ansible.builtin.shell: 'umask 077; /usr/local/bin/gitea generate secret INTERNAL_TOKEN > /etc/gitea/gitea_internal_token'
|
ansible.builtin.shell: 'umask 077; /usr/local/bin/gitea generate secret INTERNAL_TOKEN > /etc/gitea/gitea_internal_token'
|
||||||
args:
|
args:
|
||||||
creates: '/etc/gitea/gitea_internal_token'
|
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
|
- name: read gitea INTERNAL_TOKEN from file
|
||||||
become: true
|
become: true
|
||||||
ansible.builtin.slurp:
|
ansible.builtin.slurp:
|
||||||
src: '/etc/gitea/gitea_internal_token'
|
src: '/etc/gitea/gitea_internal_token'
|
||||||
register: remote_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
|
- name: set fact gitea_internal_token
|
||||||
ansible.builtin.set_fact:
|
ansible.builtin.set_fact:
|
||||||
gitea_internal_token: "{{ remote_internal_token['content'] | b64decode }}"
|
gitea_internal_token: "{{ remote_internal_token['content'] | b64decode }}"
|
||||||
when: gitea_internal_token | length == 0
|
when: gitea_internal_token | string | length == 0
|
||||||
|
|
|
@ -56,5 +56,5 @@ transfer_custom_footer:
|
||||||
- 'files/gitea_footer/extra_links_footer.tmpl'
|
- 'files/gitea_footer/extra_links_footer.tmpl'
|
||||||
- 'files/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'
|
playbook_version_path: 'do1jlr.gitea.version'
|
||||||
|
|
Loading…
Reference in a new issue