-
Notifications
You must be signed in to change notification settings - Fork 0
/
odango.yml
99 lines (96 loc) · 3.35 KB
/
odango.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
---
- hosts: localhost
vars:
ipv6_prefix: '2a01:7c8:c020:2::3'
timezone: 'Europe/Amsterdam'
become: true
become_user: root
tasks:
- xbps: upgrade=yes
- name: install nodejs
xbps: name=nodejs state=present
- name: install php
xbps: name=php state=present
- name: install php-mysql
xbps: name=php-mysql state=present
- name: install curl
xbps: name=curl state=present
- name: install unbound
xbps: name=unbound state=present
- name: install cronie
xbps: name=cronie state=present
- name: install mariadb
xbps: name=mariadb state=present
- name: install zip
xbps: name=zip state=present
- name: fix php.ini
lineinfile:
dest: /etc/php/php.ini
regexp: '^;?open_basedir'
line: 'open_basedir = /'
- lineinfile:
dest: /etc/php/php.ini
regexp: '^;?extension=phar\.so'
line: 'extension=phar.so'
- lineinfile:
dest: /etc/php/php.ini
regexp: '^;?extension=zip\.so'
line: 'extension=zip.so'
- lineinfile:
dest: /etc/php/php.ini
regexp: '^;?date.timezone='
line: 'date.timezone={{ timezone }}'
- lineinfile:
dest: /etc/php/php.ini
regexp: '^;?extension=pdo_mysql\.so'
line: 'extension=pdo_mysql.so'
- lineinfile:
dest: /etc/php/php.ini
regexp: '^;?extension=openssl\.so'
line: 'extension=openssl.so'
- name: install composer
shell: curl -o- https://getcomposer.org/installer | php -- --install-dir=/usr/bin --filename=composer
- file:
path: /usr/bin/composer
mode: a+x
- name: enabling unbound service
file:
state: link
src: /etc/sv/unbound
dest: /var/service/unbound
- name: enabling crond service
file:
state: link
src: /etc/sv/crond
dest: /var/service/crond
- name: enabling mariadb service
file:
state: link
src: /etc/sv/mysqld
dest: /var/service/mysqld
- file: path=/opt/hebi state=directory
- git: repo="https://github.com/odangomoe/Hebi.git" dest="/opt/hebi" clone=yes update=yes
notify: hebi update
- file: path=/opt/hebi-neko state=directory
- git: repo="https://github.com/odangomoe/Hebi-Neko.git" dest="/opt/hebi-neko" clone=yes update=yes
notify: hebi neko update
- file: path=/opt/hebi-baka state=directory
- git: repo="https://github.com/odangomoe/Hebi-Baka.git" dest="/opt/hebi-baka" clone=yes update=yes
notify: hebi baka update
- cron: special_time=daily job="PATH=/usr/bin /opt/hebi/bin/hebi anidb" name="update anidb"
- cron: minute=30 job="PATH=/usr/bin /bin/flock -nE0 /run/hebi.neko.lock /opt/hebi/bin/hebi nyaa" name="update nyaa"
- cron: minute=0 job="PATH=/usr/bin /bin/flock -nE0 /run/hebi.neko.lock /opt/hebi-neko/run.sh 96 4513 {{ ipv6_prefix }}" name="crawl nyaa"
- cron: minute=0 job="PATH=/usr/bin /bin/flock -nE0 /run/hebi.baka.lock /bin/node /opt/hebi-baka/index.js" name="update torrent status"
handlers:
- name: hebi update composer
composer: working_dir=/opt/hebi command=install
listen: "hebi update"
- name: hebi migrate database
shell: cd /opt/hebi && /opt/hebi/vendor/bin/propel migration:diff && /opt/hebi/vendor/bin/propel migration:up;
listen: "hebi update"
- name: hebi neko update
npm: path=/opt/hebi-neko state=latest
listen: "hebi neko update"
- name: hebi baka update
npm: path=/opt/hebi-baka state=latest
listen: "hebi baka update"