add regenerate key handler
This commit is contained in:
parent
85daaa8730
commit
6d14444631
@ -17,3 +17,10 @@
|
||||
state: restarted
|
||||
when: ansible_service_mgr == "systemd"
|
||||
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 }}"
|
||||
state: import
|
||||
target: "{{gitea_SQl_target_file}}"
|
||||
notify: "regenerate keys"
|
||||
when: gitea_database_creation.changed == true and gitea_SQl_target_file is defined
|
||||
|
||||
- name: "Ensure db user is present"
|
||||
|
@ -1,7 +1,7 @@
|
||||
- name: "Ensure db user is present"
|
||||
become: yes
|
||||
become_user: postgres
|
||||
postgresql_user:
|
||||
postgresql_user:
|
||||
name: "{{ gitea_db_user }}"
|
||||
password: "{{ gitea_db_password }}"
|
||||
state: present
|
||||
@ -9,7 +9,7 @@
|
||||
- name: "Ensure database is present"
|
||||
become: yes
|
||||
become_user: postgres
|
||||
postgresql_db:
|
||||
postgresql_db:
|
||||
name: "{{ gitea_db_name }}"
|
||||
lc_collate: fr_FR.UTF-8
|
||||
encoding: utf8
|
||||
@ -18,7 +18,6 @@
|
||||
state: present
|
||||
register: gitea_database_creation
|
||||
|
||||
|
||||
- name: import DATA in database in case of creation
|
||||
become: yes
|
||||
become_user: postgres
|
||||
@ -27,4 +26,5 @@
|
||||
state: restore
|
||||
target: "{{ gitea_SQl_target_file }}"
|
||||
register: gitea_database_import
|
||||
when: gitea_database_creation.changed == true and gitea_SQl_target_file is defined
|
||||
notify: "regenerate keys"
|
||||
when: gitea_database_creation.changed == true and gitea_SQl_target_file is defined
|
||||
|
Loading…
Reference in New Issue
Block a user