Add custom volumes
This commit is contained in:
parent
1a4a1c6b82
commit
6d2c30acff
36
tasks/custom_volumes.yml
Normal file
36
tasks/custom_volumes.yml
Normal file
|
@ -0,0 +1,36 @@
|
|||
---
|
||||
- name: create drone exchange directory
|
||||
file:
|
||||
path: /var/drone
|
||||
state: directory
|
||||
owner: root
|
||||
group: root
|
||||
mode: 0755
|
||||
register: drone_agent_config
|
||||
|
||||
- name: create exchange path for build artifacts
|
||||
file:
|
||||
path: /var/builds
|
||||
state: directory
|
||||
owner: root
|
||||
group: www-data
|
||||
mode: 0775
|
||||
register: drone_agent_config
|
||||
|
||||
- name: create exchange path for signal build artifacts
|
||||
file:
|
||||
path: /var/builds/signal
|
||||
state: directory
|
||||
owner: root
|
||||
group: www-data
|
||||
mode: 0775
|
||||
register: drone_agent_config
|
||||
|
||||
- name: create exchange path for fenix build artifacts
|
||||
file:
|
||||
path: /var/builds/fenix
|
||||
state: directory
|
||||
owner: root
|
||||
group: www-data
|
||||
mode: 0775
|
||||
register: drone_agent_config
|
|
@ -16,6 +16,8 @@
|
|||
tags:
|
||||
- configuration
|
||||
|
||||
- include_tasks: custom_volumes.yml
|
||||
|
||||
- name: run drone agent
|
||||
docker_container:
|
||||
name: "drone-agent"
|
||||
|
@ -24,6 +26,8 @@
|
|||
restart_policy: always
|
||||
volumes:
|
||||
- /var/run/docker.sock:/var/run/docker.sock
|
||||
- /var/drone:/var/drone
|
||||
- /var/builds:/var/builds
|
||||
env_file: /etc/drone/drone-agent.env
|
||||
when: drone_agent_config is defined and drone_agent_config.changed
|
||||
tags:
|
||||
|
|
Loading…
Reference in New Issue
Block a user