Configuración funcional con coolwsd en host remoto
This commit is contained in:
parent
4d35d8143c
commit
f203f10f54
5 changed files with 11 additions and 96 deletions
|
@ -4,6 +4,7 @@ remote_user = root
|
|||
roles_path = ./roles
|
||||
callbacks_enabled = timer, profile_tasks, profile_roles
|
||||
stdout_callback = yaml
|
||||
host_key_checking = False
|
||||
|
||||
[connection]
|
||||
pipelining = true
|
||||
|
|
|
@ -1,43 +0,0 @@
|
|||
---
|
||||
|
||||
- name: Configure coolwsd for nginx
|
||||
template: src=coolwsd.conf.j2 dest="{{ nginx_path }}/nextcloud/coolwsd.conf"
|
||||
|
||||
- name: Install Collabora Office nextcloud app
|
||||
ansible.builtin.shell:
|
||||
cmd: /usr/bin/php "{{ nextcloud_occ }}" app:install richdocuments
|
||||
chdir: "{{ document_root }}"
|
||||
become: true
|
||||
become_user: "{{ web_user }}"
|
||||
tags:
|
||||
- nextcloud_collabora
|
||||
when:
|
||||
ansible_local['nextcloud']['is_code_installed'] != true
|
||||
# TODO add: config:app:set text workspace_available --value=0
|
||||
- name: Reload facts after Collabora Nextcloud app installation
|
||||
setup:
|
||||
tags:
|
||||
- check_facts
|
||||
|
||||
- name: Configure Collabora Office nextcloud app
|
||||
ansible.builtin.shell:
|
||||
cmd: /usr/bin/php "{{ nextcloud_occ }}" config:app:set richdocuments wopi_url --value "https://{{nextcloud_fqdn}}"
|
||||
chdir: "{{ document_root }}"
|
||||
become: true
|
||||
become_user: "{{ web_user }}"
|
||||
tags:
|
||||
- nextcloud_collabora
|
||||
when:
|
||||
ansible_local['nextcloud']['is_code_installed'] == true
|
||||
|
||||
- name: Activate Collabora Office nextcloud app
|
||||
ansible.builtin.shell:
|
||||
cmd: /usr/bin/php "{{ nextcloud_occ }}" richdocuments:activate-config
|
||||
chdir: "{{ document_root }}"
|
||||
become: true
|
||||
become_user: "{{ web_user }}"
|
||||
tags:
|
||||
- nextcloud_collabora
|
||||
when:
|
||||
ansible_local['nextcloud']['is_code_installed'] == true
|
||||
|
|
@ -1,43 +0,0 @@
|
|||
|
||||
# WOPI discovery URL
|
||||
location ^~ /hosting/discovery {
|
||||
proxy_pass http://{{ coolwsd_host }}:9980;
|
||||
proxy_set_header Host $http_host;
|
||||
}
|
||||
|
||||
# Capabilities
|
||||
location ^~ /hosting/capabilities {
|
||||
proxy_pass http://{{ coolwsd_host }}:9980;
|
||||
proxy_set_header Host $http_host;
|
||||
}
|
||||
|
||||
# main websocket
|
||||
location ~ ^/cool/(.*)/ws$ {
|
||||
proxy_pass http://{{ coolwsd_host }}:9980;
|
||||
proxy_set_header Upgrade $http_upgrade;
|
||||
proxy_set_header Connection "Upgrade";
|
||||
proxy_set_header Host $http_host;
|
||||
proxy_read_timeout 36000s;
|
||||
}
|
||||
|
||||
# download, presentation and image upload
|
||||
location ~ ^/(c|l)ool {
|
||||
proxy_pass http://{{ coolwsd_host }}:9980;
|
||||
proxy_set_header Host $http_host;
|
||||
}
|
||||
|
||||
# Admin Console websocket
|
||||
location ^~ /cool/adminws {
|
||||
proxy_pass http://{{ coolwsd_host }}:9980;
|
||||
proxy_set_header Upgrade $http_upgrade;
|
||||
proxy_set_header Connection "Upgrade";
|
||||
proxy_set_header Host $http_host;
|
||||
proxy_read_timeout 36000s;
|
||||
}
|
||||
|
||||
# static files
|
||||
location ^~ /browser {
|
||||
proxy_pass http://{{ coolwsd_host }}:9980;
|
||||
proxy_set_header Host $http_host;
|
||||
}
|
||||
|
|
@ -7,7 +7,8 @@
|
|||
lineinfile:
|
||||
path: "/etc/hosts"
|
||||
regexp: ".*\t{{ ansible_hostname }}"
|
||||
line: "{{ ansible_env.SSH_CONNECTION.split(' ')[2] }}\t{{ nextcloud_fqdn }} {{ ansible_hostname }}"
|
||||
#TODO: crear una variable que tenga la IP del balanceador
|
||||
line: "{{ hostvars['cs8-nextcloud-test']['ansible_default_ipv4']['address'] }}\t{{ nextcloud_fqdn }} {{ ansible_hostname }}"
|
||||
state: present
|
||||
backup: yes
|
||||
register: etchostsupdate
|
||||
|
@ -18,7 +19,7 @@
|
|||
become_user: root
|
||||
lineinfile:
|
||||
path: "/etc/hosts"
|
||||
line: "{{ ansible_env.SSH_CONNECTION.split(' ')[2] }}\t{{ nextcloud_domain_name }}"
|
||||
line: "{{ hostvars['cs8-nextcloud-test']['ansible_default_ipv4']['address'] }}\t{{ nextcloud_domain_name }}"
|
||||
state: present
|
||||
backup: yes
|
||||
|
||||
|
|
|
@ -7,37 +7,36 @@
|
|||
- postgresql
|
||||
- redis
|
||||
roles:
|
||||
- { role: certificates }
|
||||
- name: certificates
|
||||
|
||||
- hosts: all
|
||||
vars_files:
|
||||
- "vars/{{ ansible_facts['os_family'] }}.yaml"
|
||||
roles:
|
||||
- { role: common, become=yes, become_user=root }
|
||||
- name: common
|
||||
|
||||
- hosts: postgresql
|
||||
vars_files:
|
||||
- "vars/{{ ansible_facts['os_family'] }}.yaml"
|
||||
roles:
|
||||
- { role: postgresql, become=yes, become_user=root }
|
||||
- name: postgresql
|
||||
|
||||
- hosts: redis
|
||||
vars_files:
|
||||
- "vars/{{ ansible_facts['os_family'] }}.yaml"
|
||||
roles:
|
||||
- { role: redis, become=yes, become_user=root }
|
||||
- name: redis
|
||||
|
||||
- hosts: coolwsd
|
||||
vars_files:
|
||||
- "vars/{{ ansible_facts['os_family'] }}.yaml"
|
||||
roles:
|
||||
- { role: coolwsd, become=yes, become_user=root }
|
||||
- name: coolwsd
|
||||
|
||||
- hosts: nextcloud
|
||||
vars_files:
|
||||
- "vars/{{ ansible_facts['os_family'] }}.yaml"
|
||||
roles:
|
||||
- { role: nextcloud, become=yes, become_user=root }
|
||||
- { role: coolwsd, become=yes, become_user=root, tasks_from=nginx }
|
||||
|
||||
- name: nextcloud
|
||||
- name: coolwsd-nginx
|
||||
|
||||
|
|
Loading…
Reference in a new issue