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

22 lines
539 B
YAML

---
- name: copy config for drone agent
template:
src: "drone-agent.env.j2"
dest: "/etc/drone/drone-agent.env"
register: drone_agent_config
tags:
- configuration
- name: run drone agent
docker_container:
name: "drone-agent"
image: "drone/agent:{{ drone_version }}"
state: started
restart_policy: always
volumes:
- /var/run/docker.sock:/var/run/docker.sock
env_file: /etc/drone/drone-agent.env
when: drone_agent_config is defined and drone_agent_config.changed
tags:
- drone-agent