database modif gitea
This commit is contained in:
parent
af08d3575e
commit
af511aeaa1
@ -21,7 +21,7 @@ gitea_db_user: gitea
|
||||
gitea_db_password: lel
|
||||
gitea_db_ssl: disable
|
||||
gitea_db_path: "{{ gitea_home }}/data/gitea.db"
|
||||
|
||||
gitea_SQl_target_file: []
|
||||
gitea_ssh_listen: 0.0.0.0
|
||||
gitea_ssh_domain: localhost
|
||||
gitea_start_ssh: false
|
||||
|
@ -1,3 +1,29 @@
|
||||
- name: "Ensure database is present"
|
||||
become: yes
|
||||
mysql_db:
|
||||
name: "{{ gitea_db_name }}"
|
||||
collation: utf8mb4_unicode_ci
|
||||
encoding: utf8mb4
|
||||
state: present
|
||||
register: gitea_database_creation
|
||||
|
||||
- name: import DATA in database in case of creation
|
||||
become: yes
|
||||
mysql_db:
|
||||
name: "{{ gitea_db_name }}"
|
||||
state: import
|
||||
target: "{{gitea_SQl_target_file}}"
|
||||
when: gitea_database_creation.changed == true and gitea_SQl_target_file is defined
|
||||
|
||||
- name: "Ensure db user is present"
|
||||
become: yes
|
||||
mysql_user:
|
||||
name: "{{ gitea_db_user }}"
|
||||
host: localhost
|
||||
password: "{{ gitea_db_password }}"
|
||||
priv: "{{ gitea_db_name }}.*:ALL"
|
||||
state: present
|
||||
|
||||
- name: install gitea
|
||||
pacman:
|
||||
state: present # not required. choices: absent;latest;present. Desired state of the package.
|
||||
|
Loading…
Reference in New Issue
Block a user