64 lines
1.8 KiB
YAML
Executable File
64 lines
1.8 KiB
YAML
Executable File
#!/usr/bin/env ansible-playbook
|
|
# vim:ft=ansible:
|
|
# Webservers
|
|
---
|
|
- hosts: vm-bot-1.home.mgmt.desu.ltd
|
|
module_defaults:
|
|
docker_container:
|
|
state: started
|
|
restart_policy: unless-stopped
|
|
pull: yes
|
|
tasks:
|
|
- name: include tasks for applications
|
|
include_tasks: tasks/{{ item }}
|
|
with_items:
|
|
- app/gulagbot.yml
|
|
tags: [ always ]
|
|
roles:
|
|
- role: backup
|
|
vars:
|
|
backup_s3backup_list_extra:
|
|
- /data
|
|
tags: [ backup ]
|
|
- hosts: vm-syncthing-1.home.mgmt.desu.ltd
|
|
module_defaults:
|
|
docker_container:
|
|
state: started
|
|
restart_policy: unless-stopped
|
|
pull: yes
|
|
pre_tasks:
|
|
- name: ensure docker network
|
|
docker_network: name=web
|
|
tags: [ docker ]
|
|
tasks:
|
|
- name: assure nfs mount directory
|
|
file: path=/data/syncthing/data state=directory mode=0755
|
|
tags: [ storage ]
|
|
- name: assure nfs mount
|
|
mount: path=/data/syncthing/data src=vm-fs-1.home.mgmt.desu.ltd:/nfs/syncthing fstype=nfs4 opts="rsize=10248576,wsize=1048576,soft,timeo=600,retrans=2,_netdev" state=mounted
|
|
tags: [ storage ]
|
|
- name: include tasks for applications
|
|
include_tasks: tasks/{{ item }}
|
|
with_items:
|
|
- app/syncthing.yml
|
|
tags: [ always ]
|
|
roles:
|
|
- role: backup
|
|
vars:
|
|
backup_s3backup_list_extra:
|
|
- /data/syncthing/config
|
|
tags: [ backup ]
|
|
- role: ingress
|
|
vars:
|
|
ingress_container_image: "nginx:latest"
|
|
ingress_container_ports:
|
|
- 80:80
|
|
ingress_container_config_mount: /etc/nginx/conf.d
|
|
ingress_container_persist_dir: /data/nginx
|
|
ingress_listen_args: 80
|
|
ingress_listen_tls: no
|
|
ingress_servers:
|
|
- name: syncthing.local.desu.ltd
|
|
proxy_pass: http://syncthing:8384
|
|
tags: [ ingress ]
|