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:

14
hosts
View File

@ -6,9 +6,6 @@ x570
dell-laptop
usb
[server]
office onlyoffice=true
[miner]
;;;;;;; Available options - all require lowercase values ;;;;;;
; amdgpu : Set to anything for installation of AMDGPU-Pro drivers on Ubuntu (20.04 preferred)
@ -34,3 +31,14 @@ office onlyoffice=true
;
usb amdgpu=true
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://helpcenter.onlyoffice.com/installation/docs-community-https-linux.aspx
- name: Server | OnlyOffice | HTTPS | Hostname
shell: hostname office
# https://helpcenter.only{{ ansible_histname }}.com/installation/docs-community-https-linux.aspx
# Certs #
- 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
- 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
# Config #
@ -88,8 +85,8 @@
# create: no
# backup: yes
# loop:
# - { "regexp": "ssl_certificate ", "line": " ssl_certificate /etc/letsencrypt/live/office.hyperling.com/fullchain.pem" }
# - { "regexp": "ssl_certificate_key ", "line": " ssl_certificate_key /etc/letsencrypt/live/office.hyperling.com/privkey.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/{{ ansible_hostname }}.{{ domain }}/privkey.pem" }
# Services #