mirror of
https://github.com/Crocmagnon/ansible.git
synced 2024-12-22 14:01:58 +01:00
add wallabag
This commit is contained in:
parent
031c804d97
commit
2ae07de7ca
4 changed files with 65 additions and 1 deletions
|
@ -2,4 +2,4 @@
|
|||
profile: production
|
||||
strict: true
|
||||
exclude_paths:
|
||||
- "**/docker-compose.yaml"
|
||||
- "**/*docker-compose.yaml"
|
||||
|
|
10
playbooks/apps/files/wallabag-docker-compose.yaml
Normal file
10
playbooks/apps/files/wallabag-docker-compose.yaml
Normal file
|
@ -0,0 +1,10 @@
|
|||
services:
|
||||
wallabag:
|
||||
image: wallabag/wallabag:latest
|
||||
env_file: wallabag.env
|
||||
restart: always
|
||||
volumes:
|
||||
- ./wallabag_data/data:/var/www/wallabag/data
|
||||
- ./wallabag_data/images:/var/www/wallabag/web/assets/images
|
||||
ports:
|
||||
- "8009:80"
|
10
playbooks/apps/templates/wallabag.env.j2
Normal file
10
playbooks/apps/templates/wallabag.env.j2
Normal file
|
@ -0,0 +1,10 @@
|
|||
SYMFONY__ENV__SECRET={{ secret_key }}
|
||||
SYMFONY__ENV__LOCALE=en
|
||||
SYMFONY__ENV__MAILER_HOST=smtp.mailgun.org
|
||||
SYMFONY__ENV__MAILER_USER=wallabag@mg.augendre.info
|
||||
SYMFONY__ENV__MAILER_PASSWORD={{ mailgun_api_key }}
|
||||
SYMFONY__ENV__MAILER_PORT=587
|
||||
SYMFONY__ENV__FROM_EMAIL=wallabag@mg.augendre.info
|
||||
SYMFONY__ENV__FOSUSER_REGISTRATION=false
|
||||
#SYMFONY__ENV__FOSUSER_CONFIRMATION=
|
||||
SYMFONY__ENV__DOMAIN_NAME=https://wallabag.augendre.info
|
44
playbooks/apps/wallabag.yaml
Normal file
44
playbooks/apps/wallabag.yaml
Normal file
|
@ -0,0 +1,44 @@
|
|||
---
|
||||
- name: Setup wallabag
|
||||
hosts: servers
|
||||
gather_facts: false
|
||||
tasks:
|
||||
- name: Create dir
|
||||
ansible.builtin.file:
|
||||
path: "{{ dir }}"
|
||||
state: directory
|
||||
mode: "0775"
|
||||
- name: Write env file
|
||||
ansible.builtin.template:
|
||||
src: templates/wallabag.env.j2
|
||||
dest: "{{ dir }}/wallabag.env"
|
||||
mode: "0644"
|
||||
- name: Write docker-compose.yaml
|
||||
ansible.builtin.copy:
|
||||
src: files/wallabag-docker-compose.yaml
|
||||
dest: "{{ dir }}/docker-compose.yaml"
|
||||
mode: "0644"
|
||||
- name: Ensure service is started
|
||||
community.docker.docker_compose_v2:
|
||||
project_src: "{{ dir }}"
|
||||
state: present
|
||||
vars:
|
||||
dir: /mnt/data/wallabag
|
||||
secret_key: !vault |
|
||||
$ANSIBLE_VAULT;1.1;AES256
|
||||
31346432623062383331306633383230376264326530643236393838356166346563653637376666
|
||||
6164636662643832383639346638376534353339356161300a636132376531333539323066666334
|
||||
38663566633337343164316239613239656662623437373234366135366134646665343134656566
|
||||
3933313933323732350a623262383864343331363138353335663333626537366563663234363833
|
||||
36613166343664386362626631623061613536616663616431353066633531643736343236333435
|
||||
31613930633837396237633732353266656533373739613031326137656430633036356565376238
|
||||
653264666166386662643966383234323133
|
||||
mailgun_api_key: !vault |
|
||||
$ANSIBLE_VAULT;1.1;AES256
|
||||
38643731363932383630346636353230626563376532316539346231376337636538326233663738
|
||||
3237623235666635656566376364343063316661646161660a636366306562353361313930383136
|
||||
34343938663832646631373830373539356236313132333039393236393539613938343339313066
|
||||
6331656438666366330a353538393238353438643330356665373635373465643161333137386130
|
||||
34316164613965663930303265353964666338326437386362326639656264653238326463613430
|
||||
63326533386332313965343064323466653961643939656566343635366231386463323534303464
|
||||
353966343531346266356462396433373164
|
Loading…
Reference in a new issue