diff --git a/host_vars/collabora.pub.infra.auro.re.yml b/host_vars/collabora.pub.infra.auro.re.yml index 739e3a8..5758b24 100644 --- a/host_vars/collabora.pub.infra.auro.re.yml +++ b/host_vars/collabora.pub.infra.auro.re.yml @@ -8,4 +8,6 @@ ifupdown2__interfaces: - 2a09:6840:128::220/64 - 10.128.0.220/16 gateways: "{{ ifupdown2__gateways.adm }}" + +collabora__server_name: office.auro.re ... diff --git a/host_vars/ns-master.int.infra.auro.re/knotd.yml b/host_vars/ns-master.int.infra.auro.re/knotd.yml index a2faa4d..774d99f 100644 --- a/host_vars/ns-master.int.infra.auro.re/knotd.yml +++ b/host_vars/ns-master.int.infra.auro.re/knotd.yml @@ -286,6 +286,7 @@ knotd__zones: - re2o - nextcloud - vote + - office target: proxy - name: intranet target: re2o diff --git a/host_vars/proxy.adm.auro.re.yml b/host_vars/proxy.adm.auro.re.yml index 1c28257..fb9fe77 100644 --- a/host_vars/proxy.adm.auro.re.yml +++ b/host_vars/proxy.adm.auro.re.yml @@ -70,3 +70,6 @@ loc_reverseproxy: - from: grafana.auro.re to: "10.128.0.98:3000" + + - from: office.auro.re + to: "10.128.0.220" diff --git a/playbooks/grafana.yml b/playbooks/grafana.yml index edc2f0a..edacbf5 100755 --- a/playbooks/grafana.yml +++ b/playbooks/grafana.yml @@ -17,8 +17,9 @@ bind_password: "{{ vault_ldap_grafana_password }}" search_base_dns: "cn=Utilisateurs,dc=auro,dc=re" group_search_base_dns: "ou=posix,ou=groups,dc=auro,dc=re" - editors_group_dn: + admins_group_dn: - cn=sudoldap,ou=posix,ou=groups,dc=auro,dc=re + editors_group_dn: - cn=technicien,ou=posix,ou=groups,dc=auro,dc=re update_motd: grafana: Grafana est déployé (/etc/grafana). diff --git a/playbooks/openssh.yml b/playbooks/openssh.yml index f1bcd62..2c52ee9 100755 --- a/playbooks/openssh.yml +++ b/playbooks/openssh.yml @@ -3,8 +3,8 @@ - hosts: - pve_network - vm_test - - vm_network - vm_services + - vm_network roles: - openssh_server ... diff --git a/roles/collabora/handlers/main.yml b/roles/collabora/handlers/main.yml new file mode 100644 index 0000000..03e1011 --- /dev/null +++ b/roles/collabora/handlers/main.yml @@ -0,0 +1,6 @@ +--- +- name: Restart Collabora + service: + name: coolwsd + state: restarted +... diff --git a/roles/collabora/tasks/main.yml b/roles/collabora/tasks/main.yml new file mode 100644 index 0000000..4d4fd67 --- /dev/null +++ b/roles/collabora/tasks/main.yml @@ -0,0 +1,49 @@ +--- +- name: Install gpg (to import Collabora key) + apt: + name: + - gpg + - python3-debian + state: present + register: apt_result + retries: 3 + until: apt_result is succeeded + +- name: Import Collabora GPG signing key + get_url: + url: https://www.collaboraoffice.com/downloads/gpg/collaboraonline-release-keyring.gpg + dest: /usr/share/keyrings/collaboraonline-release-keyring.gpg + +- name: Add Collabora repository + deb822_repository: + name: collabora + types: deb + uris: https://www.collaboraoffice.com/repos/CollaboraOnline/CODE-deb + suites: ./ + signed_by: /usr/share/keyrings/collaboraonline-release-keyring.gpg + +- name: Install Collabora + apt: + name: + - coolwsd + - code-brand + - collaboraoffice* + state: present + register: apt_result + retries: 3 + until: apt_result is succeeded + +- name: Configure Collabora + template: + src: coolwsd.xml.j2 + dest: /etc/coolwsd/coolwsd.xml + mode: u=rw,g=r,o= + notify: Restart Collabora + +- name: Enable and start Collabora + systemd: + name: coolwsd + enabled: true + state: started + daemon_reload: true +... diff --git a/roles/collabora/templates/coolwsd.xml.j2 b/roles/collabora/templates/coolwsd.xml.j2 new file mode 100644 index 0000000..c8388ea --- /dev/null +++ b/roles/collabora/templates/coolwsd.xml.j2 @@ -0,0 +1,327 @@ + +{{ ansible_managed | comment(style="xml") }} + + + + + + + + + true + + + de_DE en_GB en_US es_ES fr_FR it nl pt_BR pt_PT ru + + + + + + + + + + + + + false + + + + + + + + + {{ collabora__server_name }} + + + true + + 90.0 + 1 + + + 4 + 5 + false + 96 + 3600 + 30 + 300 + false + 0 + 8000 + 0 + 0 + 100 + 5 + 100 + 500 + 5000 + + 10000 + 60 + 300 + 3072 + 85 + 120 + + + + + true + 300 + 900 + + + + + + true + + warning + trace + notice + fatal + false + + -INFO-WARN + + + /var/log/coolwsd.log + never + timestamp + true + 10 days + 10 + true + false + + + false + 82589933 + + false + false + + + + + /var/log/coolwsd.trace.json + + + false + + + + + + + + false + + + + + + all + any + + + + 192\.168\.[0-9]{1,3}\.[0-9]{1,3} + ::ffff:192\.168\.[0-9]{1,3}\.[0-9]{1,3} + 127\.0\.0\.1 + ::ffff:127\.0\.0\.1 + ::1 + 172\.1[6789]\.[0-9]{1,3}\.[0-9]{1,3} + ::ffff:172\.1[6789]\.[0-9]{1,3}\.[0-9]{1,3} + 172\.2[0-9]\.[0-9]{1,3}\.[0-9]{1,3} + ::ffff:172\.2[0-9]\.[0-9]{1,3}\.[0-9]{1,3} + 172\.3[01]\.[0-9]{1,3}\.[0-9]{1,3} + ::ffff:172\.3[01]\.[0-9]{1,3}\.[0-9]{1,3} + 10\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3} + ::ffff:10\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3} + + + 192\.168\.[0-9]{1,3}\.[0-9]{1,3} + ::ffff:192\.168\.[0-9]{1,3}\.[0-9]{1,3} + 127\.0\.0\.1 + ::ffff:127\.0\.0\.1 + ::1 + 172\.1[6789]\.[0-9]{1,3}\.[0-9]{1,3} + ::ffff:172\.1[6789]\.[0-9]{1,3}\.[0-9]{1,3} + 172\.2[0-9]\.[0-9]{1,3}\.[0-9]{1,3} + ::ffff:172\.2[0-9]\.[0-9]{1,3}\.[0-9]{1,3} + 172\.3[01]\.[0-9]{1,3}\.[0-9]{1,3} + ::ffff:172\.3[01]\.[0-9]{1,3}\.[0-9]{1,3} + 10\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3} + ::ffff:10\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3} + localhost + + + + + + + + + + + + false + + true + /etc/coolwsd/cert.pem + /etc/coolwsd/key.pem + /etc/coolwsd/ca-chain.cert.pem + + + 1000 + + + + + + + false + 31536000 + + + + + true + true + 1800 + false + 1 + false + false + + + + + + + + + + + + + + default + true + + + + + + 0 + + 900 + + + + + + + + + + + true + + + + + + + + + + false + false + + + + true + true + true + true + + + + + + + + + + + + + + + + + + + false + + + + + + + false + + + + log + + + + + + + + true + + + https://help.collaboraoffice.com/help.html? + + + true + + + + + + + + diff --git a/roles/grafana/tasks/main.yml b/roles/grafana/tasks/main.yml index e0666cc..b76a5de 100644 --- a/roles/grafana/tasks/main.yml +++ b/roles/grafana/tasks/main.yml @@ -6,20 +6,28 @@ register: apt_result retries: 3 until: apt_result is succeeded + +- name: Prepare import Grafana GPG signing key + file: + path: /etc/apt/keyrings/ + state: directory + owner: root + group: root + mode: u=rwx,g=rx,o=rx - name: Import Grafana GPG signing key - apt_key: - url: https://packages.grafana.com/gpg.key - state: present - register: apt_key_result - retries: 3 - until: apt_key_result is succeeded + get_url: + url: https://apt.grafana.com/gpg.key + dest: /etc/apt/keyrings/grafana-release-keyring.asc - name: Add Grafana repository - apt_repository: - repo: deb https://packages.grafana.com/oss/deb stable main - state: present - update_cache: true + deb822_repository: + name: grafana + types: deb + uris: https://apt.grafana.com + suites: stable + components: main + signed_by: /etc/apt/keyrings/grafana-release-keyring.asc - name: Install Grafana apt: diff --git a/roles/grafana/templates/ldap.toml.j2 b/roles/grafana/templates/ldap.toml.j2 index 7e637f0..d9026ff 100644 --- a/roles/grafana/templates/ldap.toml.j2 +++ b/roles/grafana/templates/ldap.toml.j2 @@ -46,8 +46,15 @@ username = "cn" member_of = "dn" email = "mail" +# Admins +{% for group_dn in grafana.ldap.admins_group_dn | default([]) %} +[[servers.group_mappings]] +group_dn = "{{ group_dn }}" +org_role = "Admin" +{% endfor %} + # Editors -{% for group_dn in grafana.ldap.editors_group_dn %} +{% for group_dn in grafana.ldap.editors_group_dn | default([]) %} [[servers.group_mappings]] group_dn = "{{ group_dn }}" org_role = "Editor"