diff --git a/roles/collabora/defaults/main.yml b/roles/collabora/defaults/main.yml deleted file mode 100644 index 720e2f2..0000000 --- a/roles/collabora/defaults/main.yml +++ /dev/null @@ -1,3 +0,0 @@ ---- -nextcloud_domain: nextcloud.com -admin_mail: admin@example.com diff --git a/roles/collabora/tasks/apache.yml b/roles/collabora/tasks/apache.yml index 3de0398..9905362 100644 --- a/roles/collabora/tasks/apache.yml +++ b/roles/collabora/tasks/apache.yml @@ -2,7 +2,7 @@ - name: add collabora http site template: src: etc/apache2/sites-available/ansible_domain.conf.j2 - dest: /etc/apache2/sites-available/{{ ansible_domain }}.conf + dest: /etc/apache2/sites-available/{{ collabora_domain }}.conf owner: root group: root mode: 0644 @@ -13,7 +13,7 @@ cmd: a2dissite 000-default.conf - name: enable collabora site command: - cmd: a2ensite {{ ansible_domain }}.conf + cmd: a2ensite {{ collabora_domain }}.conf - name: run certbot command: cmd: certbot --apache --non-interactive --keep-until-expiring --no-eff-email --email {{ admin_mail }} --redirect --renew-with-new-domains --agree-tos -d {{ ansible_domain }} @@ -23,11 +23,11 @@ - name: add collabora https site template: src: etc/apache2/sites-available/ansible_domain-le-ssl.conf.j2 - dest: /etc/apache2/sites-available/{{ ansible_domain }}-le-ssl.conf + dest: /etc/apache2/sites-available/{{ collabora_domain }}-le-ssl.conf owner: root group: root mode: 0644 - name: enable collabora https site command: - cmd: a2ensite {{ ansible_domain }}-le-ssl.conf + cmd: a2ensite {{ collabora_domain }}-le-ssl.conf notify: restart apache diff --git a/roles/collabora/tasks/ssl-dev.yml b/roles/collabora/tasks/ssl-dev.yml index f362ba6..678de5e 100644 --- a/roles/collabora/tasks/ssl-dev.yml +++ b/roles/collabora/tasks/ssl-dev.yml @@ -14,22 +14,22 @@ - name: Ensure directory exists for local self-signed TLS certs. file: - path: /etc/letsencrypt/live/{{ ansible_domain }} + path: /etc/letsencrypt/live/{{ collabora_domain }} state: directory - name: Generate an OpenSSL private key. openssl_privatekey: - path: /etc/letsencrypt/live/{{ ansible_domain }}/privkey.pem + path: /etc/letsencrypt/live/{{ collabora_domain }}/privkey.pem - name: Generate an OpenSSL CSR. openssl_csr: - path: /etc/ssl/private/{{ ansible_domain }}.csr - privatekey_path: /etc/letsencrypt/live/{{ ansible_domain }}/privkey.pem - common_name: "{{ ansible_domain }}" + path: /etc/ssl/private/{{ collabora_domain }}.csr + privatekey_path: /etc/letsencrypt/live/{{ collabora_domain }}/privkey.pem + common_name: "{{ collabora_domain }}" - name: Generate a Self Signed OpenSSL certificate. openssl_certificate: - path: /etc/letsencrypt/live/{{ ansible_domain }}/fullchain.pem - privatekey_path: /etc/letsencrypt/live/{{ ansible_domain }}/privkey.pem - csr_path: /etc/ssl/private/{{ ansible_domain }}.csr + path: /etc/letsencrypt/live/{{ collabora_domain }}/fullchain.pem + privatekey_path: /etc/letsencrypt/live/{{ collabora_domain }}/privkey.pem + csr_path: /etc/ssl/private/{{ collabora_domain }}.csr provider: selfsigned diff --git a/roles/collabora/templates/etc/apache2/sites-available/ansible_domain-le-ssl.conf.j2 b/roles/collabora/templates/etc/apache2/sites-available/ansible_domain-le-ssl.conf.j2 index c861b92..c5d120c 100644 --- a/roles/collabora/templates/etc/apache2/sites-available/ansible_domain-le-ssl.conf.j2 +++ b/roles/collabora/templates/etc/apache2/sites-available/ansible_domain-le-ssl.conf.j2 @@ -1,12 +1,12 @@ - ServerName {{ ansible_domain }} + ServerName {{ collabora_domain }} ServerAdmin {{ admin_mail }} ErrorLog ${APACHE_LOG_DIR}/error.log CustomLog ${APACHE_LOG_DIR}/access.log combined - SSLCertificateFile /etc/letsencrypt/live/{{ ansible_domain }}/fullchain.pem - SSLCertificateKeyFile /etc/letsencrypt/live/{{ ansible_domain }}/privkey.pem + SSLCertificateFile /etc/letsencrypt/live/{{ collabora_domain }}/fullchain.pem + SSLCertificateKeyFile /etc/letsencrypt/live/{{ collabora_domain }}/privkey.pem Include /etc/letsencrypt/options-ssl-apache.conf # Encoded slashes need to be allowed diff --git a/roles/collabora/templates/etc/apache2/sites-available/ansible_domain.conf.j2 b/roles/collabora/templates/etc/apache2/sites-available/ansible_domain.conf.j2 index 532d775..27d92ea 100644 --- a/roles/collabora/templates/etc/apache2/sites-available/ansible_domain.conf.j2 +++ b/roles/collabora/templates/etc/apache2/sites-available/ansible_domain.conf.j2 @@ -1,5 +1,5 @@ - ServerName {{ ansible_domain }} + ServerName {{ collabora_domain }} ServerAdmin {{ admin_mail }} ErrorLog ${APACHE_LOG_DIR}/error.log CustomLog ${APACHE_LOG_DIR}/access.log combined diff --git a/roles/common/defaults/main.yml b/roles/common/defaults/main.yml index c9609e6..d871e4b 100644 --- a/roles/common/defaults/main.yml +++ b/roles/common/defaults/main.yml @@ -2,5 +2,4 @@ sshport: 22 openports_list: - 22 -admin_mail: admin@example.com #blacklist_ip_list: