diff --git a/nextcloud/ansible/roles/common/tasks/redhat_tasks.yaml b/nextcloud/ansible/roles/common/tasks/redhat_tasks.yaml index c09ce65..3509847 100644 --- a/nextcloud/ansible/roles/common/tasks/redhat_tasks.yaml +++ b/nextcloud/ansible/roles/common/tasks/redhat_tasks.yaml @@ -40,24 +40,6 @@ - php-pecl-redis - python3-pyOpenSSL - - name: Import Collabora key - ansible.builtin.rpm_key: - state: present - key: https://www.collaboraoffice.com/repos/CollaboraOnline/CODE-centos8/repodata/repomd.xml.key - - - name: Add Collabora repository for Red Hat distros - yum_repository: - name: CollaboraOnline - description: Collabora Online - baseurl: https://www.collaboraoffice.com/repos/CollaboraOnline/CODE-centos8 - - - name: Install Collabora Online Packages - package: - name: - - coolwsd - - CODE-brand - state: latest - - name: Check if the '/var/lib/pgsql/data' directory exists ansible.builtin.stat: path: "/var/lib/pgsql/data" diff --git a/nextcloud/ansible/roles/coolwsd/tasks/main.yaml b/nextcloud/ansible/roles/coolwsd/tasks/main.yaml new file mode 100644 index 0000000..7a75f4c --- /dev/null +++ b/nextcloud/ansible/roles/coolwsd/tasks/main.yaml @@ -0,0 +1,35 @@ +--- + # tasks file for coolwsd + + #TODO: Esta parte hay que sacarla de nuestros propios repos + - name: Import Collabora key + ansible.builtin.rpm_key: + state: present + key: https://www.collaboraoffice.com/repos/CollaboraOnline/CODE-centos8/repodata/repomd.xml.key + + - name: Add Collabora repository for Red Hat distros + yum_repository: + name: CollaboraOnline + description: Collabora Online + baseurl: https://www.collaboraoffice.com/repos/CollaboraOnline/CODE-centos8 + + - name: Install Collabora Online Packages + package: + name: + - coolwsd + - CODE-brand + state: latest + + - name: Copy collabora configuration files + template: + src: templates/coolwsd.xml.j2 + dest: /etc/coolwsd/coolwsd.xml + + - name: Enable Libre Office Web services + systemd: + name: coolwsd + enabled: yes + state: restarted + tags: + - nextcloud_collabora + diff --git a/nextcloud/ansible/roles/coolwsd/tasks/main.yml b/nextcloud/ansible/roles/coolwsd/tasks/nginx.yaml similarity index 81% rename from nextcloud/ansible/roles/coolwsd/tasks/main.yml rename to nextcloud/ansible/roles/coolwsd/tasks/nginx.yaml index 2af9d9b..33c2cf2 100644 --- a/nextcloud/ansible/roles/coolwsd/tasks/main.yml +++ b/nextcloud/ansible/roles/coolwsd/tasks/nginx.yaml @@ -3,20 +3,6 @@ - name: Configure coolwsd for nginx template: src=coolwsd.conf.j2 dest="{{ nginx_path }}/nextcloud/coolwsd.conf" -# tasks file for coolwsd - - name: Copy collabora configuration files - template: - src: templates/coolwsd.xml.j2 - dest: /etc/coolwsd/coolwsd.xml - - - name: Enable Libre Office Web services - systemd: - name: coolwsd - enabled: yes - state: restarted - tags: - - nextcloud_collabora - - name: Install Collabora Office nextcloud app ansible.builtin.shell: cmd: /usr/bin/php "{{ nextcloud_occ }}" app:install richdocuments diff --git a/nextcloud/ansible/test_roles.yaml b/nextcloud/ansible/test_roles.yaml index 1db95e8..47f5595 100644 --- a/nextcloud/ansible/test_roles.yaml +++ b/nextcloud/ansible/test_roles.yaml @@ -27,16 +27,17 @@ roles: - { role: redis, become=yes, become_user=root } -- hosts: nextcloud - vars_files: - - "vars/{{ ansible_facts['os_family'] }}.yaml" - roles: - - { role: nextcloud, become=yes, become_user=root } - - hosts: coolwsd vars_files: - "vars/{{ ansible_facts['os_family'] }}.yaml" roles: - { role: coolwsd, become=yes, become_user=root } +- 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 } + diff --git a/nextcloud/ansible/vars/RedHat.yaml b/nextcloud/ansible/vars/RedHat.yaml index 69903b8..96ca56f 100644 --- a/nextcloud/ansible/vars/RedHat.yaml +++ b/nextcloud/ansible/vars/RedHat.yaml @@ -9,7 +9,7 @@ nextcloud_s3_enabled: true nextcloud_s3_bucket: nextcloud-test nextcloud_s3_key: nextcloud nextcloud_s3_secret: deemilaucsyoodkilCyct2FrapMell -nextcloud_s3_hostname: 10.201.15.144 +nextcloud_s3_hostname: 10.201.15.144 # LDAP SECTION ldap_agent_password: prueba123!