feat: update sqlite folder

This commit is contained in:
Bo-Yi Wu 2019-06-15 23:07:01 +08:00
parent 14f0df0dfe
commit 0e42b32a1a
2 changed files with 8 additions and 7 deletions

View File

@ -1,4 +1,3 @@
---
drone_server_enable: "false"
drone_agent_enable: "false"
drone_version: "latest"
@ -12,7 +11,8 @@ drone_github_client_id: ""
drone_github_client_secret: ""
drone_logs_pretty: "true"
drone_logs_color: "true"
drone_dir: "/var/lib/drone"
drone_rpc_server: "http://drone-server"
drone_runner_capacity: "3"
drone_host_port: "8080"
drone_database_driver: "sqlite"
drone_sqlite_dir: "/var/lib/drone"

View File

@ -9,11 +9,11 @@
- name: Creates sqlite directory
file:
path: "{{ item }}"
path: "{{ drone_sqlite_dir }}"
state: directory
mode: 0755
with_items:
- "{{ drone_dir }}"
when: drone_database_driver == "sqlite"
register: drone_sqlite_folder
tags:
- drone-server
@ -26,8 +26,9 @@
ports:
- "{{ drone_host_port }}:80"
volumes:
- "{{ drone_dir }}:/data"
- "{{ drone_sqlite_dir }}:/data"
env_file: /etc/drone/drone-server.env
when: drone_server_config is defined and drone_server_config.changed
when: (drone_server_config is defined and drone_server_config.changed) or
(drone_sqlite_folder is defined and drone_sqlite_folder.changed)
tags:
- drone-server