20 lines
883 B
YAML
20 lines
883 B
YAML
- name: drone | create app | generate shared secret
|
|
ansible.builtin.command: openssl rand -hex 16
|
|
register: DRONE_RPC_SECRET
|
|
|
|
- name: drone | create app | create docker dir
|
|
ansible.builtin.file:
|
|
path: "/opt/docker/drone"
|
|
state: directory
|
|
|
|
- name: drone | create app | create docker-compose.yml
|
|
ansible.builtin.template:
|
|
src: "docker-compose.yml.j2"
|
|
dest: "/opt/docker/drone/docker-compose.yml"
|
|
force: no
|
|
validate: "docker-compose -f %s config" # not required. The validation command to run before copying into place. The path to the file to validate is passed in via '%s' which must be present as in the examples below. The command is passed securely so shell features like expansion and pipes will not work.
|
|
|
|
- name: drone | create app | start docker container
|
|
ansible.builtin.command:
|
|
cmd: "docker-compose up -d"
|
|
chdir: "/opt/docker/drone" |