ansible/roles/docker/tasks/services/privatebin.yml

30 lines
799 B
YAML
Raw Normal View History

2019-02-13 07:50:42 +00:00
---
2019-02-13 09:05:00 +00:00
- name: create privatebin volume folders
file:
name: "{{ privatebin.volume_folder }}/{{ item }}"
state: directory
with_items:
- cfg
- data
- name: upload privatebin config
template:
src: files/configs/privatebin-conf.php
dest: "{{ privatebin.volume_folder }}/cfg/conf.php"
2019-02-13 07:50:42 +00:00
- name: privatebin app container
docker_container:
name: privatebin
image: jgeusebroek/privatebin:latest
2019-02-13 07:54:05 +00:00
restart_policy: unless-stopped
2019-02-13 07:50:42 +00:00
volumes:
2019-02-13 09:05:00 +00:00
- "{{ privatebin.volume_folder }}/cfg:/privatebin/cfg"
- "{{ privatebin.volume_folder }}/data:/privatebin/data"
2019-02-13 07:50:42 +00:00
networks:
- name: external_services
env:
VIRTUAL_HOST: "{{ privatebin.domain }}"
LETSENCRYPT_HOST: "{{ privatebin.domain }}"
LETSENCRYPT_EMAIL: "{{ letsencrypt_email }}"