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

32 lines
962 B
YAML

---
- name: create privatebin volume folders
ansible.builtin.file:
name: '{{ services.privatebin.volume_folder }}/{{ volume }}'
state: directory
loop:
- cfg
- data
loop_control:
loop_var: volume
- name: upload privatebin config
ansible.builtin.template:
src: files/configs/privatebin-conf.php
dest: '{{ services.privatebin.volume_folder }}/cfg/conf.php'
- name: privatebin app container
community.docker.docker_container:
name: privatebin
image: jgeusebroek/privatebin:{{ services.privatebin.version }}
restart_policy: unless-stopped
volumes:
- '{{ services.privatebin.volume_folder }}/cfg:/privatebin/cfg'
- '{{ services.privatebin.volume_folder }}/data:/privatebin/data'
networks:
- name: external_services
env:
VIRTUAL_HOST: '{{ services.privatebin.domain }}'
LETSENCRYPT_HOST: '{{ services.privatebin.domain }}'
LETSENCRYPT_EMAIL: '{{ letsencrypt_email }}'