forked from data.coop/ansible
32 lines
832 B
YAML
32 lines
832 B
YAML
---
|
|
|
|
- name: create privatebin volume folders
|
|
file:
|
|
name: "{{ privatebin.volume_folder }}/{{ volume }}"
|
|
state: directory
|
|
loop:
|
|
- cfg
|
|
- data
|
|
loop_control:
|
|
loop_var: volume
|
|
|
|
- name: upload privatebin config
|
|
template:
|
|
src: files/configs/privatebin-conf.php
|
|
dest: "{{ privatebin.volume_folder }}/cfg/conf.php"
|
|
|
|
- name: privatebin app container
|
|
docker_container:
|
|
name: privatebin
|
|
image: jgeusebroek/privatebin:latest
|
|
restart_policy: unless-stopped
|
|
volumes:
|
|
- "{{ privatebin.volume_folder }}/cfg:/privatebin/cfg"
|
|
- "{{ privatebin.volume_folder }}/data:/privatebin/data"
|
|
networks:
|
|
- name: external_services
|
|
env:
|
|
VIRTUAL_HOST: "{{ privatebin.domain }}"
|
|
LETSENCRYPT_HOST: "{{ privatebin.domain }}"
|
|
LETSENCRYPT_EMAIL: "{{ letsencrypt_email }}"
|