add regenerate key handler
This commit is contained in:
parent
85daaa8730
commit
6d14444631
@ -17,3 +17,10 @@
|
|||||||
state: restarted
|
state: restarted
|
||||||
when: ansible_service_mgr == "systemd"
|
when: ansible_service_mgr == "systemd"
|
||||||
become: yes
|
become: yes
|
||||||
|
|
||||||
|
- name: "regenerate keys"
|
||||||
|
command:
|
||||||
|
cmd: gitea admin -c /etc/gitea/app.ini regenerate keys
|
||||||
|
chdir: /usr/lib/gitea
|
||||||
|
become: true
|
||||||
|
become_user: "{{ gitea_user }}"
|
||||||
|
@ -13,6 +13,7 @@
|
|||||||
name: "{{ gitea_db_name }}"
|
name: "{{ gitea_db_name }}"
|
||||||
state: import
|
state: import
|
||||||
target: "{{gitea_SQl_target_file}}"
|
target: "{{gitea_SQl_target_file}}"
|
||||||
|
notify: "regenerate keys"
|
||||||
when: gitea_database_creation.changed == true and gitea_SQl_target_file is defined
|
when: gitea_database_creation.changed == true and gitea_SQl_target_file is defined
|
||||||
|
|
||||||
- name: "Ensure db user is present"
|
- name: "Ensure db user is present"
|
||||||
|
@ -18,7 +18,6 @@
|
|||||||
state: present
|
state: present
|
||||||
register: gitea_database_creation
|
register: gitea_database_creation
|
||||||
|
|
||||||
|
|
||||||
- name: import DATA in database in case of creation
|
- name: import DATA in database in case of creation
|
||||||
become: yes
|
become: yes
|
||||||
become_user: postgres
|
become_user: postgres
|
||||||
@ -27,4 +26,5 @@
|
|||||||
state: restore
|
state: restore
|
||||||
target: "{{ gitea_SQl_target_file }}"
|
target: "{{ gitea_SQl_target_file }}"
|
||||||
register: gitea_database_import
|
register: gitea_database_import
|
||||||
|
notify: "regenerate keys"
|
||||||
when: gitea_database_creation.changed == true and gitea_SQl_target_file is defined
|
when: gitea_database_creation.changed == true and gitea_SQl_target_file is defined
|
Loading…
Reference in New Issue
Block a user