65 lines
1.6 KiB
YAML
65 lines
1.6 KiB
YAML
---
|
|
# The home-server project produces a multi-purpose setup using Ansible.
|
|
# Copyright © 2018 Y. Gablin, under the GPL-3.0-or-later license.
|
|
# Full licensing information in the LICENSE file, or gnu.org/licences/gpl-3.0.txt if the file is missing.
|
|
|
|
### UPSTREAM BEGIN ⇒ ###
|
|
- name: pull prerequisites from upstream
|
|
include_role: name=etckeeper.inc allow_duplicates=true tasks_from=upstream.yml
|
|
vars:
|
|
msg: privatebin
|
|
### ⇐ UPSTREAM BEGIN ###
|
|
|
|
- name: install AUR software
|
|
include_role:
|
|
name: aur.inc
|
|
allow_duplicates: true
|
|
vars:
|
|
packages:
|
|
- privatebin
|
|
aur_user: git
|
|
|
|
### UPSTREAM END ⇒ ###
|
|
- name: merge upstream
|
|
include_role: name=etckeeper.inc allow_duplicates=true tasks_from=merge.yml
|
|
vars:
|
|
msg: privatebin
|
|
### ⇐ UPSTREAM END ###
|
|
|
|
- name: configure privatebin
|
|
template:
|
|
src: templates/conf.php.j2
|
|
dest: /etc/webapps/privatebin/conf.php
|
|
group: http
|
|
mode: 0640
|
|
|
|
- name: create the data directory
|
|
file:
|
|
path: /var/lib/privatebin
|
|
state: directory
|
|
owner: http
|
|
group: http
|
|
mode: 0770
|
|
|
|
- name: configure nginx for privatebin
|
|
copy:
|
|
content: |
|
|
location {{http_pfx_privatebin}} {
|
|
alias /usr/share/webapps/privatebin;
|
|
rewrite ^({{http_pfx_privatebin}})(/.*?\.php)(/.*)?$ /php...$document_root/...$1/...$2/...$3 last;
|
|
}
|
|
dest: /etc/nginx/inc.d/privatebin.http.inc
|
|
mode: 0440
|
|
owner: http
|
|
group: http
|
|
notify:
|
|
- restart nginx.service
|
|
|
|
### LOCAL COMMIT ⇒ ###
|
|
- name: commit local changes
|
|
include_role: name=etckeeper.inc allow_duplicates=true tasks_from=local.yml
|
|
vars:
|
|
msg: privatebin
|
|
### ⇐ LOCAL COMMIT ###
|
|
- meta: flush_handlers
|