ansible_drone/tasks/drone-server.yml
2019-06-14 23:30:07 +08:00

34 lines
741 B
YAML

---
- name: copy config for drone server
template:
src: "drone-server.env.j2"
dest: "/etc/drone/drone-server.env"
register: drone_server_config
tags:
- configuration
- name: Creates sqlite directory
file:
path: "{{ item }}"
state: directory
mode: 0755
with_items:
- "{{ drone_dir }}"
tags:
- drone-server
- name: run drone server
docker_container:
name: drone-server
image: "drone/drone:{{ drone_version }}"
state: started
restart_policy: always
ports:
- "{{ drone_host_port }}:80"
volumes:
- "{{ drone_dir }}:/data"
env_file: /etc/drone/drone-server.env
when: drone_server_config is defined and drone_server_config.changed
tags:
- drone-server