testing up1 and goploader
Questo commit è contenuto in:
parent
e326a2026b
commit
119a3e4591
11 ha cambiato i file con 82 aggiunte e 8 eliminazioni
10
goploader.yml
File normale
10
goploader.yml
File normale
|
@ -0,0 +1,10 @@
|
|||
---
|
||||
|
||||
- name: "Testing goploader role"
|
||||
hosts: localhost
|
||||
become: true
|
||||
roles:
|
||||
- role: common
|
||||
- role: goploader
|
||||
vars:
|
||||
hostname: :8000
|
2
roles/goploader/defaults/main.yml
File normale
2
roles/goploader/defaults/main.yml
File normale
|
@ -0,0 +1,2 @@
|
|||
---
|
||||
hostname: :8000
|
5
roles/goploader/handlers/main.yml
File normale
5
roles/goploader/handlers/main.yml
File normale
|
@ -0,0 +1,5 @@
|
|||
---
|
||||
- name: Restart goploader
|
||||
service:
|
||||
name: goploader
|
||||
state: restarted
|
7
roles/goploader/meta/main.yml
File normale
7
roles/goploader/meta/main.yml
File normale
|
@ -0,0 +1,7 @@
|
|||
---
|
||||
dependencies:
|
||||
- role: caddy
|
||||
vars:
|
||||
caddy_config: |
|
||||
{{ hostname }}
|
||||
reverse_proxy / 127.0.0.1:8008
|
36
roles/goploader/tasks/main.yml
File normale
36
roles/goploader/tasks/main.yml
File normale
|
@ -0,0 +1,36 @@
|
|||
---
|
||||
|
||||
- name: ensure goploader user is present
|
||||
user:
|
||||
name: "goploader"
|
||||
home: "/srv/goploader"
|
||||
shell: "/bin/bash"
|
||||
state: present
|
||||
|
||||
- name: Download Goploader
|
||||
get_url:
|
||||
url: https://gpldr.in/releases/servers/server_amd64.tar.gz
|
||||
dest: /srv/goploader/server.tgz
|
||||
become: true
|
||||
become_user: goploader
|
||||
|
||||
- name: Unarchive goploader
|
||||
unarchive:
|
||||
src: /srv/goploader/server.tgz
|
||||
dest: /srv/goploader
|
||||
owner: goploader
|
||||
group: goploader
|
||||
|
||||
|
||||
- name: Template systemd service
|
||||
template:
|
||||
src: goploader.service
|
||||
dest: /etc/systemd/system/goploader.service
|
||||
owner: root
|
||||
group: root
|
||||
mode: 0644
|
||||
notify:
|
||||
- Restart goploader
|
||||
|
||||
|
||||
|
11
roles/goploader/templates/goploader.service
File normale
11
roles/goploader/templates/goploader.service
File normale
|
@ -0,0 +1,11 @@
|
|||
[Unit]
|
||||
Description=goploader
|
||||
|
||||
[Service]
|
||||
Type=simple
|
||||
User=goploader
|
||||
WorkingDirectory=/srv/goploader/goploader-server
|
||||
ExecStart=/srv/goploader/goploader-server/server
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
|
@ -1,5 +1,4 @@
|
|||
---
|
||||
api_key: "{{lookup('password', './.pass/up1_api_key')}}"
|
||||
maximum_file_size: 500000000
|
||||
port: 31337
|
||||
footer: <a href="https://github.com/Upload/Up1" target="_blank">Source Code</a> - <a href="mailto:info@cisti.org" id="contact" target="_blank">Contact</a>
|
||||
|
|
4
roles/up1/main.yml
File normale
4
roles/up1/main.yml
File normale
|
@ -0,0 +1,4 @@
|
|||
---
|
||||
api_key: "{{lookup('password', './.pass/up1_api_key')}}"
|
||||
maximum_file_site: 500000000
|
||||
footer: "<a href="https://github.com/Upload/Up1" target="_blank">Source Code</a> - <a href="mailto:info@cisti.org" id="contact" target="_blank">Contact</a>"
|
|
@ -1,6 +1,6 @@
|
|||
---
|
||||
|
||||
- name: ensure lufi user is present
|
||||
- name: ensure up1 user is present
|
||||
user:
|
||||
name: "up1"
|
||||
home: "/srv/up1"
|
||||
|
@ -19,16 +19,16 @@
|
|||
src: server.conf.j2
|
||||
dest: /srv/up1/up1/server/server.conf
|
||||
owner: up1
|
||||
group: up1
|
||||
mode: 0600
|
||||
group: www-data
|
||||
mode: 0660
|
||||
|
||||
- name: copy client settings
|
||||
template:
|
||||
src: config.js.j2
|
||||
dest: /srv/up1/up1/client/config.js
|
||||
owner: up1
|
||||
group: up1
|
||||
mode: 0600
|
||||
group: www-data
|
||||
mode: 0660
|
||||
|
||||
- name: Install up1 deps
|
||||
become: true
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
|
||||
"http": {
|
||||
"enabled": true,
|
||||
"listen": "127.0.0.1:{{ port }}"
|
||||
"listen": "127.0.0.1:31337"
|
||||
},
|
||||
|
||||
"https": {
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
---
|
||||
|
||||
- name: "Testing up1 role"
|
||||
hosts: localhost
|
||||
hosts: jolly
|
||||
become: true
|
||||
roles:
|
||||
- role: common
|
||||
|
|
Caricamento…
Crea riferimento in una nuova segnalazione