Make onlyoffice install much more dynamic.

This commit is contained in:
Hyperling 2021-02-20 12:28:20 -06:00
parent a14231ac46
commit d460c17579
4 changed files with 22 additions and 20 deletions

View File

@ -1,8 +0,0 @@
---
# Network related variables.
- name: Server | Network | Domains
set_fact:
hyperling: hyperling.com
tmcvideos: tmcvideos.com
demons: getthedemonsout.com

5
facts/server/system.yml Normal file
View File

@ -0,0 +1,5 @@
---
# Network related variables.
- name: Facts | Server | System | Not Used Yet
set_fact:

16
hosts
View File

@ -6,9 +6,6 @@ x570
dell-laptop dell-laptop
usb usb
[server]
office onlyoffice=true
[miner] [miner]
;;;;;;; Available options - all require lowercase values ;;;;;; ;;;;;;; Available options - all require lowercase values ;;;;;;
; amdgpu : Set to anything for installation of AMDGPU-Pro drivers on Ubuntu (20.04 preferred) ; amdgpu : Set to anything for installation of AMDGPU-Pro drivers on Ubuntu (20.04 preferred)
@ -33,4 +30,15 @@ office onlyoffice=true
; Valid values: nanopool etherpool f2pool ; Valid values: nanopool etherpool f2pool
; ;
usb amdgpu=true usb amdgpu=true
x570 amdgpu=true nanominer=true nanominer_gpu=eth nanominer_gpus=0 nanominer_gpu_pool=nanopool x570 amdgpu=true nanominer=true nanominer_gpu=eth nanominer_gpus=0 nanominer_gpu_pool=nanopool
[server]
;;;;;;; Parameters ;;;;;;
;
; domain : Set to the domain which gives the server its FQDN
; Example: hyperling.com
;
; onlyoffice : Set to anything for this server to be configured as an OnlyOffice server.
; Example: true
;
office domain=hyperling.com onlyoffice=true

View File

@ -54,19 +54,16 @@
## HTTPS ## ## HTTPS ##
# https://helpcenter.onlyoffice.com/installation/docs-community-https-linux.aspx # https://helpcenter.only{{ ansible_histname }}.com/installation/docs-community-https-linux.aspx
- name: Server | OnlyOffice | HTTPS | Hostname
shell: hostname office
# Certs # # Certs #
- name: Server | OnlyOffice | HTTPS | Check For Cert - name: Server | OnlyOffice | HTTPS | Check For Cert
shell: ls -l /etc/letsencrypt/live/office.hyperling.com/{fullchain,privkey}.pem shell: "ls -l /etc/letsencrypt/live/{{ ansible_hostname }}.{{ domain }}/{fullchain,privkey}.pem"
register: onlyoffice_cert register: onlyoffice_cert
- name: Server | OnlyOffice | HTTPS | Create Cert - name: Server | OnlyOffice | HTTPS | Create Cert
shell: certbot --nginx -d office.hyperling.com -d docs.hyperling.com shell: "certbot --nginx -d {{ ansible_hostname }}.{{ domain }}"
when: onlyoffice_cert.failed when: onlyoffice_cert.failed
# Config # # Config #
@ -88,8 +85,8 @@
# create: no # create: no
# backup: yes # backup: yes
# loop: # loop:
# - { "regexp": "ssl_certificate ", "line": " ssl_certificate /etc/letsencrypt/live/office.hyperling.com/fullchain.pem" } # - { "regexp": "ssl_certificate ", "line": " ssl_certificate /etc/letsencrypt/live/{{ ansible_hostname }}.{{ domain }}/fullchain.pem" }
# - { "regexp": "ssl_certificate_key ", "line": " ssl_certificate_key /etc/letsencrypt/live/office.hyperling.com/privkey.pem" } # - { "regexp": "ssl_certificate_key ", "line": " ssl_certificate_key /etc/letsencrypt/live/{{ ansible_hostname }}.{{ domain }}/privkey.pem" }
# Services # # Services #